Player API Endpoints
POST Create a new stream
Create a new stream for this user. Once a stream is created the user may then play and interact with audio.
Endpoint
POST /player/create-streamExample Request
curl -X POST https://api.aimi.fm/player/create-stream \
-H "Authorization: Bearer YOUR_API_KEY"POST End the stream
End the active audio stream for this user.
Endpoint
POST /player/end_streamExample Request
curl -X POST https://api.aimi.fm/player/end_stream \
-H "Authorization: Bearer YOUR_API_KEY"GET Get Current Experience
Get the current playing experience.
Endpoint
GET /player/current_experienceExample Request
curl -X GET https://api.aimi.fm/player/current_experience \
-H "Authorization: Bearer YOUR_API_KEY"GET Get Genres
Get a list of available genres.
Endpoint
GET /player/genresExample Request
curl -X GET https://api.aimi.fm/player/genres \
-H "Authorization: Bearer YOUR_API_KEY"GET Get stream ttl
Get the Time-To-Live (TTL) of the audio stream for this user. Time is displayed in seconds.
Endpoint
GET /player/stream_ttlExample Request
curl -X GET https://api.aimi.fm/player/stream_ttl \
-H "Authorization: Bearer YOUR_API_KEY"GET Get Transport
Get the tempo, beat and frame from the running transport.
Endpoint
GET /player/transportExample Request
curl -X GET https://api.aimi.fm/player/transport \
-H "Authorization: Bearer YOUR_API_KEY"GET Liveliness
Liveliness endpoint.
Endpoint
GET /player/livelinessExample Request
curl -X GET https://api.aimi.fm/player/liveliness \
-H "Authorization: Bearer YOUR_API_KEY"POST Player Start
Start the audio player. The style of audio played can be controlled by specifying a particular 'experienceid'. These ids can be found by using the 'Get Genres' endpoint or by liasing with your Aimi representative.
Endpoint
POST /player/startExample Request
curl -X POST https://api.aimi.fm/player/start \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"experience_id": "YOUR_EXPERIENCE_ID"
}'POST Player Stop
Stop the current audio player.
Endpoint
POST /player/stopExample Request
curl -X POST https://api.aimi.fm/player/stop \
-H "Authorization: Bearer YOUR_API_KEY"POST Replace Plan
Change any aspect of the music by providing a new plan.
Endpoint
POST /player/replace_planExample Request
curl -X POST https://api.aimi.fm/player/replace_plan \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"plan": { ... }
}'POST Set Intensity
Set the intensity of playing music by altering the relative tempo.
Endpoint
POST /player/set_intensityExample Request
curl -X POST https://api.aimi.fm/player/set_intensity \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"intensity": 0.8
}'GET Stream audio
Initiate the live audio stream connection for this user.
Endpoint
GET /player/streamExample Request
curl -X GET https://api.aimi.fm/player/stream \
-H "Authorization: Bearer YOUR_API_KEY"POST Toggle Vocals
Toggle Vocals on or off.
Endpoint
POST /player/toggle_vocalsExample Request
curl -X POST https://api.aimi.fm/player/toggle_vocals \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"vocals": true
}'