API Access
Dli.li AI provides OpenAI-compatible endpoints for developers and advanced users. Most clients, plugins, and applications that support the OpenAI protocol can connect directly with your site address and API key.
Recommended addresses
| Type | URL | Notes |
|---|---|---|
| Main site | https://dli.li | Required for login, payment, and external account linking |
| Backup site | https://dlizz.com | Same paths as main site, for fallback site access |
| Recommended API (Alibaba Cloud token acceleration) | https://api.dli.zz/v1 | OpenAI-compatible endpoint |
| Backup API (Cloudflare acceleration) | https://api.dlizz.com/v1 | Optional acceleration endpoint |
| China acceleration API (Alibaba Cloud token acceleration) | https://dlili.04s.net/v1 | Recommended for users in China |
Login and payment note
External account linking and on-site payments must use the main site `https://dli.li`. Do not use backup or acceleration domains for those actions.
The three required fields
| Item | Description |
|---|---|
| Base URL | Your site endpoint, usually including /v1 |
| API key | Generated on the API Tokens page |
| Model name | A model ID currently available to your account |
Quick start checklist
Before calling the API, confirm these items:
- Your endpoint includes
/v1. - You are using your own API key, not a backend access token.
- The model name exists in your current account's visible model list.
- Use the main site only for login, payment, and account linking actions.
Recommended reading order
Compatibility notes
- Common OpenAI-style clients usually work directly.
- Model names follow the names exposed by the site and may differ from the upstream vendor console.
- Some native-format interfaces may also work, but for general users and developers the recommended default is still the OpenAI-compatible path.
- Claude-family clients need special attention: most models on this site do not support the
/messagesinterface, and only some Claude models do. - If your SDK supports both
chat/completionsandresponses, either may work. Use whichever better matches your client stack.
Quick example
bash
curl https://dlili.04s.net/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{ "role": "user", "content": "Introduce yourself in one short sentence." }
]
}'Next steps
- Read Authentication if you need to distinguish API keys from management tokens.
- Read Chat APIs if you are integrating a chat client or SDK.
- Read Common Endpoints if you need a quick endpoint map.
