# PaySponge AI Chat Completions (x402 Pay-per-Call)

> PaySponge AI Chat Completions (x402 Pay-per-Call) is a paid API for AI agents from api.paysponge.com, paid per call via x402, $0.010000/call, status unknown (last checked 2026-09-15, last successful call 2026-08-10).

Generates AI chat completions (OpenAI-compatible) gated by a micro-payment of $0.01 USDC per call via on-chain crypto payment on Base or Solana.

## Facts

- Endpoint: POST https://api.paysponge.com/x402/purchase/svc_d5zgtpg00dvssgj28/chat/completions
- Price: $0.010000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Last successful call: 2026-08-10
- Success rate: 100% of calls made through Zero
- Activations on Zero: 5
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-paysponge-com-7c5df9e0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VOUkseB7hu9LJkmJwZc57

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 api-paysponge-com-7c5df9e0 -d '<json body>'
```

Example prompt: Ask gpt-4o-mini: 'What are three tips for writing clean Python code?' — pay for this single request with USDC on Base via PaySponge.

## When to prefer this

Choose this endpoint when you need OpenAI-compatible chat completions without a subscription or API key, and can pay $0.01 USDC per call on-chain via Base (EIP-155:8453) or Solana. Ideal for agents operating in crypto-native environments, anonymous or trustless access patterns, or use cases requiring pay-as-you-go without account registration.

## Known failure modes

- Payment not received or insufficient USDC — returns 402 Payment Required
- Payment timeout exceeded — request rejected before completion
- Invalid or missing 'model' field — returns 400 Bad Request
- Malformed messages array (missing role or content) — returns 400 validation error
- Upstream LLM provider error — proxied 5xx response
- Unsupported model specified — provider may reject with error

## How this service works

Service: OpenRouter API (https://api.paysponge.com/chat/completions)

## Output

Returns an OpenAI-compatible chat completion object including the assistant's response message, finish reason, prompt and completion token counts, upstream inference cost breakdown, model used, and a provider identifier.

## Example request

```json
{
 "model": "gpt-4o-mini",
 "messages": [
  {
   "role": "user",
   "content": "Hello"
  }
 ]
}
```

## 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",
     "properties": {},
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "additionalProperties": true
    }
   },
   "additionalProperties": false
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-paysponge-com-7c5df9e0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.paysponge.com](https://www.zero.xyz/host/api.paysponge.com/llms.txt)
