text_to_image
Generate images from English text prompts via RunAPI, returning a task ID, status, and output URLs for tracking results and downloads.
Instructions
Create a Flux Kontext task on RunAPI (text to image). Returns a task id, status, and output URLs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "text_to_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Poll until the task reaches a terminal status. | |
| model | No | RunAPI model slug for this model line. | |
| prompt | Yes | Image description (English only). Declared type: string. | |
| watermark | No | Watermark identifier. Declared type: string. | |
| timeout_ms | No | ||
| aspect_ratio | No | Output aspect ratio. Default: 16:9. Declared type: string. Known values: "21:9", "16:9", "4:3", "1:1", "3:4", "9:16". | |
| callback_url | No | Webhook URL for async notifications. Declared type: string. | |
| output_format | No | Output format. Default: jpeg. Declared type: string. Known values: "jpeg", "png". | |
| poll_interval_ms | No | ||
| safety_tolerance | No | Content safety threshold. 0-6 for generation, 0-2 for editing. Default: 2. Declared type: integer. | |
| source_image_url | No | Source image URL for editing mode. Declared type: string. | |
| enable_translation | No | Auto-translate non-English prompts. Default: true. Declared type: boolean. | |
| enable_prompt_expansion | No | Expand the prompt with more detail. Default: false. Declared type: boolean. |