API v1

ATaaS API
Documentation

Generate WCAG-compliant alt text for any image with a single REST API call. Supports JPEG, PNG, WebP, AVIF and GIF. Powered by AI vision models.

Base URLhttps://api.alttextservice.com/api/v1

Quick Start

Get your first alt text in under 2 minutes.

1

Create a free account

Sign up with email or Google. No credit card required.

Create account
2

Generate your API key

Go to your dashboard and click Generate API Key. Copy it — you'll use it in every request.

3

Make your first request

Use the generate endpoint with your image URL:

cURL
curl -X POST https://api.alttextservice.com/api/v1/generate \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "image_url": "https://example.com/photo.jpg", "language": "en" }'

Authentication

All API requests require an API key sent via the X-API-Key header.

How to get your API key

  1. Sign in to your dashboard
  2. Navigate to the API Key section
  3. Click Generate API Key
  4. Copy and store the key securely — it won't be shown again

Example header

http
X-API-Key: YOUR_API_KEY
Keep your API key secret. Never expose it in frontend code, public repos or client-side JavaScript. Use environment variables or a server-side proxy.

Endpoints

POST/api/v1/generate

Generate alt text for a single image by providing a publicly accessible URL.

Request body

FieldTypeRequiredDescription
image_urlstringPublic URL of the image (JPEG, PNG, WebP, AVIF, GIF)
contextstringPage context or description to improve alt text relevance
languagestringISO language code (default: en). See supported languages

Example request

cURL
curl -X POST https://api.alttextservice.com/api/v1/generate \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "image_url": "https://example.com/product-photo.jpg", "context": "E-commerce product page for running shoes", "language": "en" }'
JavaScript (fetch)
const response = await fetch('https://api.alttextservice.com/api/v1/generate', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': process.env.ATAAS_API_KEY, }, body: JSON.stringify({ image_url: 'https://example.com/product-photo.jpg', context: 'E-commerce product page for running shoes', language: 'en', }), }); const data = await response.json(); console.log(data.alt_text); // → "A pair of lightweight blue running shoes on a white background"
Python (requests)
import requests response = requests.post( "https://api.alttextservice.com/api/v1/generate", headers={ "Content-Type": "application/json", "X-API-Key": os.environ["ATAAS_API_KEY"], }, json={ "image_url": "https://example.com/product-photo.jpg", "context": "E-commerce product page for running shoes", "language": "en", }, ) data = response.json() print(data["alt_text"]) # → "A pair of lightweight blue running shoes on a white background"

Response

json
{ "alt_text": "A pair of lightweight blue running shoes on a white background", "images_used": 1, "images_remaining": 249 }
POST/api/v1/generate/batch

Generate alt text for multiple images in a single request.

Requires Pro or Enterprise plan.

Request body

FieldTypeRequiredDescription
imagesarrayArray of image objects (max 50)
images[].image_urlstringPublic URL of the image
images[].contextstringContext for this specific image
languagestringISO language code applied to all images (default: en)

Example request

cURL
curl -X POST https://api.alttextservice.com/api/v1/generate/batch \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "images": [ { "image_url": "https://example.com/photo1.jpg", "context": "Homepage hero banner" }, { "image_url": "https://example.com/photo2.png", "context": "Team member portrait" } ], "language": "en" }'

Response

json
{ "results": [ { "image_url": "https://example.com/photo1.jpg", "alt_text": "A wide aerial view of a modern city skyline at sunset", "success": true }, { "image_url": "https://example.com/photo2.png", "alt_text": "Portrait of a smiling woman in professional attire", "success": true } ], "images_used": 2, "images_remaining": 4998 }
GET/api/v1/usage

Check your current usage and remaining quota for this billing period.

Example request

cURL
curl https://api.alttextservice.com/api/v1/usage \ -H "X-API-Key: YOUR_API_KEY"

Response

json
{ "images_used": 142, "images_remaining": 108 }

Try the API

Test the API live — no account required. Enter an image URL and see the result instantly.

3/3 free tries remaining

Rate Limits

Rate limits protect the service and ensure fair usage. Limits are applied per IP address.

EndpointLimitWindow
POST /api/v1/generate30 requests1 minute
POST /api/v1/generate/batch5 requests1 minute
GET /api/v1/usage30 requests1 minute
Global (all endpoints)120 requests1 minute
When you exceed a rate limit, the API returns 429 Too Many Requests. Wait for the window to reset and retry.

Error Codes

The API uses standard HTTP status codes. Error responses include a descriptive message.

CodeMeaningCommon cause
400Bad RequestMissing image_url or empty batch array
401UnauthorizedMissing or invalid X-API-Key header
403ForbiddenMonthly quota exceeded or feature not available on your plan
404Not FoundUser account not found
422Unprocessable EntityImage could not be processed (corrupt, inaccessible, or unsupported)
429Too Many RequestsRate limit exceeded — wait and retry

Error response example

json
{ "type": "about:blank", "title": "Monthly usage limit reached", "detail": "Plan Free: 250/250 images used this month. Upgrade to continue.", "status": 403 }

Plans & Quotas

Your monthly image quota depends on your subscription plan. Usage resets at the start of each billing period.

PlanPriceImages/monthAPI keysBatchRate limit
Free$0250110 req/min
Starter$9/mo1,000110 req/min
Pro$29/mo5,000360 req/min
EnterpriseCustomUnlimitedUnlimitedCustom

Supported Languages

Pass a language code in the language field to generate alt text in your target language. Default is en (English).

enEnglish
esSpanish
frFrench
deGerman
ptPortuguese
plPolish
nlDutch
itItalian
jaJapanese
koKorean
zhChinese
arArabic
View all 50+ supported languages
afAfrikaans
amAmharic
arArabic
azAzerbaijani
bgBulgarian
bnBangla
bsBosnian
caCatalan
csCzech
cyWelsh
daDanish
deGerman
elGreek
enEnglish
esSpanish
etEstonian
faPersian
fiFinnish
frFrench
gaIrish
glGalician
guGujarati
heHebrew
hiHindi
hrCroatian
huHungarian
hyArmenian
idIndonesian
itItalian
jaJapanese
kaGeorgian
kkKazakh
koKorean
ltLithuanian
lvLatvian
mkMacedonian
msMalay
nbNorwegian
nlDutch
plPolish
ptPortuguese
roRomanian
ruRussian
skSlovak
slSlovenian
sqAlbanian
srSerbian
svSwedish
thThai
trTurkish
ukUkrainian
viVietnamese
zhChinese

Ready to integrate?

Create a free account and start generating alt text in minutes. No credit card required.