# Animica Chat Completions API (x402)

> Animica Chat Completions API (x402) is a paid API for AI agents from animica.dev, paid per call via x402, $0.00287/call, status unknown (last checked 2026-09-15).

Provides OpenAI-compatible chat completions via a pay-per-call x402 endpoint, returning structured completion objects without requiring an API key.

## Facts

- Endpoint: POST https://animica.dev/x402/v1/chat/completions
- Price: $0.00287/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/animica-chat-completions-api-x402-538ed743
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6hNInmqJ3CpVD7WzJnGjH

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 animica-chat-completions-api-x402-538ed743 -d '<json body>'
```

Example prompt: Ask Animica's pay-per-call AI endpoint to answer this question using gpt-4o-mini with a 512-token budget: 'What are three creative names for a coffee shop that specializes in cold brew?'

## When to prefer this

Choose this endpoint when you need OpenAI-compatible chat completions without managing an API key subscription, want pay-per-call billing in USDC via x402, or are building an AI agent that requires metered LLM access with no upfront commitment. It is especially suitable for autonomous agent pipelines, hackathon prototypes, or any workflow where per-call micropayments are preferred over flat-rate API subscriptions. Avoid if streaming responses are required, as that is not supported on this paid path.

## Known failure modes

- Payment failure or insufficient USDC balance causes 402 Payment Required with no completion returned
- Streaming requested (stream: true) is unsupported on this paid path and will return an error
- Invalid or unavailable model ID returns an error — check /v1/models for valid options
- Exceeding max_tokens or malformed messages array causes a 400 Bad Request
- Network timeout if the model inference takes too long for the given token budget

## How this service works

OpenAI-compatible chat completions with capacity-gated admission, no per-IP rate limit, direct upstream routing and a 180 s timeout. Only sold while enough workers are live-serving; disabled by default.

## Output

Returns an OpenAI-compatible chat.completion JSON object containing the generated assistant message, finish reason, model used, and token usage counts (prompt, completion, total). The response is non-streaming (stream must be false or absent).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "model id (see the free /v1/models)"
  },
  "stream": {
   "type": "boolean",
   "description": "must be false/absent — streaming is not yet supported on the paid path"
  },
  "messages": {
   "type": "array",
   "description": "OpenAI-style chat messages"
  },
  "max_tokens": {
   "type": "integer",
   "description": "completion budget"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "error": "priority_inference_unavailable",
  "detail": "priority inference is disabled by the operator (PRIORITY_INFERENCE_ENABLED=0)",
  "enabled": false,
  "required": 2,
  "serving_workers": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/animica-chat-completions-api-x402-538ed743/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from animica.dev](https://www.zero.xyz/host/animica.dev/llms.txt)
