Skip to content

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.

TypeURLNotes
Main sitehttps://dli.liRequired for login, payment, and external account linking
Backup sitehttps://dlizz.comSame paths as main site, for fallback site access
Recommended API (Alibaba Cloud token acceleration)https://api.dli.zz/v1OpenAI-compatible endpoint
Backup API (Cloudflare acceleration)https://api.dlizz.com/v1Optional acceleration endpoint
China acceleration API (Alibaba Cloud token acceleration)https://dlili.04s.net/v1Recommended 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

ItemDescription
Base URLYour site endpoint, usually including /v1
API keyGenerated on the API Tokens page
Model nameA model ID currently available to your account

Quick start checklist

Before calling the API, confirm these items:

  1. Your endpoint includes /v1.
  2. You are using your own API key, not a backend access token.
  3. The model name exists in your current account's visible model list.
  4. Use the main site only for login, payment, and account linking actions.
  1. Authentication
  2. Chat APIs
  3. Common Endpoints

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 /messages interface, and only some Claude models do.
  • If your SDK supports both chat/completions and responses, 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