跳转到主要内容
POST
/
v1
/
chat
/
completions
curl --request POST \
  --url https://api.powertokens.ai/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "MiniMax-M2.7",
  "messages": [
    {
      "role": "system",
      "content": "你是一个简洁的助手。"
    },
    {
      "role": "user",
      "content": "请用一句话介绍巴黎。"
    }
  ],
  "temperature": 0.3
}
'
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {}
  ],
  "usage": {}
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
model
enum<string>
必填
可用选项:
MiniMax-M2.7,
MiniMax-M2.7-highspeed,
MiniMax-M2.5,
MiniMax-M2.5-highspeed
messages
object[]
必填
temperature
number
top_p
number
max_tokens
integer
stream
boolean
stop

响应

调用成功。非流式返回 OpenAI 兼容 JSON;流式返回 OpenAI 兼容 SSE 事件流。

id
string
object
string
created
integer
model
string
choices
object[]
usage
object