Generate an image from a text prompt

$0.02 per call · failed calls are never charged · no account or API key needed

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.

Run it free (25 free calls) Buy credits by card (from $5) Example result (JSON)

Inputs

NameTypeDescription
prompt (required)stringWhat the image should show (3-800 characters)
stepsintegerDiffusion 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

Related tools