API reference
Endpoints, authentication, streaming, tool calling, reasoning, caching, and regions.
The API exposes the Completions / Responses API and the Messages API. Both are served from the same host and authenticated with the same per-user API keys.
| Surface | Base URL | Primary endpoint |
|---|---|---|
| Completions / Responses | https://zro.moonmath.ai/v1 | POST /chat/completions |
| Messages | https://zro.moonmath.ai | POST /v1/messages |
Authentication
Create an API key in the account dashboard and send it as a bearer token:
Keys are scoped to an invoice-able account, carry optional spend limits and expiry, and select which regions may process their requests. They can be created, revoked, and inspected at any time from Account → API keys. See Key controls and Regions.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/models | List the models available to the key. |
POST | /v1/chat/completions | Chat completion. |
POST | /v1/messages | Messages API. |
Chat completions
Streaming
Set stream: true to receive server-sent events. All models stream, and usage
is included in the final chunk.
Messages API
Claude Code and other Messages clients point at the endpoint root (not
/v1).
Tool calling
The standard tools / tool_choice interface and the full tool-call loop are
supported. This is what lets coding agents run shell commands, edit files, and
call MCP tools.
Reasoning effort
Models that expose reasoning accept a reasoning_effort parameter. The
supported values differ per model. See the reasoning chips on the
Models page.
For models with adaptive reasoning (for example MiniMax-style thinking),
clients can also request per-request thinking. Unsupported reasoning fields are
dropped rather than rejected. A request never fails because a harness sent a
parameter the selected model does not use.
Errors
Errors follow the standard error shape ({ "error": { "message", "type", ... } }).
| Status | Meaning |
|---|---|
400 | Malformed request or unsupported parameter value. |
401 | Missing, invalid, revoked, or expired API key. |
403 | Key is not permitted to use the requested model. |
402 | Spend quota or plan budget exhausted. |
404 | Unknown model ID. |
429 | Rate limit exceeded. Retry with backoff. |
5xx | Upstream/model error. Retry with backoff; if it persists, contact support. |
Compatibility notes
- Standard request fields (
temperature,top_p,max_tokens,frequency_penalty,presence_penalty,stop,seed) are accepted. - Unsupported provider parameters are dropped instead of erroring. Clients built for other providers keep working.
- Both the bare model ID and its
zro/alias are accepted on every endpoint.