FishSpeech Docs
API ReferenceSpeech to Text

Speech to Text

Transcribe audio through the Open API.

Speech to Text

Speech to Text converts an audio URL into text and optional segment metadata. Use it for uploaded audio, call recordings, creator workflows, and backend transcription jobs.

POST /api/open/v1/speech/transcriptions
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

Request

{
  "audioUrl": "https://example.com/audio.mp3",
  "language": "en"
}

audioUrl must be reachable by the API service. If your files are private, generate a short-lived signed URL that remains valid long enough for processing. language is optional. Use a language hint such as en, zh, or ru when you know the source language.

curl https://fishaudio.org/api/open/v1/speech/transcriptions \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"audioUrl":"https://example.com/audio.mp3","language":"en"}'

Response

{
  "text": "This is the transcription result.",
  "duration": 12.4,
  "segments": [],
  "credits_used": 13,
  "quota_remaining": 987987
}

Segment shape can vary by model and account capability. Your parser should treat segment metadata as optional and use text as the primary result.

Billing And Credits

Transcription typically charges by audio duration. Validate file duration on your side when possible, especially before submitting user-uploaded recordings. If your product allows many uploads at once, queue jobs and check account balance between batches.

When a request fails before audio processing starts, credits should not be treated the same as a completed transcription. Use response fields and profile checks for operational reconciliation.

Errors

StatusMeaningAction
400Invalid URL, unsupported audio, or malformed JSONFix the request
401Token is missing or invalidRefresh credentials
402Credits or quota are insufficientStop the batch
422Audio was reachable but could not be processedAsk the user for a different file
500Transcription service failedRetry with backoff if the URL remains valid

On this page