Developer Docs
Quickstart
Start with one API key, one base URL, and OpenAI-compatible requests. The examples on this site use the API domain for the current English instance.
Base
https://api.lingapi.ai/v1
Quick checklist
- Create or sign in to a Ling.AI account.
- Create an API key in the console and keep it server-side.
- Send the key with Authorization: Bearer <YOUR_API_KEY> or x-api-key.
- Use the Models endpoint before hard-coding a model id.
First request
Use the OpenAI-compatible Chat Completions endpoint for the quickest integration path. You can switch to Responses, Anthropic-compatible, or Gemini-compatible routes later without changing account and billing setup.
Recommended flow
Fetch available models, choose a model id that matches your workload, send a small non-streaming request, then enable streaming or tools once your retry and logging path is ready.
Example
Example
curl https://api.lingapi.ai/v1/chat/completions \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"model":"qwen-flash","messages":[{"role":"user","content":"Say hello from Ling.AI."}]}'