GetAltText
Home Register

API Documentation

Base URL: https://api.getalttext.com

Authentication: pass your API key via Authorization: Bearer <key> or x-api-key: <key> header.

Generate Alt-Text Batch Usage Register API Keys Errors Rate Limits

POST /v1/alt-text

Generate a WCAG-compliant alt-text for a single image.

Request body

ParameterTypeDescription
image_url requiredstringURL of the image or base64 data URI
language optionalstringOutput language: en, de, fr, es. Default: en
context optionalstringPage context for better results (e.g. "Product detail page for running shoes")
max_length optionalnumberMaximum characters. Default: 125
quality optionalstringstandard (Gemini Flash) or premium (GPT-4o). Premium uses 5 credits. Default: standard
format optionalstringplain or html. Default: plain

Example request

curl -X POST https://api.getalttext.com/v1/alt-text \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/hero.jpg",
    "language": "de",
    "context": "Product detail page",
    "max_length": 125,
    "quality": "standard"
  }'

Response (200)

{
  "alt_text": "Roter Laufschuh von der Seite auf weißem Hintergrund",
  "language": "de",
  "characters": 52,
  "quality": "standard",
  "decorative": false,
  "processing_ms": 1200,
  "credits_used": 1,
  "credits_remaining": 449,
  "credits_total": 500,
  "plan": "starter",
  "overage": false,
  "overage_rate": 0.03
}

Decorative image response

{
  "alt_text": "",
  "decorative": true,
  "reason": "Image appears to be purely decorative (background pattern)",
  "credits_used": 1,
  "credits_remaining": 448,
  "credits_total": 500,
  "plan": "starter",
  "overage": false,
  "overage_rate": 0.03
}

POST /v1/alt-text/batch

Process up to 50 images asynchronously. Results are delivered via webhook.

Request body

ParameterTypeDescription
images requiredarrayArray of objects with id, image_url, and optional language/context
webhook_url requiredstringURL to receive results when batch completes
quality optionalstringstandard or premium. Default: standard

Response (202 Accepted)

{
  "batch_id": "batch_abc123",
  "total_images": 5,
  "status": "processing",
  "webhook_url": "https://your-server.com/callback"
}

GET /v1/usage

Check your current credit balance and billing period.

Response

{
  "plan": "starter",
  "credits_total": 500,
  "credits_used": 520,
  "credits_remaining": 0,
  "overage": true,
  "overage_credits": 20,
  "overage_cost": 0.60,
  "overage_rate": 0.03,
  "period_start": "2026-03-01",
  "period_end": "2026-03-31"
}

Response fields

FieldTypeDescription
overagebooleantrue when usage exceeds plan credits
overage_creditsnumberNumber of credits used beyond the plan limit
overage_costnumberCurrent overage cost in EUR (overage_credits × overage_rate)
overage_ratenumber|nullCost per image above plan limit. null for free plan (blocked instead)

POST /v1/register

Create a new account. Returns a user object and your first API key.

Request body

ParameterTypeDescription
email requiredstringValid email address
password requiredstringMin. 8 characters

POST /v1/api-keys

Create additional API keys (max 5 per account). Requires authentication.

Error codes

StatusMeaning
400Bad request — missing or invalid parameters
401Unauthorized — missing or invalid API key
402Payment required — credit limit exceeded (free tier)
429Rate limited — too many requests
500Internal server error

Rate limits

PlanRequests/min
Free60
Starter120
Pro300
Scale600

GetAltText · Impressum · Datenschutz