This endpoint mimics the OpenAI Chat Completion API.
POST /v1/chat/completions
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "Hello, who are you?"
}
],
"model": "hunyuan-t1-latest",
"stream": true
}
Supported models: hunyuan-t1-latest
, hunyuan-turbos-latest
. To make a non-streaming request, set "stream": false
in the request body.
Returns a stream of Server-Sent Events (SSE) in the OpenAI format for streaming requests, or a JSON object for non-streaming requests.
Get a list of available models.
GET /v1/models
{
"object": "list",
"data": [
{
"id": "hunyuan-t1-latest",
"object": "model",
"created": 1678886400,
"owned_by": "tencent"
},
{
"id": "hunyuan-turbos-latest",
"object": "model",
"created": 1700000000,
"owned_by": "tencent"
}
]
}
Retrieves the API key.
GET /getkey