1. Įdiekite SDK
Paleiskite npm install openai. Dabartinė pagrindinė versija yra v6, o baseURL forma stabili nuo v4 iki v6.
Perduokite baseURL ir savo av_mcp_ raktą oficialiam openai klientui, tada kvieskite bet kurį modelį pagal id iš Node.js ar TypeScript.
Oficialus openai npm paketas priima baseURL. Nukreipkite jį į avots ir kvieskite chat.completions.create.
| Field | Value |
|---|---|
| Base URL | https://api.avots.ai/openai/v1 |
| API key | av_mcp_… · get your key |
| Model | anthropic/claude-sonnet-4.6 or any id from the table below |
Paleiskite npm install openai. Dabartinė pagrindinė versija yra v6, o baseURL forma stabili nuo v4 iki v6.
Sukurkite klientą su baseURL https://api.avots.ai/openai/v1 ir apiKey nustatytu į savo av_mcp_ raktą.
Kvieskite client.chat.completions.create su model anthropic/claude-sonnet-4.6 ir savo žinutėmis.
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'av_mcp_YOUR_KEY',
baseURL: 'https://api.avots.ai/openai/v1',
});
const r = await client.chat.completions.create({
model: 'anthropic/claude-sonnet-4.6',
messages: [{ role: 'user', content: 'Hello!' }],
});
baseURL turi įtraukti /v1, SDK prideda tik maršrutą. Naudokite chat.completions.create plačiausiam suderinamumui. Laikykite raktą serverio pusėje; naršyklėje reikėtų dangerouslyAllowBrowser, kuris nerekomenduojamas su tikru raktu.
curl https://api.avots.ai/openai/v1/chat/completions \
-H "Authorization: Bearer av_mcp_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-4.6",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Your av_mcp_ key is not only for chat. avots also runs as an MCP server, so Node.js SDK can call avots creative tools, image, video, music, talking avatars, on the same key and the same balance.
| Field | Value |
|---|---|
| MCP server | https://mcp.avots.ai/ |
| API key | av_mcp_… · same key as above |
Set the model field to any id below, or a lazy name like claude / gpt / gemini that maps to a sensible default.
| Model | Best for | ⚡ / 1M tokens (in / out) |
|---|---|---|
openai/gpt-5.5-pro | Max intelligence, hardest tasks | 60 000 / 360 000 |
anthropic/claude-opus-5 | Top Claude, long reasoning | 10 000 / 50 000 |
anthropic/claude-sonnet-4.6 | Balanced (default) | 6 000 / 30 000 |
google/gemini-3.1-pro-preview | Fresh Gemini Pro | 4 000 / 24 000 |
google/gemini-2.5-pro | Stable Gemini Pro | 2 500 / 20 000 |
anthropic/claude-haiku-4.5 | Fast Claude | 2 000 / 10 000 |
deepseek/deepseek-r1 | Cheap reasoning | 1 400 / 5 000 |
google/gemini-2.5-flash | Fast and cheap | 600 / 5 000 |
openai/gpt-5-mini | Cheap OpenAI | 500 / 4 000 |
openai/gpt-oss-120b:free | Free (OpenAI open model, needs a positive balance) | Free |
* Price in ⚡ per 1,000,000 tokens, input / output (1000⚡ ≈ $1). Free models need a positive balance. Full list via GET /openai/v1/models.
Generate an av_mcp_ key in Settings, paste three fields, and reach 40+ models on one balance. The same key works for MCP.
Gauti API raktą ✦avots speaks the OpenAI API. Any app that talks to ChatGPT through base URL, key and model…
Add avots under Connections as an OpenAI API provider, and every avots model shows up in y…
Add one custom endpoint block to librechat.yaml and avots appears as a provider with every…
Override the OpenAI base URL in Cursor Settings, Models, paste your av_mcp_ key, add a mod…
Pass base_url and your av_mcp_ key to the official openai Python client, then call any mod…
Add an OpenAI-compatible provider to openclaw.json pointing at avots, and openclaw runs an…
Set the OpenAI base URL and your av_mcp_ key in Hermes, pick a model, and it runs on avots…
Pick OpenAI Compatible in Cline settings, paste the avots base URL and your av_mcp_ key, t…
Add one models entry to Continue config.yaml with provider openai and the avots base URL, …
Export two environment variables and launch Aider with an openai/ model prefix, and the CL…
Choose Custom (OpenAI-compatible) as the Chat Completion source in SillyTavern, paste the …
Choose Generic OpenAI as the LLM provider in AnythingLLM, fill the avots base URL, key, mo…
Add a custom OpenAI API compatible provider in Chatbox, paste the avots host and your av_m…