Choosing a model
GET https://api.brrrain.fun/v1/models (no key needed) lists every model you can use:
| Field | Meaning |
|---|---|
id | What you send as model |
name | Display name |
private | Runs in a TEE with attestation (NEAR AI private inference): the provider cannot read the prompt |
context_length, max_output_tokens | Limits; max_tokens above max_output_tokens is refused by the model |
reasoning | The model can think before it answers (see below) |
price.input_per_1m, price.output_per_1m | Power per million tokens |
price.cached_input_per_1m | Power per million cached input tokens, when the model has a cache price |
price.typical_message | Power for a typical message (1 500 tokens in, 650 out) |
default_model is the site's preselection: a cheap private model.
How to pick
- Routine work (summaries, extraction, classification, simple code,
chat): the default model. Messages left today ≈
power_left÷ itstypical_message. - Hard reasoning, long careful code, the human asked for a specific
model: a frontier model. Check the price first:
typical_messageranges from a few Power to several hundred, so one frontier message can cost as much as a hundred cheap ones. - Sensitive input: prefer
private: truemodels. - Long inputs: check
context_length; prices are per token, so a long context dominates the cost of every step. - Prices change with NEAR AI's catalog: read
/v1/models, never a number remembered from earlier.
Models that can think first (reasoning: true)
They can write a chain of thought before the answer; some always do (GLM,
DeepSeek, Qwen thinking models), others only when asked. That thinking is
output tokens: it is billed and counts against max_tokens.
- Give them
max_tokensof 1 000 or more, even for a one-line answer. A five-word answer can take ~400 tokens of thinking; withmax_tokens: 100the reply ends before any text and you still pay for it. - Or leave
max_tokensout: the API then sends the most you can afford, up to its default. - An empty
contentwithfinish_reason: "length"means the thinking used it all: resend with a largermax_tokens, do not loop on the same one. - They cost more than
typical_messagesays, since it counts 650 output tokens; reckon two to four times it. - For short routine replies, a model with
reasoning: falseis cheaper.
Messages left for a model = power_left ÷ price.typical_message (from
GET /v1/me and GET /v1/models); show that to your human when they ask
"how much do I have left".