HY Image 3.5
Generate and edit with HY Image 3.5, set exact dimensions, and retrieve asynchronous results.
HY Image 3.5 API
Use an Official Group API key with hy-image-v3.5-preview. See the playground and current price.
The preview model generates one image per request from text or one or more references.
Pricing
| Output tier | US dollars per image |
|---|---|
| 1K / 2K | $0.024 |
| 4K | $0.032 |
References are free. The service reserves funds at acceptance and charges for delivery at the price active on submission. Confirmed failures are free. Keep checking submission_unknown, processing, and meter_pending tasks.
Parameters
| Parameter | Accepted values |
|---|---|
model | hy-image-v3.5-preview |
prompt | Required, 1–4,000 characters |
n | Fixed at 1 by default |
resolution | 1K (default), 2K, 4K. Lowercase is accepted. |
size | auto (default), one of the ten ratios below, or WIDTHxHEIGHT |
width / height | Integer pixel dimensions. Supply both to override size. |
image_urls | Up to five public HTTP(S) URLs or PNG/JPEG/WebP data URLs |
negative_prompt | Optional negative prompt |
seed | Optional nonnegative safe integer. Zero or omission selects a random seed. |
Supported ratios include 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9.
auto uses a square for text-to-image and follows the first reference when editing.
Exact width and height each range from 256 to 8,192 and must be multiples of 16. Total area cannot exceed 8,294,400 pixels. The API uses paired width and height first, then exact dimensions in size, then the aspect ratio and resolution. For exact dimensions, the shorter side sets the price tier. Up to 1,024 pixels is 1K, 1,025–2,048 is 2K, and more than 2,048 is 4K. Any supplied resolution must still be a valid value.
References support PNG, JPEG, and WebP up to 7 MB each and 35 MB total. Public URLs must be accessible without authentication. Masks, quality, video, callbacks, streaming, and unlisted options are unavailable. The playground supports resolution, aspect ratio, and uploads. Use the API for exact dimensions, negative prompts, and seeds.
Generate and edit
Each submitted example creates a separate billable task.
curl https://app.apipool.dev/v1/images/generations \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"hy-image-v3.5-preview","prompt":"A blue ceramic cup on a white table","size":"1:1","resolution":"1K","n":1}'To edit from a reference URL, use this JSON with the same endpoint and replace the example URL.
{
"model": "hy-image-v3.5-preview",
"prompt": "Make the cup red and preserve the background",
"image_urls": ["https://example.com/cup.png"],
"width": 2000,
"height": 1104,
"negative_prompt": "blur, watermark",
"seed": 42
}Upload a local file to the edit endpoint.
curl https://app.apipool.dev/v1/images/edits \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-F "model=hy-image-v3.5-preview" \
-F "prompt=Make the cup red and preserve the background" \
-F "resolution=2K" -F "size=auto" \
-F "[email protected]"Query and download
The submission returns HTTP 202 and a task id. Query it every 3–5 seconds with the same key.
TASK_ID="imgtask_..."
curl "https://app.apipool.dev/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIPOOL_API_KEY"When the task is completed, download data[].url before expiry. If it is failed, read the error. After a timeout or uncertain submission, check the existing task before retrying.
Troubleshooting
- HTTP 400. Check the prompt,
n=1, reference count, allowed dimensions, and 16-pixel increments. Remove unsupported fields. - HTTP 401 or 403. Check the API key, Official Group, and account access.
- Insufficient balance. Add funds before creating a new task. Keep checking tasks that are already processing.
- Reference failure. Check the format, size, public accessibility, and expiry.