# AliAI > AliAI is an AI gateway at https://aliai.alione.cc. It exposes one API key and one base URL for > OpenAI-, Anthropic- and Gemini-compatible chat completions, routing each request to a model from > Claude, OpenAI, Gemini, DeepSeek, Kimi, GLM or MiniMax. Usage is billed in tokens from the account's > monthly allowance. AliAI is a service by AliOne (https://alione.cc), contact support@alione.cc. It is a paid hosted service, not a library. There is no public source repository for the gateway itself; the API surface follows the public OpenAI, Anthropic and Google specifications. ## Base URL https://aliai.alione.cc ## Authentication - OpenAI-compatible: `Authorization: Bearer sk-...` - Anthropic Messages: `x-api-key: sk-...` (Bearer also accepted) - Gemini: `x-goog-api-key: sk-...` or `?key=sk-...` Keys are created in the panel at https://aliai.alione.cc (API keys page) and shown once. Keys are hashed at rest. If the account has not accepted the current Terms of Service, every API request returns HTTP 403 with code `terms_not_accepted` until the owner signs in and accepts them. ## Endpoints ### POST /v1/chat/completions OpenAI Chat Completions format. Body: `model`, `messages`, `temperature`, `top_p`, `max_tokens`, `stop`, `stream`. Response: standard `chat.completion` object with `choices` and `usage`. ### POST /v1/messages Anthropic Messages format. Body: `model`, `system`, `messages`, `max_tokens`, `temperature`, `top_p`, `stop_sequences`, `stream`. Response: `{id, type: "message", role: "assistant", content: [{type: "text", text}], stop_reason, usage: {input_tokens, output_tokens}}`. Streaming emits the standard events: `message_start`, `content_block_start`, `content_block_delta`, `content_block_stop`, `message_delta`, `message_stop`. ### POST /v1beta/models/{model}:generateContent ### POST /v1beta/models/{model}:streamGenerateContent Gemini generateContent format. Body: `contents`, `systemInstruction`, `generationConfig{temperature, topP, maxOutputTokens, stopSequences}`. Response: `candidates[]` with `content.parts[].text`, `finishReason`, and `usageMetadata{promptTokenCount, candidatesTokenCount, totalTokenCount}`. ### GET /v1/models Lists the model ids available to the caller. Requires authentication. ## Streaming All three protocols support server-sent events. OpenAI and Anthropic use `text/event-stream`; Gemini uses `data: {json}` chunks. Streaming calls do not currently report prompt tokens in billing. ## Models Model ids are AliAI public ids. The upstream provider and its internal model name are never exposed in responses. Current public ids include: - claude-opus-5-5, claude-fable-5-2, claude-sonnet-5-5, claude-haiku-5-5 - gpt-6-astra, gpt-6.1-sol - gemini-4-argon - deepseek-v4.1-flash, deepseek-ai-deepseek-v4-flash-0731 - kimi-k3.1-pro, kimi-k3 - hy4 Use GET /v1/models for the authoritative list; ids and availability change. ## Plans and billing - Free: $0/month, 1,000,000 tokens - Go: $5/month, 10,000,000 tokens - Pro: $10/month, 50,000,000 tokens - Ultra: $20/month, 100,000,000 tokens Tokens are deducted per request from input plus output tokens. Balances and per-request charges are visible in the panel. Top-ups and new payments are currently closed. ## Errors - OpenAI shape: `{"error": {"message", "type", "code"}}` - Anthropic shape: `{"type": "error", "error": {"type", "message"}}` - Gemini shape: `{"error": {"code", "message", "status"}}` Status codes: 400 invalid request, 401 missing or invalid key, 403 plan/quota/terms, 429 rate limit, 502 upstream failure. ## Limits and unsupported features - Text only: no tool/function calling, no image or PDF input. - No GET /v1beta/models listing. - Context length depends on the selected model. - Daily request and token limits may apply per key or account; they are shown in the panel. ## Links - Documentation: https://aliai.alione.cc/docs - Terms of Service: https://aliai.alione.cc/terms - Privacy Policy: https://aliai.alione.cc/privacy - Acceptable Use Policy: https://aliai.alione.cc/acceptable-use - Cookie notice: https://aliai.alione.cc/cookies - AI output disclaimer: https://aliai.alione.cc/ai-disclaimer - Company: https://alione.cc - Contact: support@alione.cc