What each error message means, its usual cause, and what you should do.
If a request fails, the cause is usually one of the cases below. Messages come back in your account's language: Persian if you chose Persian in the Console's language menu, English otherwise. The table gives both.
| Message | What it means | What to do |
|---|---|---|
Invalid token (in Persian: «کلید API نامعتبر است») | The key is wrong, deleted, incomplete or expired, or the key's own credit has run out | Copy the key from the Console again. Make sure no space or line break came along with it. In the Console, also check the key's expiry and credit limit |
No available channel for model X … | The model name does not exist or is not available | Check the name against the model list. The most common cause is a typo in the model name |
field messages is required | The request structure is incomplete | Send the messages array. Examples are in API overview |
Insufficient user quota … or Not enough quota to pre-consume … | The account balance is not enough for this request | Top up the account. Details in Wallet |
Your IP address is not on this token's allowlist | The request came from an address that is not in this key's IP Whitelist | Send from a server that is on the list, or in the Console add the new address to this key's list |
This token has no access to model X | This key can only access the models in its own Model Limits list | Add the model to the key's allowed list, or use a key that has access to that model |
The current group is at capacity … | Momentary load on the service | Send it again in a few moments |
If you see Chinese text anywhere, let us know. Every message we know of has been translated, and any new one is a bug, not something you should have to live with.
A key starts with sk- and must be copied in full. Three common mistakes:
If in doubt, create a new key and try that one.
The model name must be exactly what appears in the list. claude-sonnet-4-5 is correct; claude-sonnet-4.5 or claude-3-5-sonnet is not.
Model names from other services do not work here, even if they look similar. The authoritative list is always here:
curl https://dalai.ir/v1/models -H "Authorization: Bearer sk-YOUR-KEY"
max_tokens is too low. Raise its value.curl to find out whether the problem is the tool or the request. There is an example in API overview.No available channel for model, it almost always means ANTHROPIC_MODEL is not set and the tool sent its own dated model name. The correct setup is in Coding with DaLAi.request id) given in that same message; with that ID we can find exactly that request in our logs, and without it we usually cannot.