Hunyuan Proxy
Home Playground Docs Get API Key

API Documentation

Chat Completions

This endpoint mimics the OpenAI Chat Completion API.

Endpoint

POST /v1/chat/completions

Request Headers

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request Body (Example)

{
  "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.

Response

Returns a stream of Server-Sent Events (SSE) in the OpenAI format for streaming requests, or a JSON object for non-streaming requests.

Models

Get a list of available models.

Endpoint

GET /v1/models

Response (Example)


{
  "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"
    }
  ]
}
              

Get API Key

Retrieves the API key.

Endpoint

GET /getkey