Step 1: Install required Python dependencies
Set up the required Python dependencies before starting.Step 2: Prepare the Input Payload
Holo2 is hosted on H Company’s inference platform and is compatible with the OpenAI Chat Completions API protocol. In this example, Holo2 is prompted to identify the correct location to click in order to successfully select a date on the calendar. Important: The input image must be resized using Qwen’ssmart_resize method. This is crucial because the served model performs its own internal resizing, which can alter the original image dimensions and lead to inaccurate or misaligned coordinate predictions from the model.
Step 3: Invoke Holo2 via API
This section shows you how to call the Holo1.5 model via API to perform a localization task.Step 3a: Set up your API key
You can provide the API key in two ways:- Directly by assigning it to the
API_KEYvariable. - Indirectly by adding it to a .env file under the variable name
HAI_API_KEY.
Step 3b: Set up the model
Prepare the model endpoint by providing the model name and base URL.API Configuration
Here are the relevant URLs and names to use when configuring the API for Holo:Model name
Here are the relevant URLs and names to use when configuring the API for Holo:
- holo1-5-7b-20250915
- holo1-5-3b-20250915
- holo1-7b-20250521
- holo1-3b-20250521
Step 3c: Invoke the model
Send the image and task to the model via the API, then handle and display the model’s output.
.png)
