Generate image from text prompt: AI image generation, a JPEG in seconds

$0.03 per call · failed calls are never charged · no account or subscription: pay per call with a card key or USDC

Generate an image from a text prompt with FLUX.1 schnell: send a prompt, get a 1024x1024 JPEG back as base64 in a few seconds, with an optional steps setting (1-8) for more detail. Use for illustrations, thumbnails, mockups, avatars, product shots and social media images inside an agent workflow.

Buy credits by card (from $1) 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/generate?prompt=a%20lighthouse%20on%20a%20cliff%20at%20sunset%2C%20watercolor"

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 or Solana over x402; Base or Tempo over MPP) 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_generate, and the first 25 successful calls are free:

https://agent-data-tools.revmesh2074.workers.dev/mcp

Related tools