页面简介
This endpoint is used to query the result of an asynchronous request.
正文摘录
cURLcURLcurl --request POST \ --url https://api.z.ai/api/v1/agents/async-result \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "agent_id": "<string>", "async_id": "<string>" } '200default{ "status": "<string>", "agent_id": "<string>", "async_id": "<string>", "choices": [ { "index": 123, "finish_reason": "<string>", "message": [ { "role": "<string>", "content": [ { "type": "<string>", "video_url": "<string>" } ] } ] } ] }POST/v1/agents/async-resultTry itcURLcURLcurl --request POST \ --url https://api.z.ai/api/v1/agents/async-result \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "agent_id": "<string>", "async_id": "<string>" } '200default{ "status": "<string>", "agent_id": "<string>", "async_id": "<string>", "choices": [ { "index": 123, "finish_reason": "<string>", "message": [ { "role": "<string>", "content": [ { "type": "<string>", "video_url": "<string>" } ] } ] } ] }AuthorizationsAuthorizationstringheaderrequiredUse the following format for authentication: Bearer HeadersAccept-Languageenum<string>default:en-US,enConfig desired response language for HTTP requests.Available options: en-US,en Example:"en-US,en"Bodyapplication/jsonagent_idstringAgent ID: vidu_template_agent.async_idstringTask ID from async response.Response200application/jsonProcessing successfulstatusstringpending (processing), success (completed), failed (failed).agent_idstringAgent IDasync_idstringAsynchronous task ID.choicesobject[]Agent output.Hide child attributeschoices.indexintegerResult index.choices.finish_reasonstringReason for model inference termination. Can be ‘stop’, ‘tool_calls’, ‘length’, ‘sensitive’, or ‘network_error’.choices.messageobject[]Hide child attributeschoices.message.rolestringRole: fixed as assistant.choices.message.contentobject[]Video file metadataHide child attributeschoices.message.content.typestringobject type: video_url.choices.message.content.video_urlstringMP4 video URL.Was this page helpful?YesNo