# CortexCloud Chat Completions Gateway

> CortexCloud Chat Completions Gateway is a paid API for AI agents from api.cortexcloud.org, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Provides an OpenAI-compatible chat completions endpoint that routes requests to any supported AI model, with per-call USDC micropayment billing via x402 on Base — no API keys or subscriptions required.

## Facts

- Endpoint: GET https://api.cortexcloud.org/x402/v1/chat/completions
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cortexcloud-chat-completions-gateway-69f54a8f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aXIUdW6MNOziF0wUzfhR3

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 cortexcloud-chat-completions-gateway-69f54a8f
```

Example prompt: Using CortexCloud, send a chat message to gemini/gemini-2.0-flash asking it to summarize the following paragraph in 3 bullet points — pay per call from my USDC balance, no API key needed: 'Artificial intelligence is transforming industries by automating tasks that previously required human intelligence...'

## When to prefer this

Choose this endpoint when an AI agent needs to call LLM chat completions without managing provider-specific API keys or subscription billing — especially in agentic, multi-model, or trustless environments where paying per-call in USDC on Base is preferable to monthly subscriptions. It is ideal for agent-to-agent commerce, serverless pipelines, or any scenario requiring OpenAI-compatible inference with crypto micropayments and no vendor lock-in.

## Known failure modes

- Insufficient USDC balance for x402 payment — payment rejected before inference runs
- Invalid or unsupported model ID — model not found or not routable
- Malformed messages array — missing required fields causes 400 error
- Rate limiting or capacity issues on the underlying model provider
- Network timeout if the upstream model provider is slow or unavailable
- Stream connection dropped mid-response if client disconnects early

## How this service works

OpenAI-compatible AI and data API for agents. Pay per call in USDC on Base via x402 — no API keys, no subscriptions, no lock-in.

## Output

Returns an OpenAI-compatible chat completion response object containing: a unique completion ID, an object type identifier, an array of response choices (each with a message and finish reason), and a usage object showing token counts for prompt and completion.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Model id, e.g. gemini/gemini-2.0-flash"
  },
  "stream": {
   "type": "boolean"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "user",
       "assistant",
       "tool"
      ],
      "type": "string"
     },
     "content": {
      "type": "string"
     }
    }
   }
  },
  "max_tokens": {
   "type": "integer"
  },
  "temperature": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "format": "application/json",
 "example": {
  "id": "chatcmpl-abc",
  "usage": {
   "prompt_tokens": 0,
   "completion_tokens": 0
  },
  "object": "chat.completion",
  "choices": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cortexcloud-chat-completions-gateway-69f54a8f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.cortexcloud.org](https://www.zero.xyz/host/api.cortexcloud.org/llms.txt)
