Add an image and generate alt text.
There are two ways to add an image:
- Adding an image by URL:
- The URL to your image must be publicly accessible.
- Include the url field in your image JSON data. DO NOT include the raw field.
- Adding an image by sending a base64-encoded binary file:
- Use this method when your image is not accessible via URL (e.g. a local file).
- Include the raw field in your image JSON data. DO NOT include the url field.
- The async parameter is not supported for binary file uploads. All raw file uploads are processed synchronously.
Rate Limited: Requests are limited to 4 calls per second.
Duplicate images: If you try to add a URL which already exists in your library, the existing image data will be returned with a success response. You will not be charged any credits in this case. No webhook event will be sent, even if you requested async.
Note: Image files are never stored permanently by AltText.ai. We simply store the URL you send for the image, and use that to temporarily fetch the image for analysis. After fetching the image, it is deleted and never persisted on our servers. If you upload an image file instead of a URL, the image is deleted immediately after being analyzed.
Image requirements
- Supported formats: JPEG, PNG, GIF, WEBP, BMP
- Maximum file size: 16 MB
- Minimum dimensions: 50 x 50 (smaller images may not be able to generate alt text).
Request
- Base URL: https://alttext.ai/api/v1
- URL: https://alttext.ai/api/v1/images
- Auth: API key in header X-API-Key
Request body
Response
Successful alt text generation.
Changes
No recorded changes to this operation across all 1 revision of this API.