One endpoint. Every provider.
DalimServer exposes a fully OpenAI-compatible API. Point your existing SDK here, swap the base URL, and keep using the models you already know.
https://dalimserver.lovable.app/v1Authentication
Every request must include your Master API key in the Authorization header.
Authorization: Bearer YOUR_MASTER_KEYNever expose your master key in client-side code or public repositories. Use it from your backend or a secure environment.
Supported endpoints
/v1/chat/completionsChat completions with streaming support.
/v1/modelsList models available to your master key.
/v1/completionsLegacy completions (provider-dependent).
/v1/embeddingsEmbeddings (if allowed by your key).
Code examples
curl -X POST "https://dalimserver.lovable.app/v1/chat/completions" \
-H "Authorization: Bearer YOUR_MASTER_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "Hello!"}]
}'Provider routing
By default DalimServer picks the best available upstream key for the requested model. You can also force a specific provider by prefixing the model name.
{
"model": "groq/llama-3.1-8b-instant",
"messages": [{"role": "user", "content": "Hi!"}]
}Use provider/model to force a provider.
{
"model": "dalim-2.0",
"messages": [{"role": "user", "content": "Explain quantum computing"}]
}Custom slugs configured by the admin in the dashboard.
Supported prefixes include openai/, groq/, cerebras/, openrouter/, deepseek/, mistral/, anthropic/, xai/, google/, yunwu/ and more.
Model allowlist & auto mode
Admins can restrict which models each master key may call. If a model is blocked, the proxy returns a clear 400 error. The special auto model lets DalimServer pick the smallest/fastest allowed model for you.
{
"model": "auto",
"messages": [{"role": "user", "content": "Summarize this in one sentence."}]
}Error codes
| Code | Meaning |
|---|---|
| 401 | Missing or invalid master key. |
| 403 | IP not in allowlist or action forbidden. |
| 404 | Model or upstream path not found. |
| 429 | Rate limit, token limit, or monthly spend cap reached. |
| 402 | All upstream keys exhausted for this model/provider. |
| 500 | Gateway or upstream error after retries. |
Streaming
Set stream: true to receive Server-Sent Events just like OpenAI. The gateway forwards chunks from the selected upstream provider transparently.
{
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "Count to 10"}],
"stream": true
}