Create a key, set the base URL and make your first request, in a few minutes.
Connecting to DaLAi takes three things: create a key, set the base URL in your tool, and choose a model name. You do not need to install any library.
Sign in to your account, go to the Console and then API Keys, and create a key. The key starts with sk-.
Keep your key as you would a password. Anyone who has it spends from your balance. If it leaks anywhere, the same page lets you delete it and create a new one.
In your tool's settings, set the base URL to this value:
https://dalai.ir/v1
Any tool that works with the standard OpenAI API will work with no other change. The endpoints are described in full in API overview.
A complete example with curl:
curl https://dalai.ir/v1/chat/completions \
-H "Authorization: Bearer sk-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{"model": "claude-haiku-4-5", "messages": [{"role": "user", "content": "Hello"}]}'
Change only these fields. All other settings stay at their default values.
| Tool | What to set |
|---|---|
| Cline | Set API Provider to OpenAI Compatible, set Base URL to https://dalai.ir/v1, then enter your key |
| Continue | In config.yaml: provider: openai together with apiBase: https://dalai.ir/v1 |
| Aider | aider --openai-api-base https://dalai.ir/v1 --openai-api-key sk-... |
| Open WebUI | Settings → Connections → OpenAI API, and the URL https://dalai.ir/v1 |
| LibreChat | A custom endpoint in librechat.yaml with baseURL: https://dalai.ir/v1 |
| Jan | Settings → Model Providers, and add an OpenAI-compatible provider |
A fuller list, and what has been tested, is in Tools overview.
Models are offered under public names, such as claude-opus-4-6 or qwen3-coder-480b. If the service behind a name changes, the name stays the same and you change nothing.
To choose between them, see Models overview; for live prices, see Model Square.
Your balance is prepaid and shown in toman. The cost of each request is based on the tokens it actually used, so a short question costs a fraction of what a long conversation does.
Every request is recorded individually in the Console, under Usage Logs: which model answered, how many input and output tokens it used, and how much it cost. Full details are in Wallet, top-ups and billing.
The meaning of each error message is explained in Errors and limits.