Developer API
Our API allows you to generate high-quality, AI-powered alt text for images — programmatically.
You can integrate AltTextLab into your apps, CMS, or automation workflows to enhance accessibility, improve SEO, and streamline your image publishing process.
This documentation covers how to authenticate, send requests, and handle responses from the API.
Authentication
The AltTextLab API uses API keys to authenticate requests. You can view and manage your API keys in the Dashboard Settings.
Your API key must be included in the x-api-key
header of each request:
All API requests must be made over HTTPS. Requests made without a valid API key will return a 401 Unauthorized
error.
Your API keys carry important privileges, so make sure to keep them secure. Do not share your API keys in public repositories, client-side code, or anywhere they might be exposed.
Replace YOUR_API_KEY
with your actual API key
Replace YOUR_API_KEY
with your actual API key
Alt text generation
This endpoint lets you generate alt text for an image using AI, tailored to your preferred language, brand, and keywords.
The API takes a public image URL and returns a generated alt text along with metadata about the request. You can optionally guide the output by specifying a brand name or keywords to include.
Typical use cases include product feeds, blog platforms, content automation, and custom CMS integrations.
Endpoint
Request headers
Replace YOUR_API_KEY
with your actual API key
Replace YOUR_API_KEY
with your actual API key
Request body
Send a JSON object with the following structure:
imageUrl
(string, required)
The public URL of the image to process.
lang
(string, required)
The language code for the generated alt text.
Example values: "en"
, "pl"
, "de"
.
You can find the full list of supported languages and their codes in the supported languages section.
style
(string, optional)
Controls the tone and level of detail in the generated alt text.
Use one of the supported styles: `"descriptive"`, `"neutral"` (default), `"matter-of-fact"`, `"minimal"`
Learn more about writing styles →
brand
(string, optional)
The name of the brand, manufacturer, or service provider shown in the image.
Used to add relevant context to the generated alt text.
Example: "Apple"
, "Starbucks"
, "IKEA"
keywords
(string[], optional)
A list of keywords to include or emphasize in the alt text.
This is useful for SEO or content alignment.
Example: ["eco-friendly", "minimalist"]
Response body
A successful response returns a JSON object with the following structure:
id
(string)
A unique identifier for the alt text generation request.
imageUrl
(string)
The original image URL that was submitted.
lang
(string)
The language used for the generated alt text. Matches the lang
field from the request.
count
(number)
The number of characters in the generated alt text (result
).
brand
(string | null)
The brand value provided in the request, or null
if not set.
style
(string)
The writing style used for generating the alt text.
keywords
(string[] | null)
The list of keywords used to guide the generation, or null
if none were provided.
result
(string | null)
The generated alt text. Will be null
if the request failed or is still processing.
status
(string)
The status of the generation request. Possible values include: "pending"
, "generated"
, "failed"
Supported languages
The AltTextLab API supports alt text generation in over 130 languages. Specify the desired language using the lang
field in your request body.
Below is the full list of supported languages and their corresponding codes: