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>"
}
对话型或文本型应用推理接口,支持同步和流式(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>",
"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>"
}
使用以下格式进行身份验证:Bearer <your api key>
请求成功
The response is of type object
.
Was this page helpful?