ai_image
AI image generator (text to image) — Generate an image from a text prompt with FLUX.1 [schnell] on Workers AI: returns a 1024x1024 JPEG as base64 plus a ready data: URL. Params: prompt= (required, up to 2000 chars), steps= (1-8, default 4). Prompts are screened by Llama Guard; flagged prompts return 400 and are not charged. Apache-2.0 model, images usable commercially. For the OpenAI-compatible version POST /v1/images/generations. Price: $0.02 USDC (Base, via x402).
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": "ai_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | A minimalist flat logo of a paper airplane, blue and white |