Authorizations
使用以下格式进行身份验证:Bearer <your api key>
Body
application/json
Response
请求成功
The response is of type object
.
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>",
"conversation_id": "<string>",
"third_request_id": "<string>",
"stream": true,
"messages": [
{
"role": "<string>",
"content": [
{
"type": "<string>",
"value": "<string>",
"key": "<string>"
}
]
}
],
"role": "<string>",
"send_log_event": true
}'
{
"request_id": "<string>",
"conversation_id": "<string>",
"app_id": "<string>",
"choices": [
{
"index": 123,
"finish_reason": "<string>",
"error_msg": {
"code": 123,
"msg": "<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
}
]
}
对话型或文本型应用推理接口,支持同步和流式SSE
调用。
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>",
"conversation_id": "<string>",
"third_request_id": "<string>",
"stream": true,
"messages": [
{
"role": "<string>",
"content": [
{
"type": "<string>",
"value": "<string>",
"key": "<string>"
}
]
}
],
"role": "<string>",
"send_log_event": true
}'
{
"request_id": "<string>",
"conversation_id": "<string>",
"app_id": "<string>",
"choices": [
{
"index": 123,
"finish_reason": "<string>",
"error_msg": {
"code": 123,
"msg": "<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
}
]
}
使用以下格式进行身份验证:Bearer <your api key>
请求成功
The response is of type object
.