

POST https://vanchin.streamlake.ai/api/gateway/v1/endpoints/chat/completions
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Parameter | Type | Required | Description |
model | string | Yes | Inference Endpoint ID |
messages | array | Yes | Lists of conversation messages |
temperature | float | No | Sampling Temperature, Range: 0-2, Default: 1 |
top_p | float | No | Nucleus Sampling Parameter, Range: 0-1, Default: 1 |
n | integer | No | Number of Responses to Generate, Default: 1 |
stream | boolean | No | Whether to stream responses, Default: false |
stop | string/array | No | Stop words |
max_tokens | integer | No | Maximum Generation Length |
presence_penalty | float | No | Presence Penalty, Range: -2 to 2, Default: 0 |
frequency_penalty | float | No | Frequency Penalty, Range: -2 to 2, Default: 0 |
{
"messages": [
{
"role": "",
"content": ""
}
],
"model": "",
"stream": false,
}
For all successfully processed requests, HTTP status code 200 will be returned.
For API call errors, HTTP status codes 4xx or 5xx will be returned as exception responses.
{
"id": "req-71z2sj-1755282699618223575", // Request ID, uniquely identifies a single request
"object": "chat.completion", // Object type, indicates this is a chat completion response
"created": 1741569952, // Unix timestamp (in seconds) when this completion was created
"model": "", // Model name used to generate this completion
"choices": [ // A list of chat completion candidates generated by the model (may contain multiple candidate replies)
{
"index": 0, // Index of this candidate in the list (0-based)
"message": { // Message content
"role": "assistant", // Role type for the generated message content ("assistant")
"content": "Hello, how can I help you?", // Actual model response content
"refusal": null, // Reason for refusal (if the AI declined to answer)
"annotations": [] // Metadata (additional metadata)
},
"logprobs": null, // Log probability information (for generation probability analysis)
// Reason for generation termination
"finish_reason": "stop" // Reason for completion(e.g., stop/length/content_filter)
}
],
"usage": { // Token usage statistics
"prompt_tokens": 19, // Number of input prompt tokens consumed
"completion_tokens": 10, // Number of output tokens generated
"total_tokens": 29, // Total tokens (prompt + completion)
"prompt_tokens_details": { // Details of input tokens
"cached_tokens": 0, // Cached tokens count
"audio_tokens": 0 // Audio tokens count
},
"completion_tokens_details": { // Details of output tokens
"reasoning_tokens": 0, // Tokens used during inference
"audio_tokens": 0, // Number of audio output tokens
"accepted_prediction_tokens": 0, // Number of accepted predicted tokens
"rejected_prediction_tokens": 0 // Number of rejected predicted tokens
}
},
"service_tier": "default" // Service tier (default/scale/etc.)
}
data: {
"choices": [
{
"delta": {
"content": "Hello"
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 1755282700,
"event": "model_thought",
"id": "req-71z2sj-1755282699618223575",
"model": "qwen3-30b-a3b",
"object": "chat.completion.chunk",
"system_fingerprint": null,
"usage": null
}
......
data: {
"choices": [],
"created": 1755283049,
"id": "req-pg48yq-1755283048307453384",
"model": "qwen3-30b-a3b",
"object": "chat.completion.chunk",
"system_fingerprint": null,
"usage": {
"completion_tokens": 1470,
"completion_tokens_details": {
"reasoning_tokens": 454
},
"prompt_tokens": 11,
"total_tokens": 1481
}
}
data: [DONE]
{
"ResponseMeta": {
"RequestId": "",
"ErrorCode": "",
"ErrorMessage": ""
}
}