AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
AudioMiMo

Speech synthesis

Convert text to speech with MiMo, select a voice and format, and control the delivery style.

Synthesize the specified text using Chat Completions format. Returns Base64 audio in non-streaming JSON or SSE streaming. For model IDs, see MiMo model guide.

POST/v1/chat/completions

Put the text to read in an assistant message. Optionally add a user message to control tone and style. Supports complete JSON and SSE audio deltas, with no polling.

Authorization

bearerAuth
AuthorizationBearer <token>

Use Bearer your-api-key in the Authorization Header.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

Text and voices

FieldUsage
messagesPut the text to read in a role: "assistant" message. An optional role: "user" message can describe tone, pace, or style; its content is not read aloud
audio.voiceSelect a preset voice; defaults to mimo_default. See the parameter list above for available values. Use voice IDs exactly as listed
audio.formatNon-streaming defaults to wav and also supports mp3, pcm, and pcm16. Streaming defaults to pcm; explicitly setting pcm16 is recommended. pcm and pcm16 are equivalent
Style controlDescribe naturalness, softness, or speaking rate in the user message, or add officially supported emotion or style tags to the text to read

Read and play audio

ModeHandling
Non-streamingRead Base64 from choices[].message.audio.data, decode it, and save or play it in the selected format; do not treat it as an audio URL
StreamingParse each SSE data: event, decode each choices[].delta.audio.data separately, and concatenate the audio bytes in order; do not concatenate Base64 strings directly
PCM playbackPCM16 is 24 kHz, mono, 16-bit little-endian audio. Configure playback accordingly, or add a WAV header before saving
CompletionStop at data: [DONE]; also check finish_reason to distinguish normal completion, length limits, and content filtering

Try it provides audio playback and download after the response finishes, with the original JSON or SSE on the right. The browser creates the audio in the current page; download it for long-term storage.

Official references