LogoLing 2.6 1T Docs

Messages API (Claude Format)

Anthropic-compatible request structure for supported Ling and Ring models.

Messages API (Claude Format)Link to section

Use this endpoint when integrating Ling-2.6-1T, Ling-2.6-flash, or Ring-2.6-1T with SDKs or workflows that expect Anthropic Claude semantics.

Migration notice: The retired Ling-1T model IDs are no longer accepted. Use one of the exact model IDs listed below.

  • Endpoint: POST https://ling-1t.ai/api/v1/messages
  • Headers:
    • x-api-key: <api-key>
    • anthropic-version: 2023-06-01
  • Streaming: not yet supported (returns full response)

Model RatesLink to section

  • Ling-2.6-1T: $0.08 input and $0.65 output per million compute units
  • Ling-2.6-flash: $0.05 input and $0.004 output per million compute units
  • Ring-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 output_config object. Set output_config.effort to high or xhigh; the default is high. The xhigh setting allows deeper reasoning and can consume significantly more tokens.

{
  "model": "Ring-2.6-1T",
  "messages": [
    { "role": "user", "content": "Analyze this multi-step scheduling problem." }
  ],
  "output_config": { "effort": "xhigh" },
  "max_tokens": 2048
}

The Messages endpoint validates this Claude-style field and maps it to the corresponding Ring reasoning control upstream. Other models reject output_config, and unsupported effort values return a 400 response.

Request SchemaLink to section

{
  "model": "Ling-2.6-1T",
  "system": "Provide concise, well-cited answers.",
  "messages": [
    {
      "role": "user",
      "content": "Draft a launch announcement for Ling-2.6-1T."
    }
  ],
  "max_tokens": 800,
  "temperature": 0.5
}

The messages array supports role values user and assistant. Each content entry may be a string or an array of { "type": "text", "text": "..." } blocks.

Example: cURLLink to section

curl https://ling-1t.ai/api/v1/messages \
  -H "content-type: application/json" \
  -H "x-api-key: $LING1T_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "Ling-2.6-1T",
    "system": "Provide concise, well-cited answers.",
    "messages": [
      {"role": "user", "content": "Draft a launch announcement for Ling-2.6-1T."}
    ],
    "max_tokens": 800
  }'

Node.js (TypeScript)Link to section

import fetch from 'node-fetch';

const response = await fetch('https://ling-1t.ai/api/v1/messages', {
  method: 'POST',
  headers: {
    'content-type': 'application/json',
    'x-api-key': process.env.LING1T_API_KEY ?? '',
    'anthropic-version': '2023-06-01',
  },
  body: JSON.stringify({
    model: 'Ling-2.6-1T',
    system: 'Provide concise, well-cited answers.',
    messages: [
      { role: 'user', content: 'Draft a launch announcement for Ling-2.6-1T.' },
    ],
    max_tokens: 800,
  }),
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const result = await response.json();
console.log(result.content?.[0]?.text);

PythonLink to section

import os
import requests

headers = {
    "content-type": "application/json",
    "x-api-key": os.getenv("LING1T_API_KEY", ""),
    "anthropic-version": "2023-06-01",
}

payload = {
    "model": "Ling-2.6-1T",
    "system": "Provide concise, well-cited answers.",
    "messages": [
        {"role": "user", "content": "Draft a launch announcement for Ling-2.6-1T."}
    ],
    "max_tokens": 800,
}

resp = requests.post("https://ling-1t.ai/api/v1/messages", json=payload, headers=headers)
resp.raise_for_status()
data = resp.json()
print(data["content"][0]["text"])

Response ShapeLink to section

{
  "id": "msg_01HZA...",
  "type": "message",
  "role": "assistant",
  "model": "Ling-2.6-1T",
  "content": [
    {
      "type": "text",
      "text": "Announcing Ling-2.6-1T..."
    }
  ],
  "usage": {
    "input_tokens": 215,
    "output_tokens": 438
  },
  "stop_reason": "end_turn",
  "created_at": "2025-06-23T08:42:11.201Z"
}

Use stop_reason to determine why generation ended (end_turn, max_tokens, etc.).

Client Integration TipsLink to section

  • Anthropic SDKs: Configure the base URL to https://ling-1t.ai/api/v1 and supply the headers above. Most clients allow overriding the endpoint.
  • Retries: Handle 429 (rate limit) and 500 responses with exponential backoff.
  • Token accounting: The response usage block feeds your internal cost monitoring.