Docs · Start here
ShvIA developer documentation
ShvIA is an AI gateway: one account, one API key and one usage record in front of models that run on the operator's own GPUs and on cloud providers. This documentation covers the HTTP API you use to call it from your own code and tools.
The hosted service lives at https://ai.shvia.org, and https://ia.shvia.org serves the same application. Every example here uses the first one.
Three ways in#
All three take the same API key, and their chat calls are metered together.
| Surface | Endpoints | Use it when |
|---|---|---|
| OpenAI-compatible | /v1/chat/completions, /v1/responses, /v1/models, /v1/audio/* | your tool or SDK already speaks the OpenAI API |
| Anthropic-compatible | /v1/messages | your tool or SDK speaks the Anthropic Messages API, such as Claude Code |
| Native | /api/v1/* | you want what the ShvIA apps use: stored conversations, attachments, reasoning effort, usage and cost |
What the gateway adds#
- One key for many models. Models on the operator's GPUs and on cloud providers share one model list and one request format.
- Your own provider keys. For cloud models you bring your own provider key (BYOK), so the contract and the bill stay between you and the provider. See providers and your own keys.
- Per-answer accounting. Every chat call is metered in tokens and time, against limits set per account group. Embeddings and audio are not metered. See usage and cost and rate limits and quotas.
- A stated data path. Each model declares whether a prompt stays on the operator's infrastructure or leaves it. See your data.
Start here#
- Quickstart: from an API key to your first reply.
- Authentication and API keys: how to get a key, how to send it, what it cannot do.
OpenAI-compatible API#
- Models:
GET /v1/models, model ids, and how to find the models you can actually use. - Chat completions:
POST /v1/chat/completions, with streaming and tool calls. - Responses:
POST /v1/responses, the stateless slice. - Audio: speech to text and text to speech.
Anthropic-compatible API#
- Messages:
POST /v1/messagesand token counting.
Native API#
- Chat stream:
POST /api/v1/chatover server-sent events, and the synchronousPOST /api/v1/agent/chat. - Conversations: list, read, export and delete stored conversations.
- Embeddings:
POST /api/v1/embeddings. - Collections: send your own documents once, and name them in a chat call so the model answers from them.
- Usage and cost: quota windows, spend by provider, and per-conversation cost.
Reference#
- Errors: the error shapes of each surface, and what to retry.
- Rate limits and quotas: request limits, token ceilings, and how to read them.
Protocols#
- MCP server: use ShvIA's tools from any MCP client.
- A2A agent: let another agent ask ShvIA a question.
- Routine webhooks: trigger an automation with an HTTP call.
Guides#
- Connect your tools: Claude Code, Cline, Roo Code, Continue and the official SDKs.
- Providers and your own keys: cloud providers, BYOK and subscription logins.
- Combos and fallback: ordered fallback chains.
- Your data: what is stored, what is masked and what leaves the operator's infrastructure.