Messages API (Claude Format)
Anthropic-compatible request structure for Ling-1T.
Messages API (Claude Format)
Use this endpoint when integrating Ling-1T with SDKs or workflows that expect Anthropic Claude semantics.
- 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)
Request Schema
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: cURL
Response Shape
Use stop_reason to determine why generation ended (end_turn, max_tokens, etc.).
Client Integration Tips
- Anthropic SDKs: Configure the base URL to
https://ling-1t.ai/api/v1and supply the headers above. Most clients allow overriding the endpoint. - Retries: Handle
429(rate limit) and500responses with exponential backoff. - Token accounting: The response usage block feeds your internal cost monitoring.