Skip to content
ეს გვერდი ჯერ თქვენს ენაზე ხელმისაწვდომი არ არის და ინგლისურად არის ნაჩვენები.

Hy-Image-3.5 Preview Image Generation

Text-to-image and up to 5 reference images, with 1K / 2K / 4K output or exact pixel dimensions. One image per request.

მთელი დოკუმენტაცია
POST/v1/images/generations

Note

This endpoint is asynchronous. After submission, obtain the task ID from data[0].task_id and use Task Query to retrieve the status and image. Poll every 3–5 seconds with a recommended overall client timeout of 5 minutes. Stop at completed or failed.

მოთხოვნის მაგალითები

curl --request POST \
  --url https://api.apisea.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "hy-image-v3.5-preview",
    "prompt": "A golden retriever running on a beach in warm evening light",
    "size": "16:9",
    "resolution": "2K"
  }'

Request headers

Authorizationstringrequired

Bearer authentication: Bearer <token>, where <token> is your APISea API Key.

Request parameters

modelstringrequired

Must be hy-image-v3.5-preview.

nsfw_checkbooleandefault: false

Whether to run content moderation before submitting the image task.

  • true: use omni-moderation-latest to review prompts and input images
  • false or omitted: do not send a moderation request, adding no moderation cost or latency (default)
promptstringrequired

Text description for image generation or editing. Supports Chinese and English; must not be empty.

sizestringdefault: auto

Output aspect ratio or exact pixel dimensions.

  • Aspect ratio: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9.
  • Exact pixels: for example, 2000x1104, subject to the pixel limits below.
  • auto or omitted: text-to-image defaults to 1:1; image-to-image follows the reference image's aspect ratio.

With exact pixel dimensions, resolution does not determine the output dimensions.

resolutionstringdefault: 1K

Output resolution tier: 1K, 2K, or 4K; default: 1K.

With exact pixel dimensions, this field does not determine the output dimensions. Always use a supported value; unsupported values return HTTP 400.

widthinteger

Exact output width in pixels. Must be provided together with height; takes precedence over size and resolution.

Width must be 256–8192, and width × height must not exceed 8,294,400. Multiples of 16 are recommended.

heightinteger

Exact output height in pixels. Must be provided together with width.

Height must be 256–8192, and width × height must not exceed 8,294,400. Multiples of 16 are recommended.

image_urlsstring[]

Public reference image URLs, up to 5 images. Omit for text-to-image; include for reference-based generation using the same endpoint.

Supports JPEG, PNG, and WEBP. Each image should preferably be under 7MB. URLs must be publicly accessible.

negative_promptstring

Content you do not want in the image.

seedinteger

Random seed; must be a non-negative integer. 0 or omission uses a random value.

nintegerdefault: 1

Only one image is generated per request. Must be 1; other values return HTTP 400.

Dimension selection

Priority: paired width / height → exact pixels in size → aspect ratio or auto in size combined with resolution.

For exact pixels, width and height must each be 256–8192, with no more than 8,294,400 pixels in total. Multiples of 16 are recommended for both.

Exact pixel example

json
{
  "model": "hy-image-v3.5-preview",
  "prompt": "A minimalist seaside travel poster with a warm sunset",
  "width": 2000,
  "height": 1104
}

You may instead omit width and height and pass "size": "2000x1104".

Reference image example

json
{
  "model": "hy-image-v3.5-preview",
  "prompt": "Make the car in the reference image red, preserving the original background and lighting",
  "image_urls": ["https://example.com/car.png"],
  "size": "auto",
  "resolution": "2K",
  "negative_prompt": "blur, text watermarks",
  "seed": 42,
  "n": 1
}

Replace example URLs with real publicly accessible image URLs. For multiple references, add URLs to image_urls, up to 5 images total.

Submission response

codeinteger

Response status code; 200 indicates success.

dataarray

Task submission result.

Show task fields

statusstring

submitted means submission succeeded, not that the image has been generated.

task_idstring

Task ID for querying status and results.

Query task results

bash
curl --request GET \
  --url https://api.apisea.ai/v1/tasks/task_01K... \
  --header 'Authorization: Bearer <token>'

Successful response example (the image URL is a placeholder):

json
{
  "code": 200,
  "data": {
    "id": "task_01K...",
    "status": "completed",
    "result": {
      "images": [
        {
          "url": ["https://example.com/generated-image.png"]
        }
      ]
    }
  }
}
  • pending / processing: continue polling.
  • completed: read the image URL from data.result.images[0].url[0]; url is an array of strings.
  • failed: stop polling and read the reason from data.error.message. The charge is fully refunded. Prompt violations and content moderation failures also use this status.

Images are stored on the platform CDN. Download and save them before the time indicated by expires_at in the query result.

Billing

Billed per image. See Model Pricing for current prices.

  • With an aspect ratio, billing follows the resolution tier.
  • With exact pixel dimensions, the tier is determined by the shorter side:
TierShorter side
1KUp to 1024 pixels
2K1025–2048 pixels
4KOver 2048 pixels

Failed tasks receive a full refund.

Common parameter errors

The following return HTTP 400 synchronously, without creating a task or charging:

IssueAction
Empty promptProvide a non-empty prompt
n is not 1Request only one image at a time
Negative seedUse a non-negative integer; 0 means random
Unsupported resolutionUse 1K, 2K, or 4K
Unsupported aspect ratio in sizeUse one of the 10 ratios above or auto
Pixel dimensions out of rangeWidth and height must each be 256–8192; total pixels must not exceed 8,294,400
More than 5 reference imagesReduce image_urls to at most 5 images

პასუხები

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K..."
    }
  ]
}

დოკუმენტაციაში შეცდომა შენიშნეთ? მოგვწერეთ ელფოსტაზე support@apisea.ai.