This endpoint lets you generate alt text for an image using AI, tailored to your preferred language, writing style, keywords, product attributes, and contextual information. The API takes a public image URL and returns generated alt text along with metadata about the request.Documentation Index
Fetch the complete documentation index at: https://www.alttextlab.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Request headers
YOUR_API_KEY with your actual API key from dashboard settings.
Request
Public URL of the image to process. The URL must be directly accessible without authentication or redirects — images behind login pages or private networks cannot be processed.
Language code for the generated alt text (e.g.
"en", "pl", "de"). Defaults to the language set in your account settings. See supported languages.Writing style:
"descriptive", "neutral" (default), "matter-of-fact", or "minimal". Defaults to account settings. See writing styles.Keywords to include or emphasize in the output. Useful for SEO alignment. Example:
["healthy breakfast", "avocado toast"].Keywords are not guaranteed to appear in the output. The model will include them when they fit naturally and are consistent with what is depicted. If a keyword cannot be added concisely or contradicts the image content, it will be omitted.Product metadata for e-commerce-optimized alt text. Including any field activates E-commerce Mode.
Additional context to improve accuracy for ambiguous images. Context clarifies meaning — it does not override what is visible.
Arbitrary key-value pairs (
string: string) returned in the response unchanged. Use them to attach identifiers or metadata for matching results to assets in your system. They have no effect on generation.- Maximum 30 keys per request
- Maximum key length: 70 characters
- Maximum value length: 250 characters
{"sku": "TSHIRT-001", "catalogId": "summer-2025"}Response body
Unique identifier for the generation request.
The original image URL submitted.
Language used for generation.
The generated alt text.
null if the request failed or is still processing."generated" or "failed". Credits are deducted only when the status is "generated". A "failed" response does not consume credits.Writing style used.
Keywords used, or
null if none were provided.Character count of the generated alt text.
The e-commerce fields submitted with the request (
product, brand, color, material).The key-value pairs submitted with the request, returned unchanged.
null if none were provided.