# OneCent Pay-Per-Image

> OneCent Pay-Per-Image is a paid API for AI agents from onecent-x402-pw76aqweia-uc.a.run.app, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-10).

Generates a single AI image from a text prompt with a $0.03 USDC micropayment on Base, returning a base64-encoded JPEG.

## Facts

- Endpoint: POST https://onecent-x402-pw76aqweia-uc.a.run.app/generate?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onecent-pay-per-image-c6424dc9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vqFxDlEdg7S6gpCqX_7IG

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 onecent-pay-per-image-c6424dc9 -d '<json body>'
```

Example prompt: Generate an AI image of a serene Japanese tea garden at sunrise in 16:9 widescreen format — pay the USDC micropayment automatically.

## When to prefer this

Choose this endpoint when you need a single on-demand AI image with no subscription or API key setup — just a $0.03 USDC micropayment on Base. Ideal for agents that generate images infrequently or on a per-task basis, where pay-per-call economics are preferable to a monthly plan. Prefer this over subscription image APIs when cost predictability at the individual-call level matters, or when the agent environment already has a Base wallet configured for x402 payments.

## Known failure modes

- Payment failure — insufficient USDC balance or wallet not configured causes a 402 error before generation begins
- Invalid aspect ratio — supplying a ratio not in the allowed enum returns a validation error
- Empty or missing prompt — no prompt provided results in a bad request error
- Generation timeout — model takes too long and the request times out with a 5xx error
- Base64 decoding issues — malformed response if the upstream model returns an unexpected format

## How this service works

Pay-per-call image generation. One USDC micropayment on Base returns one AI image (gemini-3-pro-image class) as base64 JPEG.

## Output

A JSON object containing a single field `b64_json` with the full base64-encoded JPEG of the generated image. The agent must decode this string to obtain the raw image bytes for display, storage, or downstream processing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "prompt": {
   "type": "string",
   "description": "Text prompt for the image"
  },
  "aspect_ratio": {
   "type": "string",
   "description": "One of 1:1,4:3,3:4,16:9,9:16,3:2,2:3"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "b64_json": "<base64-encoded JPEG>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onecent-pay-per-image-c6424dc9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from onecent-x402-pw76aqweia-uc.a.run.app](https://www.zero.xyz/host/onecent-x402-pw76aqweia-uc.a.run.app/llms.txt)
