Quickstart
Ant Ling’s API is compatible with the OpenAI interface format. You can use the OpenAI SDK or make direct HTTP requests.
Access via SDK
Python
1. Install OpenAI SDK
pip install openai2. Call the API
from openai import OpenAI
client = OpenAI(
base_url="https://api.ant-ling.com/v1",
api_key="YOUR_API_KEY"
)
response = client.chat.completions.create(
model="Ling-2.6-1T",
# Recommended: Use Ling-2.6-1T / Ling-2.6-flash — the latest Ant Ling models
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, please introduce Ant Ling LLM"}
],
max_tokens=1000
)
print(response.choices[0].message.content)3. Sample Output
Ant Ling is an enterprise-grade LLM platform launched by Ant Group, featuring three model families:
1. **Ling (General Model)**: Suitable for conversation, text generation, content creation, and other scenarios
2. **Ring (Reasoning Model)**: Specializes in mathematical computation, code generation, logical reasoning, and other deep thinking tasks
3. **Ming (Multimodal Model)**: Supports cross-modal understanding and generation of images, audio, and video
Ant Ling models use MoE architecture to maintain high performance while achieving efficient inference,
and share research results through the open-source community Inclusion AI.Access via HTTP Request
If you prefer not to use an SDK, you can also call the API directly via HTTP requests:
curl --request POST \
--url https://api.ant-ling.com/v1/chat/completions \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "Ling-2.6-1T",
"stream": true,
"messages": [
{
"role": "user",
"content": "Hello, please introduce Ant Ling LLM"
}
]
}'Streaming Response
For streaming output, simply add stream: true to your request.
Python
response = client.chat.completions.create(
model="Ling-2.6-1T",
messages=[
{"role": "user", "content": "Hello"}
],
stream=True
)
for chunk in response:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")Next Steps
- Choose the right model - Learn about the Use Cases for Ling, Ring, and Ming
- View API Reference - See complete API parameter documentation
- Learn Best Practices - Learn how to optimize prompts and calling strategies
Was this page helpful?
Last updated on