1. 注册并登录
- 打开控制台并创建账号
- 确认登录后可以进入概览页
- 最高 $2 试用额度:初始 $1,通过内测资料审核后追加 $1。

快速开始
本页面面向当前内测开发者,默认你会使用 OpenAI-compatible chat completions 路径和控制台签发的 API Key 进行引导式测试。
curl https://api.anlinkai.com/api/v1/chat/completions \
-H "Authorization: Bearer ak_your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-flash",
"messages": [
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Write a release note headline."}
]
}'步骤
第一次接入保持简单。先确认账号权限、API Key 创建和一次成功请求,再扩展流量形态。
示例
这些示例对应当前 Beta 能力边界,不是未来多端点版本。
curl https://api.anlinkai.com/api/v1/chat/completions \
-H "Authorization: Bearer ak_your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-flash",
"messages": [
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Write a release note headline."}
]
}'const response = await fetch("https://api.anlinkai.com/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.ANLINK_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "qwen-flash",
messages: [
{ role: "system", content: "You are a concise assistant." },
{ role: "user", content: "Write a release note headline." }
]
})
});
const data = await response.json();
console.log(data);const response = await fetch("https://api.anlinkai.com/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.ANLINK_API_KEY,
"Content-Type": "application/json",
"Accept": "text/event-stream"
},
body: JSON.stringify({
model: "qwen-flash",
messages: [
{ role: "system", content: "You are a concise assistant." },
{ role: "user", content: "Write a release note headline." }
],
stream: true,
stream_options: { include_usage: true }
})
});
const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = "";
while (true) {
const { done, value } = await reader.read();
if (done) break;
buffer += decoder.decode(value, { stream: true });
const events = buffer.split("\n\n");
buffer = events.pop() || "";
for (const event of events) {
const data = event.split("\n").find(line => line.startsWith("data:"))?.replace(/^data:\s*/, "");
if (!data || data === "[DONE]") continue;
const chunk = JSON.parse(data);
process.stdout.write(chunk.choices?.[0]?.delta?.content || "");
}
}import os
import requests
resp = requests.post(
"https://api.anlinkai.com/api/v1/chat/completions",
headers={
"Authorization": f"Bearer {os.environ['ANLINK_API_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "qwen-flash",
"messages": [
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Write a release note headline."},
],
},
timeout=60,
)
print(resp.status_code)
print(resp.json())检查清单
https://console.anlinkai.comhttps://api.anlinkai.com/api/v1POST /chat/completions/zh-CN/faq/zh-CN/model-catalog/zh-CN/billing-and-rechargehello@anlinkai.com