Skip to main content
The fastest path from zero to playable audio with the official Fish Audio SDKs. By the end you’ll have a script that turns text into an MP3.
The Python SDK is the recommended starting point and is fully covered below. The JavaScript SDK is in early release. See the JavaScript SDK guide for its current surface.

1. Install

2. Authenticate

Sign up for a free Fish Audio account to get started with our API.
  1. Sign up on fish.audio
  2. Fill in your details to create an account, complete steps to verify your account.
  3. Log in to your account and open Get Started
Once you have an account, you’ll need an API key to authenticate your requests.
  1. Log in and open Get Started
  2. Click “Get your API key”: the key is created in one click and shown only once
  3. Copy your key and store it securely
Keep your API key secret! Never commit it to version control or share it publicly.
Both SDKs read your key from the FISH_API_KEY environment variable:

3. Generate your first audio

Run it, and you’ll have output.mp3 (Python) or local playback (JavaScript).
Want async in Python? Every method mirrors onto AsyncFishAudio: async with AsyncFishAudio() as client: audio = await client.tts.convert(text="...", model="s2.1-pro-free").

Next steps

Text-to-Speech

Voices, formats, prosody, and model selection

Voice Cloning

Instant cloning and persistent voice models

Realtime WebSocket

Stream LLM tokens to speech as they arrive

Errors & Retries

Exception types, retries, and timeouts

Cookbook

Task-focused recipes

API Reference

Full Python SDK reference