# x402 Pay-Per-Call LLM Chat Completion

> x402 Pay-Per-Call LLM Chat Completion is a paid API for AI agents from x402-services-production.up.railway.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Provides OpenAI-compatible LLM chat completion via multiple fast models, payable per-call in USDC/USDG with no accounts or API keys required.

## Facts

- Endpoint: POST https://x402-services-production.up.railway.app/api/ai/chat
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-pay-per-call-llm-chat-completion-bec30d9e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D0pwiknwQyCwjWjvWdSPl

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 x402-pay-per-call-llm-chat-completion-bec30d9e -d '<json body>'
```

Example prompt: Ask the AI to summarize the following text using gpt-4o-mini — no API key needed, just pay per call: 'The Amazon rainforest is the world's largest tropical rainforest, covering over 5.5 million square kilometers.'

## When to prefer this

Prefer this endpoint when your agent needs LLM chat completion without managing API keys or accounts, especially in automated or pay-per-use pipelines where micropayment-per-call is preferable to subscription billing. Ideal for multi-model flexibility (GPT-4o-mini, Gemini, Llama, Mistral, DeepSeek) via a single OpenAI-compatible interface, and when paying with USDC or USDG stablecoins is convenient or required.

## Known failure modes

- Payment not received or insufficient — request rejected before processing
- Input exceeds 8,000 character limit — truncation or rejection error
- Invalid model name specified — defaults to fallback or returns error
- Temperature or maxTokens out of acceptable range — validation error
- Model provider temporarily unavailable — upstream timeout or 5xx error
- Malformed messages array — missing required role or content fields

## How this service works

LLM chat completion via x402 - no accounts, no API keys. Fast models (gpt-4o-mini, gemini-2.0-flash, llama-3.3-70b, mistral-small, deepseek-chat). OpenAI-compatible: send { messages:[{role,content}...], model?, maxTokens?, temperature? }. Payable in USDG on Robinhood Chain or USDC anywhere. Caps: 8k chars in / 1024 tokens out.

## Output

Returns an OpenAI-compatible chat completion response containing the assistant's generated text, up to 1024 tokens, produced by the selected model based on the input messages array.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-pay-per-call-llm-chat-completion-bec30d9e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-services-production.up.railway.app](https://www.zero.xyz/host/x402-services-production.up.railway.app/llms.txt)
