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>"
}
'
Important: The original job must be created in draft mode. This means the original job’s prompt must include the parameters: --v 7 --draft

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": "pending",
    "config": {
        "service_mode": "public",
        "webhook_config": {
            "endpoint": "https://webhook.site/c98cb890-fb92-439f-8d60-42c8a51eb52d",
            "secret": ""
        }
    },
    "input": null,
    "output": {
        "image_url": "",
        "image_urls": null,
        "seed": ""
    },
    "meta": {
        "created_at": "",
        "started_at": "",
        "ended_at": "",
        "usage": {
            "type": "point",
            "frozen": 80,
            "consume": 0
        }
    },
    "detail": null,
    "logs": [],
    "error": {
        "code": 0,
        "raw_message": "",
        "message": "",
        "detail": null
    }
}
This is the initial success response. Use the job_id to check the task status via the Get Task endpoint to retrieve the completed result with image URLs.

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