Generate an image from a text prompt
Text-to-image generation with FLUX.1 schnell. Send a prompt, get a 1024x1024 JPEG back as base64 in a few seconds. Use for illustrations, thumbnails, mockups, avatars and social media images. Optional steps parameter (1-8, default 4) trades speed for detail.
Inputs
| Name | Type | Description |
|---|---|---|
prompt (required) | string | What the image should show (3-800 characters) |
steps | integer | Diffusion steps, 1-8 (default 4) |
Request
Over HTTP, with a card key from /credits:
curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/image?prompt=a%20lighthouse%20on%20a%20cliff%20at%20sunset%2C%20watercolor"
Or one of your 25 free calls, no key:
curl "https://agent-data-tools.revmesh2074.workers.dev/image?prompt=a%20lighthouse%20on%20a%20cliff%20at%20sunset%2C%20watercolor&trial=1"
Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum, Monad, World Chain or Tempo) and retries.
Example result
{
"prompt": "a lighthouse on a cliff at sunset, watercolor",
"steps": 4,
"model": "@cf/black-forest-labs/flux-1-schnell",
"contentType": "image/jpeg",
"imageBase64": "/9j/4AAQSkZJRgABAQAAAQABAAD..."
}
From an AI agent (MCP)
Add the MCP server to Claude, Cursor or any MCP client. This tool is image, and the first 25 successful calls are free:
https://agent-data-tools.revmesh2074.workers.dev/mcp