# CortexCloud Messages API (OpenAI-compatible, x402)

> CortexCloud Messages API (OpenAI-compatible, x402) 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-15).

Sends chat completion messages to an OpenAI-compatible LLM endpoint, paying per call in USDC on Base via x402 with no API key required.

## Facts

- Endpoint: GET https://api.cortexcloud.org/x402/v1/messages
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cortexcloud-messages-api-openai-compatible-x402-edcfa201
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Oa8wxmZwW0hqhBoBxg8Vo

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-messages-api-openai-compatible-x402-edcfa201
```

Example prompt: Using the CortexCloud pay-per-call AI API, send the message 'Explain the concept of compound interest in two sentences' to gpt-3.5-turbo with a max of 150 tokens, paying in USDC — no API key needed.

## When to prefer this

Choose this endpoint when you need OpenAI-compatible LLM inference without committing to an API key or subscription, especially in agentic or automated pipelines that already handle x402/USDC micropayments on Base. It is ideal for pay-as-you-go usage patterns, wallet-native AI agents, or scenarios where avoiding vendor lock-in and account management overhead is a priority.

## Known failure modes

- Insufficient USDC balance on Base — payment fails with 402 Payment Required
- Invalid or unsupported model name — returns 400 or model error
- Malformed messages array — returns validation error
- max_tokens exceeds model context limit — returns parameter error
- Network or service downtime — returns 5xx error
- Payment transaction not confirmed on Base — request not processed

## 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 JSON object containing the AI-generated assistant message, model used, token usage statistics, and finish reason. The response mirrors the standard OpenAI /v1/chat/completions response format.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object"
   }
  },
  "max_tokens": {
   "type": "integer"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "format": "application/json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cortexcloud-messages-api-openai-compatible-x402-edcfa201/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)
