# Surplus Intelligence OpenAI-Compatible Chat Completions

> Surplus Intelligence OpenAI-Compatible Chat Completions is a paid API for AI agents from www.surplusintelligence.ai, paid per call via x402, $0.003516/call, status unknown (last checked 2026-10-12, last successful call 2026-07-22).

Provides OpenAI-compatible LLM chat completions across many models at market prices via Surplus Intelligence's inference gateway.

## Facts

- Endpoint: POST https://www.surplusintelligence.ai/x402/api/inference/v1/chat/completions?utm_source=zero.xyz
- Price: $0.003516/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Last successful call: 2026-07-22
- Success rate: 98% of calls made through Zero
- Rating: 3.4 / 5 from 3 reviews
- Activations on Zero: 68
- Tags: x402
- Canonical page: https://www.zero.xyz/c/www-surplusintelligence-ai-91f7c474
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2EKknzRQQwXMMhQXJjsVH

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 www-surplusintelligence-ai-91f7c474 -d '<json body>'
```

Example prompt: Using the Surplus Intelligence inference gateway, send this conversation to the mistral-7b model: system prompt 'You are a helpful assistant', user message 'Explain quantum entanglement in simple terms', with a max of 512 tokens and temperature 0.7.

## When to prefer this

Prefer this endpoint when you need OpenAI-compatible chat completions but want access to multiple model providers at competitive market prices without committing to a single provider subscription. Ideal for agents that need to dynamically select models or compare outputs across providers, or when paying per-call via crypto (USDC/x402) is preferred over monthly billing.

## Known failure modes

- Invalid or unavailable model ID returns 400 or 404 error
- Insufficient USDC balance or failed x402 payment returns 402 Payment Required
- Empty messages array or missing required fields returns 400 validation error
- Temperature out of range (0-2) returns 400 error
- Model provider downtime may return 503 or timeout
- Exceeding max_tokens limit for chosen model returns error

## How this service works

Buy the cheapest inference. Sell your credits. The open order book for AI models. Up to 90% off GPT-5.5, Claude Opus 4.8, and more.

## Output

An OpenAI-compatible chat completion object containing the assistant's generated message, finish reason, and token usage statistics. If streaming is enabled, returns a stream of delta chunks in SSE format.

## Example request

```json
{
 "model": "gpt-4o-mini",
 "stream": false,
 "messages": [
  {
   "role": "system",
   "content": "You are a helpful assistant."
  },
  {
   "role": "user",
   "content": "What is artificial intelligence?"
  }
 ],
 "max_tokens": 256,
 "temperature": 0.7
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Surplus Intelligence model id. Call /x402/api/inference/v1/models for available models."
  },
  "stream": {
   "type": "boolean"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "developer",
       "user",
       "assistant",
       "tool"
      ],
      "type": "string"
     },
     "content": {}
    },
    "additionalProperties": true
   },
   "minItems": 1,
   "description": "OpenAI-compatible chat messages."
  },
  "max_tokens": {
   "type": "integer",
   "minimum": 1,
   "description": "Maximum output tokens."
  },
  "temperature": {
   "type": "number",
   "maximum": 2,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "chatcmpl_surplus_example",
  "usage": {
   "total_tokens": 18,
   "prompt_tokens": 12,
   "completion_tokens": 6
  },
  "object": "chat.completion",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "Hello from Surplus Intelligence."
    },
    "finish_reason": "stop"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/www-surplusintelligence-ai-91f7c474/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.surplusintelligence.ai](https://www.zero.xyz/host/www.surplusintelligence.ai/llms.txt)
