# CheapestInference Anthropic Messages API

> CheapestInference Anthropic Messages API is a paid API for AI agents from api.cheapestinference.com, paid per call via x402, $20/call, status unknown (last checked 2026-09-14).

Send messages to Anthropic-compatible AI models via a flat-rate OpenAI-compatible API endpoint, paying per call rather than per token

## Facts

- Endpoint: POST https://api.cheapestinference.com/anthropic/v1/messages
- Price: $20/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cheapestinference-anthropic-messages-api-361fdb06
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yPFsCPPkwjZYtZ9FdKxc4

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 cheapestinference-anthropic-messages-api-361fdb06 -d '<json body>'
```

Example prompt: Using CheapestInference's Anthropic messages endpoint, send this message to claude-3-5-sonnet: 'Summarize the key risks of investing in small-cap stocks in 3 bullet points.' Pay the flat $10 USDC fee and return the response.

## When to prefer this

Prefer this endpoint when you want to use Anthropic-compatible message formatting (Claude API format) and prefer flat-rate per-call pricing over per-token billing, especially when running longer prompts where token costs would otherwise be high, or when you want to pay with USDC on Base rather than a credit card

## Known failure modes

- Payment not provided or insufficient USDC — 402 Payment Required
- Invalid model identifier — 400 Bad Request with unsupported model error
- Malformed messages array — 400 Bad Request with schema validation error
- Model temporarily unavailable — 503 Service Unavailable
- Rate limit exceeded — 429 Too Many Requests
- Network timeout on long completions — 504 Gateway Timeout

## How this service works

Access 200+ open-source AI models through a single OpenAI-compatible API. Flat-rate pricing with no per-token charges. Pay with card or USDC on Base.

## Output

Returns a JSON object with a content array containing the assistant's text response, following the Anthropic messages API response format

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "content": {
   "type": "array"
  }
 }
}
```

## More

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