Skip to main content
POST

Billing

Billed in USD per million input characters. Current prices are listed on the Modellix Pricing Page.
  • Single speaker: Count Unicode characters in text.
  • Two speakers: Sum Unicode characters in all turns[].text, without adding separators.
  • style, speaker names, voice names, and language_code are excluded from the character count.

Authorizations

Authorization
string
header
required

Modellix API Key. Format: Bearer <your_api_key>

Body

application/json

Gemini 3.8 Flash TTS request. Single-speaker calls send text and voice, with optional style and language_code, and omit speakers and turns. Two-speaker calls send speakers (exactly 2) and turns, and must omit top-level text, voice, and style. style is delivery direction and is not spoken. text is the verbatim transcript. The combined text and trimmed style across the request must not exceed 8,192 Unicode characters. The 3.1 prompt field is not supported. For single-speaker synthesis, voice accepts a prebuilt name (such as Kore or Puck), an extended voice-library ID, or a voice_ / voicekey_ ID. Voice creation and management are not part of this endpoint.

text
string

Verbatim transcript for single-speaker synthesis. Required in single-speaker mode. Do not include stage directions here. Inline vocal events use angle brackets. Together with style, the request must stay within 8,192 characters.

Required string length: 1 - 8192
Example:

"Have a wonderful day!"

style
string

Optional single-speaker delivery direction (emotion, pace, tone). Not spoken aloud. Max 8,192 characters, counted together with text.

Maximum string length: 8192
Example:

"cheerful and friendly"

language_code
string

Optional BCP-47 language tag in lowercase. Examples: en-us, cmn-cn, ja-jp. The model can also detect the language from the transcript.

Pattern: ^[a-z]{2,3}(-[a-z0-9]+)*$
Example:

"en-us"

voice
string

Required for single-speaker synthesis. Prebuilt voice name, extended voice-library ID, or a designed/replicated voice ID (voice_... or voicekey_...). No spaces. Max 256 characters.

Required string length: 1 - 256
Example:

"Kore"

speakers
object[]

Required for two-speaker synthesis. Exactly two speakers. Omit this field for single-speaker calls.

Required array length: 2 elements
turns
object[]

Required for two-speaker synthesis. One object per spoken turn, in order. Each speaker must match a name in speakers, case-sensitively. All turns produce one WAV file. The sum of all turn text and trimmed style must stay within 8,192 Unicode characters.

Minimum array length: 1

Response

Task submitted successfully. Poll GET /api/v1/tasks/{task_id} until the task completes; synthesized audio is returned on the task result.

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required

Task submission details. Poll GET /api/v1/tasks/{task_id} until status is success; audio appears in result.resources with type audio and format wav.