curl -X POST https://api.orthogonal.com/v1/run \
-H 'Authorization: Bearer orth_live_••••' \
-H 'Content-Type: application/json' \
-d '{
"api": "zai",
"path": "/api/paas/v4/images/generations",
"method": "POST",
"body": {
"model": "",
"prompt": "",
"quality": "",
"size": ""
}
}'
{
"success": true,
"data": {
"id": "20261121070515711966bf897c4496",
"data": [ 1 item ],
"created": 1795215915,
"request_id": "20261121070515711966bf897c4496"
}
}
A real response, recorded when Orthogonal checked this endpoint.
$0.01635per call
Every call costs the same.
You aren't charged for failed calls. A wallet payment for a failed call is refunded.
About this endpoint
Use [GLM-Image](/guides/image/glm-image) series models to generate high-quality images from text prompts. Through quick and accurate understanding of user text descriptions, AI image expression becomes more precise and personalized.
Body parameters
modelrequiredstringModel codepromptrequiredstringThe text description of the image to be generated.qualitystringThe quality of the generated image. glm-image default is hd, others model is standard. hd: Generates a more detailed and rich image with higher overall consistency, but takes about 20 seconds. standard: Generates an image quickly, suitable for scenarios with higher requirements for generation speed, takes about 5-10 seconds.sizestringImage size. glm-image recommended enum values: 1280x1280 (default), 1568x1056, 1056x1568, 1472x1088, 1088x1472, 1728x960, 960x1728. Custom parameter: Both width and height must be between 1024px-2048px, and must be divisible by 32, and the maximum pixel count must not exceed 2^22px.
Others model recommended enum values: 1024x1024 (default), 768x1344, 864x1152, 1344x768, 1152x864, 1440x720, 720x1440. Custom parameter: Both width and height must be between `512user_idstringUnique ID of the end user, helping the platform intervene in illegal activities, inappropriate content generation, or other abuses. ID length: 6 to 128 characters.Response types
createdRequest creation time, in Unix timestamp format, unit is seconds.integerMore from Z.ai
- Web page readerPOST/api/paas/v4/reader$0.0109 per callFixed
- Agent taskPOST/api/v1/agentsFrom $0.763 per 1M tokens · varies by agentResponse-based · up to $1.09
- 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