API DocsAI Model APIsAudioFish Audio

Voice Design

Generate candidate voices from a natural-language prompt. Synchronous endpoint that returns base64-encoded WAV audio.

Generate short voice candidates from a natural-language prompt. Use it to explore a voice direction before a longer TTS workflow or creating a persistent voice model.

Synchronous endpoint: returns candidates immediately—no task polling. Accepts application/json only; MessagePack, multipart, and inline reference audio are not supported. Candidate audio is WAV bytes encoded as base64. Billing is once per successful generation request, not per candidate.

Base URL

  • https://api.autorouter.top — Production

Authentication

BearerAuth: http (bearer) Authenticate using a Bearer Token. Format: Authorization: Bearer sk-xxxxxx

Endpoints

POST /fishaudio/v1/voice-design

Create Voice Design Request

Send a voice description prompt and receive one or more candidate voices with preview audio.

The model: voice-design-1 header is required. Extra request fields are rejected.

Headers

NameTypeRequiredDescription
AuthorizationstringYesRequest authentication. Format: Bearer sk-xxxxxx
Content-TypestringYesMust be application/json
modelstringYesVoice-design model. Must be voice-design-1

Request Body

Content-Type: application/json

Example:

{
  "instruction": "Warm, confident studio narrator with a natural tone",
  "reference_text": "Welcome to Fish Audio.",
  "language": "en",
  "n": 2,
  "speed": 1,
  "num_step": 32,
  "guidance_scale": 2,
  "instruct_guidance_scale": 0,
  "seed": 42
}

Properties:

NameTypeRequiredDefaultDescription
instructionstringYes—Voice design prompt: voice, age, delivery, tone, accent, pacing, and context. 1 to 2000 characters
reference_textstring | nullNonullOptional preview text so candidates read the same line for comparison. Up to 150 characters
languagestring | nullNonullOptional language hint such as en, zh, or ja
nintegerNo2Number of candidates to generate. Range [1, 4]
speednumberNo1.0Speaking speed multiplier. Must be greater than 0 and at most 3
num_stepintegerNo32Diffusion steps. Range [1, 128]
guidance_scalenumberNo2.0Classifier-free guidance. Higher values follow the prompt more strongly. Must be >= 0
instruct_guidance_scalenumberNo0.0Prompt conditioning guidance. Must be >= 0
seedinteger | nullNonullOptional deterministic seed for candidate generation

instructionstring(required)

Primary voice design prompt. Describe the desired voice in natural language, for example:

  • Age and gender lean
  • Delivery and tone (warm, confident, bright)
  • Accent, diction, and pacing
  • Context (studio narration, product update)

Length must be 1 to 2000 characters.

reference_textstring | null(optional)

Preview text. When provided, candidates read that text so you can compare voices on the same line.

  • Keep it short
  • Maximum 150 characters
  • If omitted, candidates are still generated; preview content is model-determined

Responses

200: Generation succeeded

Content-Type: application/json

401: Unauthorized

Content-Type: application/json

402: Insufficient balance

Content-Type: application/json

503: Service overloaded

Content-Type: application/json

Request examples

curl --request POST "https://api.autorouter.top/fishaudio/v1/voice-design" \
  --header "Authorization: Bearer sk-xxxxxx" \
  --header "Content-Type: application/json" \
  --header "model: voice-design-1" \
  --data '{
  "instruction": "Warm, confident studio narrator with a natural tone",
  "reference_text": "Welcome to Fish Audio.",
  "language": "en",
  "n": 2,
  "speed": 1,
  "num_step": 32,
  "guidance_scale": 2,
  "instruct_guidance_scale": 0,
  "seed": 42
}'

Response examples

{
  "candidates": [
    {
      "id": "candidate-id",
      "index": 0,
      "audio_base64": "UklGRg...",
      "sample_rate": 44100,
      "duration_ms": 3100,
      "text": "Welcome to Fish Audio.",
      "language": "en"
    }
  ]
}

Response fields:

NameTypeDescription
candidatesobject[]Generated voice candidates
candidates[].idstringStable candidate identifier for this response
candidates[].indexintegerCandidate index to preserve model order, starting at 0
candidates[].audio_base64stringBase64-encoded WAV audio; decode and write to a file
candidates[].sample_rateintegerSample rate in Hz
candidates[].duration_msintegerAudio duration in milliseconds
candidates[].textstring | nullPreview text for this candidate, when available
candidates[].instructstring | nullInstruction text for this candidate, when available
candidates[].languagestring | nullDetected or requested language, when available

The endpoint is stateless: it does not create batches, samples, voice models, or presigned URLs. Use decoded audio for preview; to persist a reusable voice, call Create Model.

Error handling

HTTP 400 parameter errors (blocked before upstream; not billed)

AutoRouter validates required fields before forwarding upstream:

ScenarioResponse
Missing instruction{"code":"InvalidParameter","message":"...","request_id":"..."}
Missing or invalid model header{"code":"InvalidParameter","message":"...","request_id":"..."}
MessagePack / multipart / extra fieldsRequest rejected

Authentication errors, validation errors, insufficient credit, concurrency limits, upstream errors, and empty candidate responses are not billed.

HTTP 401 / 403 authentication errors

  • 401 Unauthorized: Invalid or expired API key
  • 403 Forbidden: API key is not allowed to access this model (check the token model allowlist)

HTTP 402 insufficient balance

Returns insufficient user quota. Top up in the AutoRouter console.

HTTP 503 service overloaded

The server is under high load and cannot process the request. Retry later.

On this page