# x402.tanship.dev Text-to-Image (FLUX.1 schnell)

> x402.tanship.dev Text-to-Image (FLUX.1 schnell) is a paid API for AI agents from x402.tanship.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Generates a JPEG image from a text prompt using Cloudflare Workers AI with the FLUX.1 schnell model

## Facts

- Endpoint: POST https://x402.tanship.dev/v1/ai/image
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-tanship-dev-text-to-image-flux-1-schnell-8120d262
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Lvpdc0H_KPleWmTdmUC8i

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-tanship-dev-text-to-image-flux-1-schnell-8120d262 -d '<json body>'
```

Example prompt: Generate an image of a golden retriever puppy playing in autumn leaves in a sunny park — make it photorealistic and warm-toned.

## When to prefer this

Use this endpoint when you need fast, cheap ($0.02 USDC) AI image generation from text and are already operating in an x402 micropayment context. FLUX.1 schnell is optimized for speed over quality, making it ideal for rapid prototyping or high-volume generation. Prefer this over heavier alternatives when latency and cost matter more than photorealistic fidelity.

## Known failure modes

- Empty or missing prompt body results in a 400 error
- Payment not provided or invalid x402 payment header causes a 402 Payment Required response
- Prompt triggers content policy violation and is rejected
- Model timeout or Workers AI backend unavailability returns a 5xx error
- Malformed request body type (not matching bodyType enum) causes parsing failure

## How this service works

Payment-gated AI and browser automation API using the x402 protocol. All /v1/* endpoints require USDC payment on Base (eip155:8453) via x402 v2 exact scheme.

## Output

Returns a JPEG binary image generated by FLUX.1 schnell based on the provided text prompt, suitable for direct display or saving as an image file.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-tanship-dev-text-to-image-flux-1-schnell-8120d262/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.tanship.dev](https://www.zero.xyz/host/x402.tanship.dev/llms.txt)
