Skip to main content
POST
/
v1
/
describe
Describe Image
curl --request POST \
  --url https://api.legnext.ai/api/v1/describe \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "imgUrl": "<string>",
  "callback": "<string>"
}
'
{
  "code": 400,
  "message": "Invalid request parameters",
  "raw_message": "Invalid request parameters",
  "detail": null
}

Headers

HeaderTypeRequiredDescription
x-api-keystringYesYour API key

Request Body

ParameterTypeRequiredDescription
imgUrlstringyesURL link to the image
callbackstringNoCallback URL for task completion notifications

Example Request

curl -X POST "https://api.legnext.ai/api/v1/describe" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "imgUrl": "https://example.com/image.png",
    "callback": "https://webhook.site/your-webhook-id"
  }'

Response

Returns a task object containing the task information.
{
    "job_id": "54aeca4b-f443-41f3-8b94-28cbdc2e7e20",
    "model": "midjourney",
    "task_type": "describe",
    "status": "pending",
    "config": {
        "service_mode": "public",
        "webhook_config": {
            "endpoint": "",
            "secret": ""
        }
    },
    "input": null,
    "output": {
        "promptEn": "",
        "description": "",
        "finalPrompt": "",
        "prompts": []
    },
    "meta": {
        "created_at": "",
        "started_at": "",
        "ended_at": "",
        "usage": {
            "type": "point",
            "frozen": 20,
            "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 prompt descriptions.

Authorizations

x-api-key
string
header
required

API key for authentication

Body

application/json
imgUrl
string<uri>
required

URL of image to describe

callback
string<uri>

Callback URL for task completion notifications

Response

Description task created successfully