Skip to main content

Endpoint

GET /api/getImages
Retrieves a collection of images that have been generated by the system. This endpoint returns image metadata and URLs for all available images.

Request

This endpoint does not require any parameters. Simply make a GET request to receive the image collection.

Response

Returns an object with an imageUrls array. Each array item contains the blob URL and filename.
imageUrls
array
Array of image objects, each containing:
  • url: Full Azure Blob Storage URL with SAS token
  • name: Blob filename (format: {prompt}_{timestamp}.png)

Example request

curl -X GET https://your-domain.com/api/getImages

Example response

{
  "imageUrls": [
    {
      "url": "https://account.blob.core.windows.net/images/sunset_1710432000000.png?sv=2021...",
      "name": "sunset_1710432000000.png"
    },
    {
      "url": "https://account.blob.core.windows.net/images/mountains_1710431500000.png?sv=2021...",
      "name": "mountains_1710431500000.png"
    }
  ]
}

Response details

Images are sorted by timestamp in descending order (newest first). The endpoint does not cache results (cache: “no-store”), ensuring you always receive the latest image collection. Each URL includes a SAS token for secure access to Azure Blob Storage.

Error codes

500
error
Internal server error - The image service failed to retrieve the image collection

Usage tips

  • Use this endpoint to display a gallery of generated images
  • Results are not cached, so each request fetches fresh data
  • The response structure may vary based on the Azure service configuration

Build docs developers (and LLMs) love