# x-402 Text-to-Image Generator (FLUX.1 schnell)

> x-402 Text-to-Image Generator (FLUX.1 schnell) is a paid API for AI agents from api.x-402.online, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-02).

Generates a 1024x1024 JPEG image from a text prompt using FLUX.1 schnell, returned as a base64 data URL, pay-per-call with no account required.

## Facts

- Endpoint: GET https://api.x-402.online/v1/image?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-402-text-to-image-generator-flux-1-schnell-b417624a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rm2fOw9vxRF-G7pFTHp38

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 x-402-text-to-image-generator-flux-1-schnell-b417624a
```

Example prompt: Generate an image of a photorealistic golden retriever running on a sun-drenched beach at sunset.

## When to prefer this

Choose this endpoint when you need fast (≈4 second), pay-per-call text-to-image generation with no account setup, API key, or subscription — ideal for agents that generate images infrequently or on-demand and want to pay only per use in USDC via the x402 protocol. Prefer this over subscription-based image APIs when cost predictability per call and zero onboarding friction matter.

## Known failure modes

- Empty or missing prompt returns an error
- Payment not received or insufficient USDC results in 402 Payment Required
- Model timeout if generation exceeds expected latency window
- Invalid HTTP method (non-GET) returns 405 Method Not Allowed
- Prompt content policy violation may result in refusal or error

## How this service works

Turn a text prompt into a 1024x1024 JPEG in about four seconds. Text-to-image generation pay-per-call, no account and no API key: send a prompt, receive a 1024x1024 JPEG as a base64 data URL in about four seconds (FLUX.1 schnell). Photorealistic scen…

## Output

Returns a JSON object containing a 1024x1024 JPEG image encoded as a base64 data URL, generated in approximately four seconds using the FLUX.1 schnell model. The image reflects the text prompt supplied by the caller.

## 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": [
      "GET"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x-402-text-to-image-generator-flux-1-schnell-b417624a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x-402.online](https://www.zero.xyz/host/api.x-402.online/llms.txt)
