Seed TTS is a unidirectional streaming HTTP endpoint. Request fields, voices, and audio parameters follow the compatible provider format; authentication and billing follow Kaien API rules.

Endpoint

Use Authorization: Bearer with your Kaien API key. Do not send the provider’s X-Api-Key header.

Minimal request

Available resource IDs include seed-tts-2.0 and seed-icl-2.0 when the account has the corresponding capability. Confirm access with the model list and account configuration.

Reading the stream

The endpoint returns multiple JSON objects through HTTP chunked transfer. Each object’s data field contains base64 audio. Decode the chunks in order and concatenate the bytes before writing the final audio file. A successful stream usually starts with code: 0 and ends with 20000000. Treat other non-zero codes as errors and preserve the complete response for diagnosis.

Integration notes

  • A single request accepts at most 200 Unicode characters, including punctuation and spaces.
  • Split longer text into sentences and send multiple requests.
  • Keep the API key on your server.
  • Use the provider’s voice list for valid speaker IDs.
  • Usage is billed per request; preserve the model or resource ID in your request log.