Use this file to discover all available pages before exploring further.
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.
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.
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.
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.
mka1 llm responses create --body '{ "model": "auto", "input": "Generate an image of a sunset over a mountain lake.", "tools": [ { "type": "image_generation", "model": "auto", "quality": "high", "size": "1024x1024", "output_format": "png" } ]}'
The response includes an image_generation_call item with the generated image URL and the revised prompt used by the image model:
{ "status": "completed", "output": [ { "type": "message", "role": "assistant", "content": [ { "type": "output_text", "text": "I'll generate an image of a beautiful sunset over a mountain lake for you." } ] }, { "type": "image_generation_call", "id": "ig_abc123", "status": "completed", "result": "<Generated Image URL>", "revised_prompt": "A breathtaking sunset over a pristine mountain lake, with golden and orange hues reflecting on the calm water surface. Snow-capped mountain peaks in the background, dramatic clouds in the sky with vibrant sunset colors of pink, purple, and orange.", "size": "auto", "quality": "auto", "output_format": "png" } ]}
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.
Use tool_choice to ensure the model generates an image rather than responding with text only.
mka1 llm responses create --body '{ "model": "auto", "input": "A red circle on a white background.", "tools": [{ "type": "image_generation" }], "tool_choice": { "type": "image_generation" }}'