# Gambit Image Generation (x402 USDC on Base)

> Gambit Image Generation (x402 USDC on Base) is a paid API for AI agents from gambit.barrioenergy.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Generates images from a text prompt using GPU-accelerated inference, billed at $0.02 USDC per call via x402 on Base.

## Facts

- Endpoint: POST https://gambit.barrioenergy.com/x402/images/generate
- 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/gambit-image-generation-x402-usdc-on-base-ae6c54ba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rAMLdFPR64FKEI6T1CZR5

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 gambit-image-generation-x402-usdc-on-base-ae6c54ba -d '<json body>'
```

Example prompt: Generate an image of a futuristic cyberpunk cityscape at night with neon reflections on wet streets — 1024x1024 pixels, 4 diffusion steps.

## When to prefer this

Choose this endpoint when you need pay-per-call image generation billed in USDC on Base via the x402 protocol, with no subscription or API key signup required for bots. At $0.02 per image it is cost-effective for low-to-medium volume generation. Prefer it over alternatives when your agent workflow already handles x402 micropayments on Base, or when you want GPU-backed fast inference without managing a standing account.

## Known failure modes

- Insufficient USDC balance or failed x402 payment — returns 402 Payment Required
- Invalid or missing prompt — returns 400 Bad Request
- Width or height values outside supported range — returns 400 with dimension error
- Server-side GPU timeout or overload — returns 503 Service Unavailable
- Malformed JSON body — returns 400 parse error

## How this service works

Gambit GPU shop. Humans: /signup ($1 credit), X-API-Key on /v1/*, QR Lightning top-up. Bots: L402 Lightning (LIVE) on /l402/*, x402 USDC on Base on /x402/*, or POST /v1/register ($0) then POST /v1/topup/lightning. Handwritten letter POST /x402/letter at $25.00 USDC. Funnel https://gambit.barrioenergy.com. Free probe GET|POST /x402/models.

## Output

Returns a JSON object with a content_type field set to 'image/png' and the generated image as binary PNG data. The image is produced at the requested width and height (default 1024x1024) with the specified number of diffusion steps (default 4).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "steps": {
   "type": "integer",
   "default": 4
  },
  "width": {
   "type": "integer",
   "default": 1024
  },
  "height": {
   "type": "integer",
   "default": 1024
  },
  "prompt": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "content_type": "image/png"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gambit-image-generation-x402-usdc-on-base-ae6c54ba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gambit.barrioenergy.com](https://www.zero.xyz/host/gambit.barrioenergy.com/llms.txt)
