POST /v1/chat/completions
curl https://api.hilinkup.com/v1/chat/completions \
-H "Authorization: Bearer $HILINKUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"aliyun/kimi-k3","messages":[{"role":"user","content":"Hello"}]}'
model and messages. Optional features include streaming and tool calls when supported by the model.
Copy-ready requests
SetHILINKUP_API_KEY first, then replace model with an ID returned by /v1/models.
- Non-streaming
- Streaming
- Tool call
curl https://api.hilinkup.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HILINKUP_API_KEY" \
-d '{
"model": "aliyun/kimi-k3",
"messages": [
{
"role": "system",
"content": "You are a concise assistant."
},
{
"role": "user",
"content": "Explain streaming responses."
}
],
"temperature": 0.7,
"top_p": 1,
"max_tokens": 512,
"stream": false
}'
curl https://api.hilinkup.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HILINKUP_API_KEY" \
-d '{
"model": "aliyun/kimi-k3",
"messages": [
{
"role": "user",
"content": "Introduce HiLinkup in three sentences."
}
],
"temperature": 0.3,
"max_tokens": 512,
"stream": true
}'
curl https://api.hilinkup.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HILINKUP_API_KEY" \
-d '{
"model": "aliyun/kimi-k3",
"messages": [
{
"role": "user",
"content": "Should I bring an umbrella in Beijing today?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "City name, such as Beijing"
}
},
"required": ["city"]
}
}
}
],
"tool_choice": "auto",
"temperature": 0.2,
"max_tokens": 512
}'
Tools, vision, structured outputs, and advanced parameters only work with models that support them.