Skip to main content
The MKA1 API can return text, audio, and images. Text is the default output modality. Use modalities and audio to enable speech output, or add the image_generation tool to produce images.

Supported output types

Generate audio (text-to-speech)

Request audio output by setting modalities to {"text", "audio"} and specifying a voice and format in the audio parameter. The response includes both the text transcript and base64-encoded audio data.

Audio configuration

Audio is synthesized at 24 kHz, 16-bit mono.
The response contains an output_audio item with the base64-encoded audio and a transcript of what was spoken:
The data field contains the full audio file (268 KB in this example). The transcript field contains the text the model chose to speak — which may differ slightly from the text output.

Save audio to a file

Supported languages

Audio output supports automatic language detection and 20+ languages including English, Chinese, Hindi, Spanish, Arabic, Bengali, Portuguese, Russian, Japanese, Punjabi, German, Korean, French, Turkish, Italian, Thai, Polish, Dutch, Indonesian, Vietnamese, and Urdu.

Generate images

Use the image_generation tool to create images from text prompts. The model interprets your message, generates a prompt for the image model, and returns the result.

Image generation models

Image generation options

The response includes an image_generation_call item with the generated image URL and the revised prompt used by the image model:
The result field contains a URL to the generated image. The revised_prompt shows the expanded prompt the image model used — the LLM enhances your brief instruction into a detailed image description.

Force image generation

Use tool_choice to ensure the model generates an image rather than responding with text only.

Image output structure

The response output array contains these items when an image is generated:
  1. function_call — the model’s call to the image generation tool with the refined prompt
  2. image_generation_call — the generation result with status: "completed" and result (image URL)
  3. function_call_output — the raw tool output containing the URL
  4. message — the model’s text response describing or referencing the image
Image URLs expire after 1 hour. Download or cache them if you need long-term access.

Standalone APIs

For direct access without going through the Responses API, MKA1 also provides standalone endpoints:

Text-to-speech API

The Text-to-speech endpoint returns binary audio (audio/wav) and an X-Language-Code response header. If you set store: true, the response also includes an X-Tts-Id header containing the stored history record ID.

Images API

Next steps