Generate WCAG-compliant alt-texts, validate existing descriptions, and scan entire websites for accessibility issues — all through a simple REST API.
Base URL
https://getalttexts.com
All endpoints require authentication via Authorization: Bearer <key> or x-api-key: <key> unless noted otherwise.
POST/v1/alt-text
Generate a WCAG-compliant alt-text for a single image. Supports multiple languages, page context, image type hints, and gallery-aware sibling deduplication.
Request body
Parameter
Type
Description
image_urlrequired
string
URL of the image or base64 data URI
languageoptional
string
Output language: en, de, fr, es. Default: en
contextoptional
string
Page context for better results (e.g. "Product detail page for running shoes"). Max 500 chars.
captionoptional
string
Existing image caption. The AI will complement it instead of repeating the same information. Max 300 chars.
image_typeoptional
string
Image type hint: photo, icon, chart, screenshot, text, decorative, auto. Default: auto
Validate an existing alt-text against the actual image. Returns a quality score, WCAG compliance check, issues, and an improved suggestion. Costs 1 credit per call.
Request body
Parameter
Type
Description
image_urlrequired
string
URL of the image or base64 data URI
alt_textrequired
string
The alt-text to validate
languageoptional
string
Language for the response: en, de, fr, es. Default: en
contextoptional
string
Page context for relevance checking. Max 500 chars.
page_typeoptional
string
Page type: product, blog, landing, docs, social, news, ecommerce, other
captionoptional
string
Existing image caption. Max 300 chars.
Issue types
Type
Description
inaccurate
Alt-text does not match what is actually in the image
generic
Too vague or generic, lacks specific detail
too_long
Exceeds recommended length (150+ characters)
too_short
Too short to be meaningfully descriptive (<20 characters)
redundant_prefix
Starts with "Image of", "Photo of", etc.
missing_context
Does not reference important page context (e.g. product name)
seo_stuffing
Appears to be keyword-stuffed for SEO rather than descriptive
should_be_decorative
Image appears decorative and should have an empty alt attribute
{"score": 35,
"issues": [{"type": "redundant_prefix",
"message": "Starts with 'Image of' — screen readers already announce images."},
{"type": "generic",
"message": "Too generic — does not describe the specific shoe model or features."},
{"type": "missing_context",
"message": "Does not mention product-relevant details like brand or model."}],
"suggestion": "Nike Air Zoom Pegasus 41 running shoe in black with white sole, side view",
"is_decorative": false,
"wcag_compliant": false,
"model": "gemini-2.0-flash",
"credits_used": 1,
"credits_remaining": 49}
POST/v1/scan
Scan a website and find images with missing or poor alt-texts. No credits consumed — the scanner uses heuristic analysis, not Vision API calls.
Authentication
Mode
Max images
Quality check
Auth required
Basic (free)
10
No
No
Extended
200
Yes
Yes (API key)
Request body
Parameter
Type
Description
urlrequired
string
URL of the page to scan (must be public, http or https)
max_imagesoptional
number
Maximum images to analyse (1–200). Default: 50. Capped to 10 without auth.
check_qualityoptional
boolean
Run heuristic quality scoring on existing alt-texts. Default: false. Requires auth.
Image status values
Status
Description
missing
No alt attribute present on the <img> tag
empty
alt="" — intentionally empty (may be decorative)
has_alt
Has an alt-text value. quality_score available when check_quality is enabled.