Skip to main content
POST
/
fetch
Fetch queued images
curl --request POST \
  --url https://modelslab.com/api/v6/images/fetch \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "request_id": "<string>"
}'
{
  "status": "success",
  "generationTime": 123,
  "id": 123,
  "output": [
    "<string>"
  ],
  "proxy_links": [
    "<string>"
  ],
  "meta": {},
  "nsfw_content_detected": true,
  "webhook_status": "<string>",
  "tip": "<string>"
}
This endpoint does not generate new images, it returns already generated/queued images.

Request

Send a POST request to below endpoint to return the corresponding queued images,specified by the request_id parameter in the request body.
curl
--request POST 'https://modelslab.com/api/v6/images/fetch' \

Body

json
{ 
    "key": "your_api_key", 
    "request_id": "your_request_id"
}

Body

application/json
key
string
required

Your API Key used for request authorization.

request_id
string
required

The ID returned by the 'id' parameter in the response upon an image generation request.

Response

Fetched image response

  • Option 1
  • Option 2
  • Option 3
status
enum<string>

Status of the image generation.

Available options:
success
generationTime
number

Time taken to generate the image in seconds.

id
integer

Unique identifier for the image generation request.

output
string<uri>[]

Array of generated image URLs.

Array of proxy image URLs.

meta
object

Metadata about the image generation including all parameters used.

nsfw_content_detected
boolean

Indicates if NSFW content was detected in the generated image.

webhook_status
string

Status of the webhook notification.

tip
string

Additional information or tips for the user.

I