curl --request POST \
--url https://open.bigmodel.cn/api/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "doc_translation_agent",
"messages": [
{
"role": "user",
"content": [
{
"type": "file_id",
"file_id": "agent_1750681215_9b92722d788f4b32bab28cc333293584"
}
]
}
]
}'
{
"id": "<string>",
"agent_id": "<string>",
"conversation_id": "<string>",
"async_id": "<string>",
"choices": [
{
"index": 123,
"messages": [
{
"role": "assistant",
"content": "<string>"
}
],
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}
与智能体进行对话交互。支持同步和流式调用,提供智能体的专业能力。
curl --request POST \
--url https://open.bigmodel.cn/api/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "doc_translation_agent",
"messages": [
{
"role": "user",
"content": [
{
"type": "file_id",
"file_id": "agent_1750681215_9b92722d788f4b32bab28cc333293584"
}
]
}
]
}'
{
"id": "<string>",
"agent_id": "<string>",
"conversation_id": "<string>",
"async_id": "<string>",
"choices": [
{
"index": 123,
"messages": [
{
"role": "assistant",
"content": "<string>"
}
],
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}
使用以下格式进行身份验证:Bearer <your api key>
业务处理成功
The response is of type object
.