Docs
OpenAI-compatible. Base URL https://api.cerebellumlabs.ai/v1, model name as model.
Quickstart
- Deploy a model.
- Create an API key and store it as
CEREBELLUM_API_KEY. - Call the endpoint.
curl https://api.cerebellumlabs.ai/v1/chat/completions \ -H "Authorization: Bearer $CEREBELLUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "my-model", "messages": [{"role": "user", "content": "Hello!"}] }'
/chat/completions and /completions, with max_tokens, temperature, top_p and stop. The chat template comes from the tokenizer files.
Streaming
stream: true returns server-sent events in OpenAI's format. The last chunk carries billed token counts.
curl https://api.cerebellumlabs.ai/v1/chat/completions \ -H "Authorization: Bearer $CEREBELLUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "my-model", "messages": [{"role": "user", "content": "Hello!"}], "stream": true }'
Thinking
A model that thinks before it answers returns the thinking in reasoning, apart from content, in messages and in stream deltas. Thinking tokens are billed as output tokens and count toward max_tokens.
Thinking follows the model's chat template. Where the template has a switch, as Qwen3 and Qwen3.5 do, set it per request: "chat_template_kwargs": {"enable_thinking": false}.
Tool calling
Send OpenAI-style tools with tool_choice set to auto, required, none or a named function. Answers carry tool_calls, streaming and not. Works on full fine-tunes and LoRA adapters of the listed bases; a fine-tune keeps the call format of its own chat template.
With auto, the model writes the arguments. Set "strict": true on a tool to hold them to its schema. Required and named calls always match the schema.
Known issue: a thinking model that writes calls as Hermes-style JSON (Qwen3 8B, and fine-tunes with that template) can, rarely, return no call when streaming. Send tool turns without streaming where every call matters.
Cold starts
Models sleep when idle, so idle time costs nothing. The next request wakes the model and waits; it doesn't fail. Larger models take longer to wake.
| Size class | Fits | Full fine-tune, in / out | LoRA, in / out |
|---|---|---|---|
| Small | up to about 14B | $0.75 / $2.25 | $0.25 / $0.75 |
| Medium | up to about 32B | $1.50 / $4.50 | $0.50 / $1.50 |
| Large | 70B in FP8 | $2.50 / $7.50 | $1.00 / $3.00 |
LoRA adapters on a listed base share one engine per base. Set client timeouts with a wake-up in mind: requests time out after 5 minutes.
Billing
- Prompt and completion tokens, as in the response's
usage, at the model's price per 1M. - Idle time and wake-ups are free.
- Prepaid; free credits first. At $0 the API returns 402 until you add credits.
- Free accounts have a GPU-time cap; at the cap the model pauses until any top-up.
Limits
| Engine | Requests / min | Concurrent | Paid: req / min | Paid: concurrent |
|---|---|---|---|---|
| Full fine-tune (own engine) | 120 | 16 | 600 | 80 |
| LoRA (shared engine) | 20 | 2 | 60 | 4 |
- One model per account until the first top-up.
- LoRA
max_tokens: default 1024, cap 4096. Full fine-tunes: sent as given. - Playground: 20 requests a minute.
- Weights up to 105 GB in safetensors.
- GGUF repos on Hugging Face are served as is: one file, named before you deploy. Text only.
- Other bases: text models with a chat template deploy as is, using the model's own config and template. Thinking and tool calls are not tested on them. LoRA adapters need a listed base.
- Models with custom code or pre-quantized weights are reviewed before they deploy. A failed deploy is never charged.
- Requests time out after 5 minutes, wake-up included.
Errors
OpenAI's shape: { "error": { "message": "…" } }.
401 | Missing, invalid or revoked API key.Send Authorization: Bearer with a key from API keys. |
402 | No credits, or paused at the free GPU limit.Add credits. Paused models resume after any top-up. |
404 | Unknown model name, or the model isn't live.Use the name shown on the model page and check its status. |
429 | Rate or concurrency limit reached.Retry after the Retry-After header, with backoff. |
503 | The model is still deploying.Retry after the Retry-After header (30 s). |
502 / 504 | Engine error, or no answer within 5 minutes.Retry with backoff. |
Model licenses
Each base model keeps its own license. A model built on it stays under that license.
Built with Llama. Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved. Use of Llama models follows Meta's Acceptable Use Policy.