Get Your API Key
Create a Fish Audio account
Create a Fish Audio account
Sign up for a free Fish Audio account to get started with our API.
- Sign up on fish.audio
- Fill in your details to create an account, complete steps to verify your account.
- Log in to your account and open Get Started
Get your API key
Get your API key
Once you have an account, you’ll need an API key to authenticate your requests.
- Log in and open Get Started
- Click “Get your API key”: the key is created in one click and shown only once
- Copy your key and store it securely
Client Initialization
Initialize theFishAudio client with your API key:
Install the Python SDK first: pip install fish-audio-sdk.
- Environment Variable (Recommended)
- Direct API Key
- Custom Base URL
The most secure approach is using environment variables:Set the environment variable in your shell:Or create a Then load it using
.env file in your project root:python-dotenv:Verifying Authentication
Test your authentication by making a simple API call to check your account credits:AuthenticationError when verifying authentication. The example uses get_credits() to verify the authentication works.
Next Steps
Text-to-Speech
Generate speech with the authenticated client
Voice Cloning
Clone voices and create custom models
Account Management
Check credits and manage your account
Error Handling
Handle authentication errors properly

