All requests must be made over HTTPS and will be authenticated using an API key. To create your first API Key, please use the Console.
Keep your API keys secret!
They should not be added to the client-side code or checked into your application's code.
import audiostack
import os
audiostack.api_key = os.environ["AUDIO_STACK_DEV_KEY"]
Code examples
Get your first audio project started with the bellow example. This is also useful for debugging if your API key is working.
Create a script
This creates a project called myFirstAudioProject
with one module admodule
under which you'll find your first script.
curl -X 'POST' \
'https://v2.api.audio/content/script' \
-H 'accept: application/json' \
-H 'x-api-key: cce66a3c6ce84a36959d5e94ca32fc4a' \
-H 'Content-Type: application/json' \
-d '{
"projectName": "myFirstAudioProject",
"moduleName": "admodule",
"scriptName": "script1",
"scriptText": "Got my first script created!"
}'
Retrieve uploaded custom audio files
curl --request GET \
--url 'https://v2.api.audio/content/media' \
--header 'Accept: application/json' \
--header 'x-api-key: APIKEY'