There are three main steps to using the GLM-4.5V API:
- Get API KeyFirst of all, you need to register an account on the Wisdom Spectrum AI Open Platform and create an exclusive API Key.
- Installing the SDK: Install the official Python SDK via pip (
pip install zhipuai
) - Write the calling code: After initializing the ZhipuAI client, construct a message body containing text and image URLs to send the request. A typical call example consists of specifying the model as glm-4.5v, constructing a message array containing image URLs and text questions, and finally parsing the returned response content
For tasks that require deep reasoning, you can add to the request thethinking
Parameters enable think mode. the API uses per-token billing, charging $0.6/million tokens and $1.8/million tokens for input and output respectively.
This answer comes from the articleGLM-4.5V: A multimodal dialog model capable of understanding images and videos and generating codeThe