header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/jsonRequired
Example
{"model":"glm-4.5v","messages":[{"role":"user","content":[{"type":"image_url","image_url":{"url":"https://cloudcovert-1305175928.cos.ap-guangzhou.myqcloud.com/%E5%9B%BE%E7%89%87grounding.PNG"}},{"type":"text","text":"Where is the second bottle of beer from the right on the table? Provide coordinates in [[xmin,ymin,xmax,ymax]] format"}]}],"thinking":{"type":"enabled"}}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.toiotech.com/v1/chat/completions' \
--header'Authorization: Bearer <token>' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "glm-4.5v",
"messages": [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://cloudcovert-1305175928.cos.ap-guangzhou.myqcloud.com/%E5%9B%BE%E7%89%87grounding.PNG"
}
},
{
"type": "text",
"text": "Where is the second bottle of beer from the right on the table? Provide coordinates in [[xmin,ymin,xmax,ymax]] format"
}
]
}
],
"thinking": {
"type": "enabled"
}
}'
Responses
🟢200OK
application/json
Body
Example
{"choices":[{"finish_reason":"stop","index":0,"message":{"content":"\nThe coordinates of the second bottle of beer from the right on the table are [[97,595,179,988]].","reasoning_content":"The question is asking for the coordinates of the second bottle of beer from the right on the table. First, we need to identify all the bottles on the table. In the image, there are two green - colored beer bottles with \"MAGNA\" labels and a clear bottle (which might be water). The second bottle from the right among the beer bottles would be the one on the left side of the two beer bottles. We then need to determine its bounding box coordinates by visually inspecting its position on the table in terms of x and y values. After carefully looking at the image, we can mark the minimum and maximum x and y values that enclose this bottle.","role":"assistant"}}],"created":1767002348,"id":"202512291759010791fa0007c644c1","model":"glm-4.5v","object":"chat.completion","request_id":"202512291759010791fa0007c644c1","usage":{"completion_tokens":169,"prompt_tokens":697,"prompt_tokens_details":{"cached_tokens":5},"total_tokens":866}}