POST
/
llm-application
/
open
/
v3
/
application
/
invoke
推理接口
curl --request POST \
  --url https://open.bigmodel.cn/api/llm-application/open/v3/application/invoke \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "app_id": "<string>",
  "messages": [
    {
      "role": "<string>",
      "content": [
        {
          "type": "<string>",
          "value": "<string>",
          "key": "<string>"
        }
      ]
    }
  ]
}'
{
  "request_id": "<string>",
  "conversation_id": "<string>",
  "app_id": "<string>",
  "choices": [
    {
      "index": 123,
      "finish_reason": "<string>",
      "delta": {
        "content": {
          "msg": "<string>",
          "type": "<string>",
          "code": "<string>",
          "file": "<string>",
          "url": "<string>",
          "coverUrl": "<string>"
        },
        "event": {
          "node_id": "<string>",
          "node_name": "<string>",
          "type": "<string>",
          "content": "<string>",
          "time": 123,
          "tool_calls": {
            "type": "<string>",
            "tool_calls_data": {}
          }
        },
        "tool_calls": {
          "type": "<string>",
          "tool_calls_data": {}
        }
      },
      "messages": {
        "content": {
          "msg": "<string>",
          "type": "<string>",
          "code": "<string>",
          "file": "<string>",
          "url": "<string>",
          "coverUrl": "<string>"
        },
        "event": [
          {
            "node_id": "<string>",
            "node_name": "<string>",
            "type": "<string>",
            "content": "<string>",
            "time": 123,
            "tool_calls": {
              "type": "<string>",
              "tool_calls_data": {}
            }
          }
        ]
      }
    }
  ],
  "usage": [
    {
      "model": "<string>",
      "nodeName": "<string>",
      "inputTokenCount": 123,
      "outputTokenCount": 123,
      "totalTokenCount": 123
    }
  ],
  "model": "<string>",
  "error_msg": "<string>"
}

Authorizations

Authorization
string
header
required

使用以下格式进行身份验证:Bearer <your api key>

Body

application/json

Response

200
application/json

请求成功

The response is of type object.