Chat Completions API
OpenAI-compatible interface for supported Ling and Ring models.
Chat Completions APILink to section
The chat completions endpoint mirrors OpenAI’s v1/chat/completions contract. Use it to stream or fetch supported Ling and Ring model responses with minimal code changes.
Migration notice:
Ling-1T,ling-1t, andinclusionai/ling-1tare retired and rejected. Send one of the exact supported model IDs below.
- Endpoint:
POST https://ling-1t.ai/api/v1/chat/completions - Auth:
Authorization: Bearer <api-key> - Models:
Ling-2.6-1T,Ling-2.6-flash,Ring-2.6-1T
Model RatesLink to section
Ling-2.6-1T: $0.08 input and $0.65 output per million compute unitsLing-2.6-flash: $0.05 input and $0.004 output per million compute unitsRing-2.6-1T: $0.08 input and $0.65 output per million compute units
Ring Reasoning EffortLink to section
Only Ring-2.6-1T accepts the optional reasoning object. Its effort value can be high or xhigh. When reasoning is present without an effort, the API uses high. Use xhigh for tasks that need deeper reasoning, with the expectation that it may consume significantly more tokens.
{
"model": "Ring-2.6-1T",
"messages": [
{ "role": "user", "content": "Analyze this multi-step scheduling problem." }
],
"reasoning": { "effort": "xhigh" },
"max_tokens": 2048
}
Sending reasoning to either Ling model, or sending an effort other than high or xhigh, returns a 400 error before the upstream request is made.
Request Example (JSON)Link to section
POST /api/v1/chat/completions HTTP/1.1
Host: ling-1t.ai
Authorization: Bearer LING1T-...
Content-Type: application/json
{
"model": "Ling-2.6-flash",
"messages": [
{ "role": "system", "content": "You are a precise financial analyst." },
{ "role": "user", "content": "Summarize Q4 revenue trends for APAC." }
],
"temperature": 0.4,
"max_tokens": 512,
"stream": false
}
cURLLink to section
curl https://ling-1t.ai/api/v1/chat/completions \
-H "content-type: application/json" \
-H "authorization: Bearer $LING1T_API_KEY" \
-d '{
"model": "Ling-2.6-1T",
"messages": [
{ "role": "system", "content": "You are a precise financial analyst." },
{ "role": "user", "content": "Summarize Q4 revenue trends for APAC." }
],
"temperature": 0.4,
"max_tokens": 512
}'
Node.js (TypeScript)Link to section
import fetch from 'node-fetch';
const response = await fetch('https://ling-1t.ai/api/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.LING1T_API_KEY}`,
},
body: JSON.stringify({
model: 'Ling-2.6-1T',
messages: [
{ role: 'system', content: 'You are a precise financial analyst.' },
{ role: 'user', content: 'Summarize Q4 revenue trends for APAC.' },
],
}),
});
const data = await response.json();
console.log(data.choices[0].message?.content);
PythonLink to section
import requests
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}
payload = {
"model": "Ling-2.6-1T",
"messages": [
{"role": "system", "content": "You are a precise financial analyst."},
{"role": "user", "content": "Summarize Q4 revenue trends for APAC."}
],
"temperature": 0.4,
"max_tokens": 512
}
resp = requests.post("https://ling-1t.ai/api/v1/chat/completions", json=payload, headers=headers)
resp.raise_for_status()
print(resp.json()["choices"][0]["message"]["content"])
Streaming ResponsesLink to section
Set stream: true to receive Server-Sent Events (SSE). The data format matches OpenAI’s, enabling drop-in use of existing clients.
data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Hello"}}],"model":"Ling-2.6-1T"}
...
data: [DONE]
Usage MetricsLink to section
Responses include token usage in the OpenAI schema (usage.prompt_tokens, usage.completion_tokens). These values feed billing and are visible in the dashboard usage explorer.