text_to_image
Generate Flux 2 images from a text prompt on RunAPI; get a task ID, status, and output URLs.
Instructions
Create a Flux 2 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. Declared type: string. | |
| timeout_ms | No | ||
| aspect_ratio | No | Output aspect ratio. Declared type: string. Known values: "1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3". | |
| callback_url | No | Webhook URL for async notifications. Declared type: string. | |
| output_count | No | Number of images to generate. Declared type: integer. Known values: 1. | |
| poll_interval_ms | No | ||
| output_resolution | No | Output resolution. Declared type: string. Known values: "1k", "2k". | |
| enable_safety_checker | No | Enable the safety checker. Declared type: boolean. |