Retrieve the status and results of a job using its job ID.

Status Values

StatusDescription
pendingJob is queued and waiting to be processed
stagedJob is prepared and staged for processing
processingJob is currently being processed
failedJob has failed due to an error
completedJob has completed successfully

Endpoint

GET https://api.legnext.ai/api/v1/job/{job_id}

Headers

HeaderTypeRequiredDescription
x-api-keystringYesYour API key

Path Parameters

ParameterTypeRequiredDescription
job_idstringYesThe unique identifier of the job

Example Request

curl -X GET "https://api.legnext.ai/api/v1/job/98761286-cdc7-4085-abfe-c9f149ff722b" \
  -H "x-api-key: YOUR_API_KEY"

Response

Returns the complete job information including current status and results.
{
    "job_id": "98761286-cdc7-4085-abfe-c9f149ff722b",
    "model": "midjourney",
    "task_type": "diffusion",
    "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
    }
}