Quickstart
Create an API key and generate your first speech audio.
Quickstart
This page helps you complete a real text-to-speech request quickly. Start with synchronous TTS because it returns audio directly and is the easiest path to test.
1. Create an API Key
Create an API key in your FishSpeech account:
The full API key is shown only once. Store it in a server-side environment variable. Do not ship it in browser code, mobile apps, or public repositories.
export FISHSPEECH_API_KEY="YOUR_API_KEY"2. Choose a Voice
List voices available to your account:
curl "https://fishaudio.org/api/open/v1/voices" \
-H "Authorization: Bearer $FISHSPEECH_API_KEY"Copy the returned voice id and use it as voiceId.
3. Generate Speech
curl -X POST "https://fishaudio.org/api/open/v1/speech/tts" \
-H "Authorization: Bearer $FISHSPEECH_API_KEY" \
-H "Content-Type: application/json" \
-o speech.audio \
-d '{
"text": "Hello from FishSpeech.",
"voiceId": "YOUR_VOICE_ID"
}'If the request succeeds, speech.audio is saved in your current directory. Use the response Content-Type header to choose the final file extension.
Next Steps
| Need | Read |
|---|---|
| Choose sync, async, or batch-like flows | Choose an API |
| Read endpoint contracts | API Reference |
| Understand authentication | Authentication |
| Generate speech | Text to Speech |
| Test requests in the browser | API Playground |
Continue with runnable API checks
Docs and executable requests stay in the same CN-site surface. After reading the reference, open the API Playground for curl examples or manage API keys in the developer workspace.