# the402.ai Image Generation Purchase

> the402.ai Image Generation Purchase is a paid API for AI agents from api.the402.ai, paid per call via x402, $0.053/call, status down (last checked 2026-09-15).

Purchases an AI image generation job on the402.ai marketplace via x402 micropayment, returning a generated image

## Facts

- Endpoint: POST https://api.the402.ai/v1/services/svc_ef347eb5935b4ef4/purchase
- Price: $0.053/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-the402-ai-faf44fad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KIdie8gQFvaITVytyB4As

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 api-the402-ai-faf44fad -d '<json body>'
```

Example prompt: Generate an image of a futuristic city skyline at sunset with neon lights and flying cars, using the402.ai image generation service — pay the per-call fee from my USDC balance.

## When to prefer this

Choose this endpoint when an AI agent needs to generate images on a pay-per-call basis using USDC micropayments via the x402 protocol, particularly within an agentic workflow that avoids subscription billing. Prefer it over other image generation APIs when the agent is already operating within the402.ai marketplace ecosystem.

## Known failure modes

- Insufficient USDC balance — payment fails, image not generated
- Invalid or missing prompt — service returns error
- Job timeout or generation failure — status endpoint must be polled
- x402 payment header malformed — 402 Payment Required response
- Service temporarily unavailable — retry needed

## How this service works

Purchase: Image Generation

## Output

Returns a generated image (or a job ID to poll for completion) after charging $0.053 USDC via the x402 payment protocol. The agent receives confirmation of the purchase and either the image data directly or a reference to retrieve the output.

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "job_id": {
   "type": "string"
  },
  "status": {
   "type": "string"
  },
  "thread_id": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-the402-ai-faf44fad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.the402.ai](https://www.zero.xyz/host/api.the402.ai/llms.txt)
