flux-2-pro| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | Must be flux-2-pro. |
callBackUrl | string | No | Public HTTPS URL for final callback. |
input.prompt | string | Yes | Non-empty prompt. |
input.width | integer | No | Must be provided together with height; range 256 to 1440. Defaults to 1024 when both dimensions are omitted. |
input.height | integer | No | Must be provided together with width; range 256 to 1440. Defaults to 768 when both dimensions are omitted. |
input.aspect_ratio | string | No | Alternative to explicit dimensions. Supported aliases map to dimensions: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9. |
input.input_image | string | No | First reference image URL. |
input.input_image_2 | string | No | Second reference image URL. |
input.input_image_3 | string | No | Third reference image URL. |
input.input_image_4 | string | No | Fourth reference image URL. |
input.reference_images | string[] | No | Alternative list form. Combined total with input_image* must be at most 4. |
input.seed | integer | No | Optional deterministic seed. |
input.prompt_upsampling | boolean | No | Optional prompt upsampling flag. |
width or height is provided, the request returns HTTP 400.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": "flux-2-pro",
"input": {
"prompt": "A sharp commercial photo of a red running shoe splashing through rain"
}
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_flux-2-pro_1777600000000"
}
}