API reference
Base URL https://api.infersia.com/v1. Shapes match the OpenAI specification; anything additive is marked.
Chat completions
POST
/v1/chat/completions| Parameter | Type | Description |
|---|---|---|
modelrequired | string | A catalogue id, optionally with a routing suffix — see model routing. |
messagesrequired | Message[] | The conversation. Roles: system, user, assistant, tool. |
stream | boolean | Stream the response as server-sent events. Defaults to false. |
stream_options | object | Set include_usage: true for a final chunk carrying exact token counts. |
max_tokens | integer | Output ceiling. max_completion_tokens is also accepted. Defaults to the variant’s own limit. |
temperature | number | Sampling temperature, 0–2. |
top_p | number | Nucleus sampling. |
stop | string | string[] | Stop sequences. |
seed | integer | Best-effort determinism. |
tools | Tool[] | Function definitions, where supported. |
response_format | object | { "type": "json_object" } for JSON mode, where supported. |
user | string | Your own end-user identifier. Recorded on the usage row for attribution. |
provider | object | Infersia extension — per-request routing controls. |
Parameters not listed here are forwarded to the inference engine unchanged. That includes vLLM extensions like
top_k, repetition_penalty, min_p and guided_json. We validate only the fields we make decisions from — the engine is the authority on its own parameters.Response
{
"id": "chatcmpl-...",
"object": "chat.completion",
"created": 1785116409,
"model": "qwen/qwen3-8b",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 13,
"completion_tokens": 3,
"total_tokens": 16,
"prompt_tokens_details": { "cached_tokens": 0 },
"cost": 0.0000011
}
}usage.cost is an addition: the exact USD charged for this request. The model field always reports the catalogue id you asked for, not the upstream repo path.
Legacy completions
POST
/v1/completionsPrompt-in, text-out. Supported for older clients; prefer chat completions for anything new.
Embeddings
POST
/v1/embeddings| Parameter | Type | Description |
|---|---|---|
modelrequired | string | An embedding model id. |
inputrequired | string | string[] | Text to embed. Arrays are batched. |
dimensions | integer | Output dimensionality, where the model supports truncation. |
Models
GET
/v1/modelsUnauthenticated. Includes our extensions — quantization, context_length, pricing, supported_parameters — alongside the standard fields.
Key introspection
GET
/v1/key{
"data": {
"label": "Production backend",
"limit": 25.0,
"usage": 3.417,
"limit_remaining": 21.583,
"is_free_tier": false,
"rate_limit": { "requests": 200, "tokens": 400000, "interval": "60s" },
"balance": 21.58,
"balance_formatted": "$21.5834"
}
}Credits
GET
/v1/creditsLifetime credited, lifetime spent, and the current balance.
Health
GET
/healthLiveness only — no dependencies checked. /ready additionally verifies the database, and /metrics exposes Prometheus metrics.