跳转到主要内容
POST
/
llm
LLM
curl --request POST \
  --url https://dream-gateway.livepeer.cloud/llm \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "role": "<string>",
      "content": "<string>"
    }
  ],
  "model": "",
  "temperature": 0.7,
  "max_tokens": 256,
  "top_p": 1,
  "top_k": -1,
  "stream": false
}
'
{
  "id": "<string>",
  "model": "<string>",
  "created": 123,
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  },
  "choices": [
    {
      "index": 123,
      "finish_reason": "",
      "delta": {
        "role": "<string>",
        "content": "<string>"
      },
      "message": {
        "role": "<string>",
        "content": "<string>"
      }
    }
  ]
}

授权

Authorization
string
header
必填

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

请求体

application/json
messages
LLMMessage · object[]
必填
model
string
默认值:""
temperature
number
默认值:0.7
max_tokens
integer
默认值:256
top_p
number
默认值:1
top_k
integer
默认值:-1
stream
boolean
默认值:false

响应

Successful Response

id
string
必填
model
string
必填
created
integer
必填
usage
LLMTokenUsage · object
必填
choices
LLMChoice · object[]
必填
Last modified on March 1, 2026