Quickstart

Six steps from signing up to the model's first answer. This is the quickstart of the Model API; your organization's agents are called through the Agent API.

1

Top up the balance

Sign up and top up the organization balance in the developer console, section Balance: by card or by invoice for a company, from 100 ₽ at a time. A call costs what the host that answered it charges, plus our 20%: prices on the Models page already include it. There is no top-up fee, the whole amount goes on the balance. The unspent balance is refunded in full, see the balance in the help center.

2

Issue a key

In the developer console, section API keys, create a key with the Model API access: it calls models and pays from the balance, and opens neither the agent nor the integrations. The key is shown once, so save it.

3

Put the key in the environment

bash
export SAMRESHUUU_API_KEY="sk-org-your_api_key"
4

Call a model

The sample model is deepseek/deepseek-v4.1-flash; pick any other on the Models page.

bash
curl https://api.samreshuuu.ru/v1/chat/completions \ -H "Authorization: Bearer $SAMRESHUUU_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"Hi! What can you do?"}]}'
5

Read the answer and its price

The answer carries usage: the tokens of the prompt and the answer, what was read from and written to the cache, and usage.cost, the exact price of the call in roubles. That is what the balance was charged.

json
{ "id": "gen-3f9c2a7e5b1d4c8a9e6f0b2d7a4c1e53", "object": "chat.completion", "created": 1794326400, "model": "deepseek/deepseek-v4.1-flash", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello! I can answer questions, write and edit text, and work with code." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 9, "completion_tokens": 12, "total_tokens": 21, "prompt_tokens_details": { "cached_tokens": 0, "cache_write_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0 }, "cost": 0.01, "cost_currency": "RUB" } }
6

See the call in the log

In the developer console, section Call log, every call of the key is listed: the model, the host that answered, the tokens, the price and the duration, refused calls too.

Next

Frequently asked questions

Do I need a plan for the Model API?

No. Model API calls are paid from the organization balance; they need no plan.

Where do I issue a Model API key?

In the developer console (https://platform.samreshuuu.ru), section API keys, with the Model API access. An agent key from the same section opens agents and connectors, not the Model API.

How much does a call cost?

What the host that answered it charges, plus our 20%. The exact price comes in the answer's usage.cost and shows in the console's call log.

Was this page helpful?