Bearer 鉴权
生成、状态查询和历史列表请求都使用 Authorization 请求头传入 API key。
生成、状态查询和历史列表请求都使用 Authorization 请求头传入 API key。
通过公开端点提交提示词、查询生成进度,并读取完成后的图片结果。
HiDream O1 Image 1.5 通常每张图消耗 4 积分。
在账号中创建或复制 API key,然后用 Authorization: Bearer <YOUR_API_KEY> 传入。API key 必须保存在你自己的服务端,不要写进前端代码。
生成接口使用 JSON,支持 prompt、size、num_inference_steps、guidance_scale、output_format 和可选 negative_prompt。状态和历史接口会返回任务状态与可用的结果 URL。
curl -X POST https://hidreamimage.com/api/image/hidream-o1-image-1.5/generate \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A clean product poster for a silver perfume bottle, readable headline, studio lighting",
"size": "16:9",
"num_inference_steps": 28,
"guidance_scale": 4,
"output_format": "jpeg"
}'curl "https://hidreamimage.com/api/image/hidream-o1-image-1.5/status?task_id=<TASK_ID>" \
-H "Authorization: Bearer <YOUR_API_KEY>"curl "https://hidreamimage.com/api/image/hidream-o1-image-1.5/list?page=1&limit=12" \
-H "Authorization: Bearer <YOUR_API_KEY>"登录账号,创建或复制 API key,并放入你自己的后端密钥配置中。
POST 到生成接口,传入 prompt、size、可选 negative_prompt 和输出格式。
使用 task_id 查询状态,在任务完成后把图片结果 URL 展示到你的产品流程中。
是。API 生成与在线工作台使用同一套积分系统,HiDream O1 Image 1.5 通常每张图消耗 4 积分。
不建议。请从你自己的后端调用 API,前端只调用你的服务端接口,避免 API key 暴露在浏览器代码中。