# OpenAI gpt-image-1 Image Generation (x402)

> OpenAI gpt-image-1 Image Generation (x402) is a paid API for AI agents from openai.mm.family, paid per call via x402, $0.005973/call, status unknown (last checked 2026-10-02).

Generates images from text prompts using OpenAI's gpt-image-1 model, paid per call in USDC via x402 protocol, returning base64-encoded PNG/JPEG/WebP images.

## Facts

- Endpoint: POST https://openai.mm.family/x402/v1/models/gpt-image-1/images/generations?utm_source=zero.xyz
- Price: $0.005973/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openai-gpt-image-1-image-generation-x402-86f97fdb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pGI7345Jb3NHFY8gXguCz

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 openai-gpt-image-1-image-generation-x402-86f97fdb -d '<json body>'
```

Example prompt: Generate a high-quality 1024x1024 image of a serene Japanese zen garden at sunrise with cherry blossom trees, and give it back to me as a PNG.

## When to prefer this

Choose this endpoint when you need OpenAI's gpt-image-1 model specifically via a pay-per-call USDC micropayment (x402) flow without managing an OpenAI API key subscription. Ideal for agents that need on-demand image generation billed in crypto, or for applications that want to call OpenAI image generation programmatically without monthly billing commitments. Prefer the gpt-image-1-mini sibling for lower-cost drafts, or gpt-image-1.5/2/2.5 siblings for higher capability. Use this over generic OpenAI endpoints when you need transparent per-call USDC pricing.

## Known failure modes

- Prompt refused by content moderation — returns error if prompt violates OpenAI content policy
- 'auto' quality value rejected — must explicitly specify low, medium, or high
- Missing size parameter may default to 1024x1024 medium but behavior may be undefined
- Insufficient USDC balance or x402 payment failure results in 402 Payment Required
- Invalid output_format enum value returns validation error
- Rate limiting if too many concurrent requests are made

## How this service works

gpt-image-1: OpenAI GPT Image 1 image generation, paid per call in USDC. OpenAI list $40 per 1M image tokens (1024x1024: low 272, medium 1056, high 4160 tokens), text in $5 per 1M, plus $0.0005 (Base) or $0.0005 (Solana) per call. Send size and quality (auto is refused); omitted means 1024x1024 medium. Returns b64_json. Rates: https://openai.mm.family/x402/pricing

## Output

Returns a JSON object containing an array of generated images encoded as base64 strings (b64_json), along with metadata including image size, quality setting, output format, creation timestamp, and token usage breakdown (input tokens, output tokens, total tokens).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "n": {
   "type": "integer"
  },
  "size": {
   "type": "string"
  },
  "model": {
   "enum": [
    "gpt-image-1"
   ],
   "type": "string"
  },
  "prompt": {
   "type": "string"
  },
  "quality": {
   "enum": [
    "low",
    "medium",
    "high"
   ],
   "type": "string"
  },
  "background": {
   "type": "string"
  },
  "moderation": {
   "enum": [
    "auto"
   ],
   "type": "string"
  },
  "output_format": {
   "enum": [
    "png",
    "jpeg",
    "webp"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "b64_json": "<base64 png>"
   }
  ],
  "size": "1024x1024",
  "usage": {
   "input_tokens": 12,
   "total_tokens": 208,
   "output_tokens": 196
  },
  "created": 1,
  "quality": "low",
  "output_format": "png"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openai-gpt-image-1-image-generation-x402-86f97fdb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from openai.mm.family](https://www.zero.xyz/host/openai.mm.family/llms.txt)
