Enhance the overall quality, clarity, and detail of existing generated images using advanced AI enhancement algorithms.
Important: The original job must be created in draft mode. This means the original job’s prompt must include the parameters: --v7 --draft
Endpoint
POST https://api.legnext.ai/api/v1/enhance
Header | Type | Required | Description |
---|
x-api-key | string | Yes | Your API key |
Request Body
Parameter | Type | Required | Description |
---|
jobId | string | Yes | ID of the original image generation task |
imageNo | integer | Yes | Image number to enhance (0/1/2/3) |
callback | string | No | Callback URL for task completion notifications |
Example Request
curl -X POST "https://api.legnext.ai/api/v1/enhance" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jobId": "c6821434-5e41-408f-b42b-2562306b109c",
"imageNo": 0,
"callback": "https://webhook.site/c98cb890-fb92-439f-8d60-42c8a51eb52d"
}'
Response
Returns a task object containing the task information.
{
"job_id": "98761286-cdc7-4085-abfe-c9f149ff722b",
"model": "midjourney",
"task_type": "enhance",
"status": "completed",
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "https://webhook.site/d0ca59bc-35a6-4a1e-b1b1-aea7faeb7f67",
"secret": ""
}
},
"input": null,
"output": {
"image_url": "",
"image_urls": [
"https://image.legnext.ai/20250922/01k5qp2gqrfef8761r8n9q9w0c_0_0.png?Expires=1761102268&Signature=iNZM9BV0OCS32GXCSYEruuCs7zU%3D",
"https://image.legnext.ai/20250922/01k5qp2gqrfef8761r8n9q9w0c_0_1.png?Expires=1761102268&Signature=6X1d2iMRXXn1afdYEKrAHKRAZW0%3D",
"https://image.legnext.ai/20250922/01k5qp2gqrfef8761r8n9q9w0c_0_2.png?Expires=1761102268&Signature=clTVka9lszWiHZckseM%2BFafgbmc%3D",
"https://image.legnext.ai/20250922/01k5qp2gqrfef8761r8n9q9w0c_0_3.png?Expires=1761102268&Signature=dH98ACZ%2FxBkvpsOD9BjmJpE4WN4%3D"
]
},
"meta": {
"created_at": "2025-09-22T03:04:27Z",
"started_at": "2025-09-22T03:04:28Z",
"ended_at": "2025-09-22T03:05:03Z",
"usage": {
"type": "point",
"frozen": 00,
"consume": 00
}
},
"detail": null,
"logs": [],
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
}