---
title: "OpenAI-compatible text-to-image (x402 or API-key paid)"
method: POST
path: "/v1/agent/images/generations"
---

# OpenAI-compatible text-to-image (x402 or API-key paid)

`POST /v1/agent/images/generations`

## Request

- Base URL: `https://livepairai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://livepairai.com/v1/agent/images/generations`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - none

OpenAI Images API shape — point an OpenAI-compatible client at this base URL and image generation works unmodified. `model` accepts LivePair image model ids (see models in GET /v1/agent/models); unknown ids return 400 rather than silently swapping models. `size` maps to aspect ratio (1024x1024→1:1, 1792x1024→16:9, 1024x1792→9:16); LivePair extension fields aspectRatio/resolution/imageSize are honored when the model advertises them. Synchronous up to ~100s — past that the response is the standard {status:'running',jobId,poll} handoff; a submitted job that fails later provider-side is not un-charged.

## Request body

- object
  - `prompt` string, required: Image prompt, <=2000 chars
  - `model` string: LivePair image model id — omit for the catalog default (qwen-image-3)
  - `size` '1024x1024' | '1792x1024' | '1024x1792' | '1536x1024' | '1024x1536'
  - `n` number: Only 1 supported
  - `response_format` 'url' | 'b64_json'
  - `aspectRatio` string
  - `resolution` string
  - `imageSize` string
  - `payer` string: Your payer wallet — applies your volume-tier discount (5% at $100+, 10% at $500+, 15% at $2000+ lifetime paid). Must equal the wallet that signs the payment.

## Response `200`

OpenAI images response — {created, data:[{url} | {b64_json}]} (or {status:'running',jobId,poll} past the sync window)

- object
  - `created` number
  - `data` object[]

## Other responses

- `402`: Payment Required — PAYMENT-REQUIRED header carries accepts[] requirements (USDC on Base eip155:8453)

---

[API](https://skmtc.dev/livepairai/apis/private-ai-media-generation-api.md) · [All operations](https://skmtc.dev/livepairai/apis/private-ai-media-generation-api/llms.txt) · [OpenAPI document](https://skmtc.dev/livepairai/apis/private-ai-media-generation-api/revisions/84e74cdf1dbd?raw)
