> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelslab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Queued Images

> Fetch Queued Images API fetches queued images.

<Note>
  This endpoint does not generate new images, it returns already generated/queued images.
</Note>

## 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 curl theme={null}
--request POST 'https://modelslab.com/api/v6/images/fetch' \
```

## Body

```json json theme={null}
{ 
    "key": "your_api_key", 
    "request_id": "your_request_id"
}
```


## OpenAPI

````yaml POST /fetch
openapi: 3.1.0
info:
  title: ModelsLab Dreambooth Image Generation API
  description: >-
    A focused API for AI-driven image generation using Dreambooth models,
    including text-to-image, image-to-image, inpainting, and model management
    capabilities.
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6/images
    description: Dreambooth Image Generation API v6 server
security: []
paths:
  /fetch:
    post:
      summary: Fetch queued images
      description: >-
        Retrieves images that are currently queued or have been processed.
        Usually more complex image generation requests take more time for
        processing. Such requests are being queued for processing and the output
        images are retrievable after some time. The estimated processing time is
        specified by the 'eta' parameter in the response. This endpoint does not
        generate new images; it returns already generated/queued images.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchQueuedImagesRequest'
      responses:
        '200':
          description: Fetched image response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ImageGenerationSuccessResponse'
                  - $ref: '#/components/schemas/ImageGenerationProcessingResponse'
                  - $ref: '#/components/schemas/ImageGenerationErrorResponse'
        '400':
          $ref: '#/components/responses/StandardErrorResponse'
        '401':
          $ref: '#/components/responses/StandardErrorResponse'
        '404':
          $ref: '#/components/responses/StandardErrorResponse'
        '500':
          $ref: '#/components/responses/StandardErrorResponse'
components:
  schemas:
    FetchQueuedImagesRequest:
      type: object
      required:
        - key
        - request_id
      properties:
        key:
          type: string
          description: Your API Key used for request authorization.
        request_id:
          type: string
          description: >-
            The ID returned by the 'id' parameter in the response upon an image
            generation request.
    ImageGenerationSuccessResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
          description: Status of the image generation.
        generationTime:
          type: number
          description: Time taken to generate the image in seconds.
        id:
          type: integer
          description: Unique identifier for the image generation request.
        output:
          type: array
          items:
            type: string
            format: uri
          description: Array of generated image URLs.
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy image URLs.
        meta:
          type: object
          description: Metadata about the image generation including all parameters used.
          additionalProperties: true
        nsfw_content_detected:
          type: boolean
          description: Indicates if NSFW content was detected in the generated image.
        webhook_status:
          type: string
          description: Status of the webhook notification.
        tip:
          type: string
          description: Additional information or tips for the user.
    ImageGenerationProcessingResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - processing
          description: Status of the image generation.
        tip:
          type: string
          description: Information about faster processing options.
        tip_1:
          type: string
          description: Additional tip, usually pointing to the fetch API.
        eta:
          type: number
          description: Estimated time for completion in seconds.
        message:
          type: string
          description: Processing status message.
        webhook_status:
          type: string
          description: Status of the webhook notification.
        fetch_result:
          type: string
          format: uri
          description: URL to fetch the result when processing.
        id:
          type: integer
          description: Unique identifier for the image generation request.
        output:
          type: array
          items:
            type: string
          description: Empty array during processing.
        meta:
          type: object
          description: Metadata about the image generation including all parameters used.
          additionalProperties: true
        future_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of future image URLs for queued requests.
    ImageGenerationErrorResponse:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message description.
  responses:
    StandardErrorResponse:
      description: >-
        Bad request (invalid parameters), unauthorized (invalid API key), or
        internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ImageGenerationErrorResponse'

````