curl -X POST https://api.orthogonal.com/v1/run \
-H 'Authorization: Bearer orth_live_••••' \
-H 'Content-Type: application/json' \
-d '{
"api": "zai",
"path": "/api/v1/agents",
"method": "POST",
"body": {
"agent_id": "",
"messages": [
{
"role": "",
"content": [
{
"text": "",
"type": ""
}
]
}
],
"custom_variables": {
"source_lang": "",
"target_lang": ""
}
}
}'
{
"success": true,
"data": {
"id": "20261121070614f88fcaf22ea24c46",
"usage": { … },
"status": "success",
"choices": [ 1 item ],
"agent_id": "general_translation"
}
}
A real response, recorded when Orthogonal checked this endpoint.
The final charge depends on what comes back. It shows after Run.
from$0.763per 1M tokens · varies by agent
Response-basedYou pay for the tokens the call uses at the agent's rate, read from the response, never more than $1.09 per call.
You aren't charged for failed calls. A wallet payment for a failed call is refunded.
About this endpoint
Run one of Z.ai's agents, chosen by agent_id: general_translation (multilingual translation with strategies and glossaries), vidu_template_agent (popular special-effects video templates, asynchronous; read the result with the agent job result endpoint) or slides_glm_agent (GLM Slide/Poster agent, beta).
Body parameters
agent_idrequiredstringAgent to run: general_translation, vidu_template_agent (special-effects video templates, async) or slides_glm_agent (Slide/Poster agent, beta).streambooleanFalse for sync calls (default). True for streaming.messagesobjectMessages to translate (general_translation, required there). Not used by vidu_template_agent; slides_glm_agent takes the user's request here.custom_variablesobjectrequest_idstringUser-defined unique ID; used to distinguish requests. Auto-generated if omitted.conversation_idstringConversation Id.Response types
idTask ID.stringagent_idAgent ID.stringstatusTask status.stringMore from Z.ai
- Web page readerPOST/api/paas/v4/reader$0.0109 per callFixed
- Chat completionPOST/api/paas/v4/chat/completionsFrom $0.0327 per 1M tokens · varies by modelResponse-based · up to $2.228749
- Async image generationPOST/api/paas/v4/async/images/generations$0.01635 per callFixed
- Web searchPOST/api/paas/v4/web_search$0.0109 per callFixed
- Image/video job resultGET/api/paas/v4/async-result/{id}Free
- Token countPOST/api/paas/v4/tokenizer$0.000109 per callFixed
- Video generationPOST/api/paas/v4/videos/generations$0.218 per callFixed
- Agent job resultPOST/api/v1/agents/async-resultFree
- Speech to textPOST/api/paas/v4/audio/transcriptions$0.001308 per callFixed
- Document OCR parsingPOST/api/paas/v4/layout_parsing$0.0327 per 1M tokensResponse-based · up to $0.00981
- Slides conversation exportPOST/api/v1/agents/conversationFree
- Image generationPOST/api/paas/v4/images/generations$0.01635 per callFixed