How to Authenticate with the AudioStack API

All requests must be made over HTTPS and will usually be authenticated using an API key. To create your first API Key, please create an account at platform.audiostack.ai.

Where can I find my API key?

Your API key can be found under Developers in the Platform navigation, in the AudioStack for Developers page, by clicking Generate API key. Your API key is specific to you as a user, so if you regenerate it, this won't change anyone else's API key in your organisation. Make sure you store it somewhere safe, like a password manager, as you cannot retrieve the same API key more than once in the Platform, only generate a new one (which will mean you have to update your code to use the latest key).

🚧

Shhh! Keep your API key a secret 🫣

API keys are like passwords. They should not be added to client-side code or checked into your application's code, including in Github repositories.

import audiostack  
import os

audiostack.api_key = os.environ["AUDIO_STACK_DEV_KEY"]

If you're using the AudioStack Python SDK, you can include your API key in any Python scripts you create just like this. This allows AudioStack to identify you, so you can access private content such as sound templates and cloned voices that are specific to your user account or organisation. It's also how we track how many credits you're using.

What if I'm a member of multiple organisations?

If you're a member of multiple organisations, you'll be able to access content and use AudioStack from each of those organisations, according to your permissions. You might need to assume an organisation to do this - find out more.

Errors

See Errors for more information about HTTP errors.


What’s Next

Have a read of some of the other tutorials