# GPT Mini API (Pay-per-call Chat Completions)

> GPT Mini API (Pay-per-call Chat Completions) is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.005069/call, status unknown (last checked 2026-10-01).

Pay-per-call OpenAI-format chat completions using GPT-4o-mini via OpenRouter, with no API key required — billed per request via x402 micropayment.

## Facts

- Endpoint: GET https://x402.agentindex.world/llm/gpt-mini?utm_source=zero.xyz
- Price: $0.005069/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gpt-mini-api-pay-per-call-chat-completions-5d2edb1c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QziYfwCl2JaGOzG0DjG92

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 gpt-mini-api-pay-per-call-chat-completions-5d2edb1c
```

Example prompt: Ask the AI: 'What are three creative names for a coffee brand focused on sustainability?' — use up to 200 tokens for the response.

## When to prefer this

Choose this endpoint when you need a quick, keyless GPT-4o-mini chat completion without setting up an OpenAI account or managing API credentials. Ideal for agents that make infrequent or unpredictable LLM calls and want transparent per-call USDC pricing with a known cost ceiling set by max_tokens. Not suitable for streaming responses, long context windows beyond 4096 tokens, or high-volume workloads where a direct OpenAI subscription would be cheaper.

## Known failure modes

- 20-second server-side timeout fires — request is never charged but the client receives no completion
- max_tokens exceeds 4096 cap — request may be rejected or clamped
- Malformed messages array (missing role or content) — likely a 4xx validation error
- Payment failure or insufficient USDC balance — x402 payment rejected before processing
- Network timeout on client side if client timeout is set below 30s — client should use 30s minimum

## How this service works

GPT Mini API - pay per call, no API key. OpenAI-format chat completions on openai/gpt-5.4-mini, pinned to OpenAI's own OpenRouter endpoint for reliability. You sign a fixed price computed from your max_tokens; unused tokens are not refunded. 20s server-side timeout - never charged if it fires; set your client timeout to 30s. Try GET /llm/gpt-mini/sample.

## Output

Returns an OpenAI-format chat completion object containing the assistant's generated reply text, finish reason, and token usage details. The response mirrors the standard OpenAI /v1/chat/completions response shape.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "messages": {
   "type": "array",
   "items": {
    "type": "object"
   },
   "minItems": 1,
   "description": "OpenAI-format chat messages: [{role, content}, ...]."
  },
  "max_tokens": {
   "type": "integer",
   "description": "Max completion tokens, capped at 4096 - also bounds the price ceiling."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gpt-mini-api-pay-per-call-chat-completions-5d2edb1c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
