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.
Official API addresses
| Type | URL | Notes |
|---|---|---|
| Main site | https://dli.li | Must be used for login, payment, and external account linking |
| Backup site | https://dlizz.com | Same page structure as the main site; useful as a fallback site entry |
| Official default API | https://api.dli.li/v1 | Official default base URL |
| Official backup API | https://api.dlizz.com/v1 | OpenAI-compatible endpoint; official backup endpoint |
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.
API recommendation
The official default API is `https://api.dli.li/v1`. The official backup API is `https://api.dlizz.com/v1`.
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 |
Recommended reading order
Choose an entry by scenario
| Scenario | Recommended entry |
|---|---|
| Writing your first request | Authentication + API Examples |
| Confirming domains, multipliers, and settlement rules | Site Links and Billing Rules |
| Connecting an existing client to the site | AI Apps |
| Troubleshooting API errors from your program | Common Endpoints + FAQ |
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 most users the official backup endpoint 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.
Quick example
bash
curl https://api.dli.li/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." }
]
}'