imagen4-ultra| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | Must be imagen4-ultra. |
callBackUrl | string | No | Public HTTPS URL for final callback. |
input.prompt | string | Yes | Non-empty prompt. |
input.aspect_ratio | string | No | Defaults to square_1_1. Accepts square_1_1, social_story_9_16, widescreen_16_9, traditional_3_4, classic_4_3 and aliases 1:1, 9:16, 16:9, 3:4, 4:3. |
input.person_generation | string | No | dont_allow, allow_adult, or allow_all. |
input.safety_settings | string | No | block_low_and_above, block_medium_and_above, block_only_high, or block_none. |
input.seed | integer | No | Must be at least 1 when provided. |
input.enhance_prompt | boolean | No | Optional prompt enhancement flag. |
input.language | string | No | auto, en, zh, zh-CN, hi, ja, ko, pt, or es. |
input.output_format | string | No | png, jpeg, jpg, image/png, or image/jpeg. |
input.compression_quality | integer | No | 1 to 100. Sent inside upstream output_options. |
model and input.prompt are required. Add optional fields from the table above only when your use case needs them. To receive a webhook, add a top-level callBackUrl field with a public HTTPS URL.GET /api/v1/jobs/recordInfo?taskId=... to retrieve progress and final results. For production usage, pass callBackUrl when creating the task and still keep polling as a fallback.callBackUrl is optional. When provided, LiangXin sends the same payload shape as recordInfo after the task reaches success or fail. Your server should return any 2xx status. Webhook delivery is retried briefly, but clients should not rely on webhooks only.200 and a public taskId. Store this ID and query it with GET /api/v1/jobs/recordInfo.{
"code": 400,
"msg": "input.prompt is required",
"data": null
}{
"error": {
"message": "invalid token",
"type": "new_api_error",
"code": ""
}
}400 invalid request, missing model, unsupported model, invalid model parameter, or price not configured; 401 invalid or missing API key; 403 insufficient quota or access denied; 413 request body too large; 422 upstream validation rejected the request; 429 current group/upstream load is saturated; 500 upstream or internal task error.curl --location --request POST '/api/v1/jobs/createTask' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "imagen4-ultra",
"input": {
"prompt": "A realistic aerial photo of a futuristic green city beside the sea"
}
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_imagen4-ultra_1777600000000"
}
}