Overview
Process multiple images efficiently in a single API call. This is ideal for bulk processing or when you need to generate alt text for multiple images at once.
Request Body
Array of image objects to process. Each object must contain at least image_url.
The length of alt text for this specific image. Options: short, long, seo
Language code for this specific image (default: en)
Source identifier for tracking (web, api, extension, wordpress, shopify, batch)
Example Request
curl -X POST https://api.gistmag.co.uk/batch \
-H "Content-Type: application/json" \
-d '{
"api_key": "your_api_key_here",
"images": [
{
"image_url": "https://example.com/image1.jpg",
"mode": "short"
},
{
"image_url": "https://example.com/image2.jpg",
"mode": "long"
},
{
"image_url": "https://example.com/image3.jpg",
"mode": "seo"
}
]
}'
Response
Array of alt text responses for each image
The generated alt text based on the selected mode
Short version of alt text (if mode was short or all modes requested)
Long version of alt text (if mode was long or all modes requested)
SEO-optimized version of alt text (if mode was seo or all modes requested)
ISO timestamp of when the alt text was generated
Total number of images processed
Number of successfully processed images
Number of images that failed to process
Example Response
{
"results": [
{
"alt_text": "A beautiful sunset over the ocean",
"short_alt_text": "Sunset over ocean",
"long_alt_text": "A beautiful sunset over the ocean with orange and pink hues reflecting on the water",
"seo_alt_text": "Sunset over ocean - beach photography - nature scene",
"image_url": "https://example.com/image1.jpg",
"generated_at": "2024-01-15T10:30:00Z"
},
{
"alt_text": "A detailed description of a mountain landscape with snow-capped peaks and a clear blue sky",
"image_url": "https://example.com/image2.jpg",
"generated_at": "2024-01-15T10:30:05Z"
},
{
"alt_text": "A city street at night with neon lights",
"image_url": "https://example.com/image3.jpg",
"generated_at": "2024-01-15T10:30:10Z"
}
],
"total": 3,
"successful": 3,
"failed": 0
}
Rate Limits
Batch requests count as multiple individual requests for rate limiting purposes. Each image in the batch consumes one credit and counts toward your rate limit.
Batch processing is more efficient than making multiple individual requests, but still counts toward your usage limits.