API Reference
Chat Completions
POST /v1/chat/completions. The core inference endpoint — same request and response shape as the OpenAI Chat Completions API, routed across whichever model (or fallback chain) you specify.
Endpoint
POST https://api.aniron.ai/v1/chat/completions Request body
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID prefixed with aniron/, e.g. aniron/llama-3.1-70b. |
| messages | array | Yes | Array of { role, content } objects. Roles: system, user, assistant, tool. |
| fallbacks | array<string> | No | Ordered backup model IDs. Retries on rate limit or server error. See Model Fallbacks. |
| stream | boolean | No | Defaults to false. If true, returns server-sent event chunks. See Streaming. |
| temperature | number | No | 0–2. Sampling randomness. Defaults to the model default. |
| top_p | number | No | 0–1. Nucleus sampling. Use temperature or top_p, not both. |
| max_tokens | integer | No | Maximum tokens to generate in the completion. |
| stop | string | array<string> | No | Up to 4 sequences where generation stops. |
| n | integer | No | Number of completions to generate. Defaults to 1. Billed per completion. |
| presence_penalty | number | No | -2.0 to 2.0. Penalizes tokens already present in the text so far. |
| frequency_penalty | number | No | -2.0 to 2.0. Penalizes tokens by their existing frequency. |
| tools | array | No | Function definitions the model may call. See Tool Calling. |
| tool_choice | string | object | No | "auto", "none", or a specific function. See Tool Calling. |
| user | string | No | Opaque end-user identifier for abuse monitoring. |
Response
{
"id": "chatcmpl-8f3a1c2b9d4e",
"object": "chat.completion",
"created": 1757500000,
"model": "aniron/llama-3.1-70b",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24,
"completion_tokens": 27,
"total_tokens": 51
}
} choices is an array (length
n). usage
reflects the model that actually produced the response — if a fallback fired, you're only
billed for that model's usage, not the failed primary attempt.
Listing available models
Aniron routes across 20+ open-source and frontier models. The full, current catalog —
including pricing per model — is available from your dashboard at
app.aniron.ai
and via GET /v1/models, which returns the
same shape as OpenAI's models endpoint.
Try it against your own key
Get an API key and send your first request.