# Connecting models

Space AI and task generation work through a model you connected yourself — with your own provider key or through SKILLOK.

## Where

**Settings → AI**, the **Keys** section. Organization keys are in its settings, the **AI** section
(see [AI in an organization](https://skillok.org/docs/en/organizations/organization-settings/ai)).

Until something is connected, AI does not work: SKILLOK is not substituted on its own — it is
connected the same way as any other provider.

## Providers

| Provider | Key | Who pays |
|---|---|---|
| **SKILLOK** | not needed | the SKILLOK allowance; models from the SKILLOK set |
| **OpenRouter** | your own | your OpenRouter account; models from many companies with one key |
| **OpenAI** | your own | your OpenAI account — connecting is paused for now |
| **DeepSeek** | your own | your DeepSeek account |
| **Qwen, Kimi, GLM, MiniMax** | your own | your account with the provider; texts go to China or Singapore |
| **Own server** | optional | a lab server in the OpenAI format (vLLM, Ollama, LM Studio); public address only |

SKILLOK can be connected only by a person: the SKILLOK allowance belongs to a person, not to an
organization.

## How to connect

**Add key** — three steps:

1. **Provider.**
2. **Key.** Paste the key from the provider's dashboard — the «Where to get a key» link leads
   straight there. The key is checked with the provider by a free request, without calling a model.
   A key that fails the check is not saved. SKILLOK has no such step: one **Connect** button.
3. **Model.** Pick a model from the provider's list. Next to the name is the price per million tokens
   in dollars: input (the question and file fragments) and output (the answer).

The model and the limit can be changed later on the key page. The key itself does not change: a new
key is a new row in the list.

The [model catalog](https://skillok.org/docs/en/ai-models/models) compares prices and capabilities of current models.

## Which key pays

The one chosen in the chat next to the input — the **Model** list. It has your keys and the keys of
the organizations you belong to, each with the model chosen in its settings. The **default** key is
selected first; the first key you add becomes the default by itself.

An organization connects its key itself: **Organization settings → AI** — see
[AI in an organization](https://skillok.org/docs/en/organizations/organization-settings/ai).

A job pays with the key that was chosen when it was queued. If the key was deleted while the job was
waiting, the job does not run. «Learn» pays with your default key.

## Model roles

**Settings → AI → Model roles**: each role has its own connection and model.

* **Main** — leads the work when no connection is chosen next to the input, and calls the
  sub-models below when it pays off.
* **Code** — writes and edits code on its request.
* **Reviewer** — a second look at a change.
* **Fast** — session titles and short service work.
* **Vision** — looks at screenshots of pages and slides when the main model cannot see images.
* **Fallback** — carries the turn on if the main model does not answer.

An unassigned role works as if it did not exist. The **Set: cheap** and **Set: quality** buttons
assign roles from the models your connections have right now.

A role can have a **cap per session** in dollars: a sub-model that reached its cap is not called in
that session any more, and for the main model a new turn does not start.

An organization has roles too (**Organization settings → AI**): they apply in its repositories to
members who have no role of their own. Strongest of all is a file in the repository itself,
`.skillok/models.toml`:

```toml
[roles]
main = "deepseek/deepseek-v4.1-flash"
code = "qwen/qwen3-coder-next"
```

The file names models only — there are no keys in a repository: your connection that has the model
pays. Order: repository file → your roles → organization roles.

## Which repositories AI reads

Those you can see that have **AI** enabled — **Repository settings → AI**. There is no longer a
separate permission for private repositories or a separate consent: turn AI off in a repository, and
it will not read it. The text of the fragments goes to the provider of the connected model.

## Spending and a limit in dollars

Spending is counted in dollars, as the providers do: OpenRouter reports the cost of every call; for
OpenAI and DeepSeek it is computed from their published prices.

On the key page you can set a limit for the calendar month in dollars. Once the limit is reached,
Space AI and generation answer with a refusal and the reason and do not silently switch to another
key. Empty means no limit.

The **AI** section shows the month's spending: with your keys, organization keys and through SKILLOK.
Each key shows how much it spent this month.

## The SKILLOK allowance

The SKILLOK model is limited by your **plan**: the plan has windows — a few hours, a week and a
calendar month. The real cost of every call is counted. The free plan has $1 a month. How much of a
window is used is shown in **Settings → Plan**, the month's spending in **Settings → AI** («of $1»).

When a window is used up, Space AI and generation answer with a refusal and the reason: which window,
and what you can do — wait, pick another model or connect your own key. If you have another
connection, it is already in the model choice. Your own keys are not limited by the SKILLOK
allowance.

### Which model to pick

You pick the SKILLOK model on the connection page: **Settings → AI** → the SKILLOK connection. The
list is grouped by price, and each model says roughly how many questions $1 buys — for example,
"≈ 1100 messages per $1". A message here is a typical question in the AI space: the question, file
excerpts and the answer.

* **Cheap** — over 1000 messages per $1: on the free plan that covers a month of everyday
  questions. Claude Haiku 5.5 is the default.
* **Middle** — 200 to 1000: when a cheap model gets confused.
* **Strong** — under 200: for hard tasks; the free dollar goes in a few dozen questions.

To compare models in detail, see the catalog: [Model catalog](https://skillok.org/docs/en/ai-models/models).

## How a key is stored

A key is encrypted as soon as it is saved and is never shown again — only its last four characters
are visible. You can delete a key at any time on its page.

---

https://skillok.org/docs/en/account/ai-keys
