MaaS Open Platform API Documentation
Domain
https://hiharness.ai
Authentication
Use the Authorization header for Bearer authentication. The API key format is sk-xxxxxxxx.
Example:
Authorization: Bearer <YOUR_API_KEY>
Basic Workflow
Image and video models use asynchronous tasks:
- Submit a generation task and receive a
task_id. - Poll the result endpoint with the
task_id.
Large language models use /v1/chat/completions. Non-streaming requests return the full assistant message synchronously, and streaming requests return incremental content through SSE.
Available Models
Image Models
Hidream-O Series
HiDream-O1-Image-Dev-2604HiDream-O1-Image-Dev-2604HiDream-O1-Image-1.5HiDream-O1-Image-1.5HiDream-O1-Image-2HiDream-O1-Image-2HiDream-O1-Edit-1.5HiDream-O1-Edit-1.5
Hidream-Q Series
Image-2zvskglchidream-Q3-pro-ImageImage-f3qa3lphhidream-Q3-std-ImageImage-aw47boi4hidream-Q1-image
Hidream-H Series
Image-qyoyq2bihidream-H4.5-imageImage-84977rs4hidream-H4.0-image
Other Image Models
Image-zksa5by1hidream-tryon-v1Image-eccut7ddhidream-translate-v1Image-q5580iqfhidream-image-erase-v1Image-580g70sxhidream-outpainting-v1Image-11lqtks8hidream-superresolution-v1
Video Models
HiDream-O Series
HiDream-O1-Video-1.0HiDream-O1-Video-1.0
Hidream-Q Series
Video-6bj3i4u2hidream-Q3-pro-VideoVideo-jkpfq9r0hidream-Q3-std-VideoVideo-7flw327ghidream-Q2.6-VideoVideo-idegmbamhidream-Q2.5-pro-VideoVideo-3o4t26brhidream-Q1-video
Hidream-H Series
Video-eol8ra2dhidream-H1.5-videoVideo-9plmpqyohidream-H1.0-video
Other Video Models
Video-t2ze92dgavatar_image2video (digital human video)
Large Language Models
qwen3.5-plusqwen3.6-plusqwen3.7-plusqwen3.7-maxkimi-k2.6deepseek-v3-2-251201deepseek-v4-flashdeepseek-v4-pro
Sample Code
import time
import requests
import time
import requests
# Host and token
HOST = ""
TOKEN = "sk-xx"
head = {"Authorization": f"Bearer {TOKEN}"}
def send_task(body: dict, path):
url = f"{HOST}{path}"
# Print request parameters to help troubleshoot issues
# print(url, body, head)
res = requests.post(url, json=body, headers=head)
assert (
res.status_code == 200 and res.json().get("code") == 0
), f"{res.status_code}, {res.text}"
return res.json()
def get_task_result(task_id: str, path):
url = f"{HOST}{path}"
res = requests.get(url, headers=head, params={"task_id": task_id})
assert (
res.status_code == 200 and res.json().get("code") == 0
), f"{res.status_code}, {res.text}"
return res.json()
def main():
# Note that image and video tasks use different endpoint paths
request_path = f"/api/maas/gw/v1/images/generations"
# Model parameters (common example; see specific model docs for details)
request_params = {
"model_id": "Image-xx",
"prompt": "A beautiful landscape",
"request_id": "my-task-001",
"n": 1,
"negative_prompt": "",
}
print(f"Starting task {request_params.get('model_id')}")
response_json = send_task(request_params, path=request_path)
task_id = response_json["result"]["task_id"]
print(f"Task {task_id} created successfully!")
result_path = request_path + "/results"
while True:
response_json = get_task_result(task_id, result_path)
result = response_json["result"]
if result["status"] == 1:
print(f"Task {task_id} completed:", result)
break
else:
print(f"Task {task_id} is still processing", result)
time.sleep(5)
if __name__ == "__main__":
main()