Skip to main content
POST
/
v1
/
enhance
Enhance
curl --request POST \
  --url https://api.legnext.ai/api/v1/enhance \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "imageNo": 0,
  "callback": "<string>"
}
'
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: --v 7 --draft

Endpoint

POST https://api.legnext.ai/api/v1/enhance

Headers

HeaderTypeRequiredDescription
x-api-keystringYesYour API key

Request Body

ParameterTypeRequiredDescription
jobIdstringYesID of the original image generation task
imageNointegerYesImage number to enhance (0/1/2/3)
callbackstringNoCallback 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": "06eb333e-bd6b-4eb4-a5e9-7db1f091b728",
    "model": "midjourney",
    "task_type": "enhance",
    "status": "completed",
    "config": {
        "service_mode": "public",
        "webhook_config": {
            "endpoint": "https://webhook.site/c98cb890-fb92-439f-8d60-42c8a51eb52d",
            "secret": ""
        }
    },
    "input": null,
    "output": {
        "image_url": "https://cdn.legnext.ai/mj/06eb333e-bd6b-4eb4-a5e9-7db1f091b728_grid.png",
        "image_urls": [
            "https://cdn.legnext.ai/temp/1760684132243.png",
            "https://cdn.legnext.ai/temp/1760684134754.png",
            "https://cdn.legnext.ai/temp/1760684133198.png",
            "https://cdn.legnext.ai/temp/1760684132674.png"
        ],
        "seed": "2622052911",
        "available_actions": {
            "edit": [
                0,
                1,
                2,
                3
            ],
            "inpaint": [
                0,
                1,
                2,
                3
            ],
            "outpaint": [
                0,
                1,
                2,
                3
            ],
            "pan": [
                0,
                1,
                2,
                3
            ],
            "remix": [
                0,
                1,
                2,
                3
            ],
            "reroll": true,
            "upscale": [
                0,
                1,
                2,
                3
            ],
            "variation": [
                0,
                1,
                2,
                3
            ]
        }
    },
    "meta": {
        "created_at": "2025-10-17T06:55:20Z",
        "started_at": "2025-10-17T06:55:20Z",
        "ended_at": "2025-10-17T06:55:42Z",
        "usage": {
            "type": "point",
            "frozen": 80,
            "consume": 80
        }
    },
    "detail": null,
    "logs": [],
    "error": {
        "code": 0,
        "raw_message": "",
        "message": "",
        "detail": null
    }
}

Authorizations

x-api-key
string
header
required

API key for authentication

Body

application/json
jobId
string<uuid>
required

ID of the draft mode image to enhance

imageNo
integer
required

Image number to enhance (0, 1, 2, or 3)

Required range: 0 <= x <= 3
Example:

0

callback
string<uri>

Callback URL for task completion notifications

Response

200

Enhance task created successfully