Base URL
https://api.altextapi.com
All requests must include your API key in the X-API-Key header.
Authentication
/api/validate-keyValidate your API key and get account information.
Request Body
{
"api_key": "alt_YOUR_API_KEY"
}
Response
{
"valid": true,
"plan": "free",
"credits_total": 50,
"credits_used": 12,
"credits_remaining": 38
}
Generate Alt Text
/api/alt-text🔑 API KeyGenerate alt text for a single image URL.
Request Body
{
"image_url": "https://example.com/photo.jpg",
"keywords": ["product", "ecommerce"],
"language": "en"
}
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| image_url | string | Yes | Public HTTPS URL of the image |
| keywords | string[] | No | Up to 10 context keywords |
| language | string | No | ISO 639-1 code (default: en) |
Response
{
"alt_text": "A modern ergonomic office chair with black mesh back and adjustable armrests against a white background.",
"length": 118,
"language": "en",
"cached": false
}
Rate Limits
60 requests per minute per IP. Auth endpoints: 5 requests per minute.
Check Usage
/api/usage🔑 API KeyGet current plan, credit usage, and account status.
Response
{
"plan": "free",
"credits": {
"total": 50,
"used": 12,
"remaining": 38
},
"api_calls_today": 5
}
Error Codes
| Status | Description | |--------|-------------| | 400 | Missing or malformed request body | | 401 | Invalid or missing API key | | 429 | Rate limit exceeded or quota reached | | 500 | Server error — try again later | | 502 | AI provider error |
Always check credits
Use GET /api/usage before bulk operations to avoid hitting
your monthly limit mid-batch.