REST APIv1

Alt Text API — Generate AI Alt Text for Any Image, Programmatically

A single POST request. Any image URL. Alt text back in milliseconds. 200+ languages. Gemini + OpenAI dual-model reliability.

REST API
200+ Languages
100 req/min
Gemini + OpenAI Fallback
JSON Response
No SDK Required
Request
# cURL example
curl -X POST "https://api.altmagic.pro/v1/generate-alt-text-api" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://yoursite.com/product.jpg",
    "seo_keywords": "leather sofa, living room",
    "language_code": "en"
  }'
Response · 200 OK · ~1.2s
{
  "altText": "A brown leather sofa in a bright
          modern living room with natural light",
  "CreditsAvailable": 49
}
API Capabilities

What the Alt Magic API Does

Everything you need to add intelligent, multilingual, SEO-optimized alt text to any image pipeline.

Core
Generate Alt Text for Any Publicly Accessible Image URL

Pass any image URL via image_url. The API handles JPG, PNG, WebP, AVIF, GIF, and SVG. No image upload required — just the URL.

SEO-Keyword Injection via seo_keywords Parameter

Pass your target keywords and the AI will naturally embed them into the generated alt text — without stuffing. Ideal for content pipelines that already have keyword data per image.

Context-Aware Generation with blog_title

Provide the surrounding context (blog post title, page name, product title) and the API generates alt text that matches the editorial intent of the page — not just what's visually in the image.

200+ Languages via language_code

Specify any BCP 47 language code and receive alt text in that language. English, Spanish, French, German, Japanese, Arabic, Hindi, Chinese (Simplified/Traditional), Portuguese, and 190+ more.

Reliable
Gemini + OpenAI Dual-Model Fallback

The API automatically uses Gemini as the primary model and falls back to OpenAI if needed — so you get maximum uptime and reliability without managing model routing yourself.

API Key Authentication + 100 Req/Min Rate Limit

Authenticate via the x-api-key header. Standard rate limit is 100 requests per minute, suitable for most automation pipelines and batch processing workflows.

Use Cases

Who Uses the Alt Magic API

From content agencies to headless CMS platforms — built for any image pipeline.

Content Agencies

Automate alt text for every image across 50+ client sites. Pipe image URLs through the API and push results back into your CMS via webhooks or scheduled jobs.

Headless CMS Platforms

Connect to Contentful, Sanity, or any custom CMS. Generate alt text at the time of asset upload and store it in the image metadata field automatically.

Ecommerce Platforms

Process new product image uploads in real-time or batch-process entire catalogs on demand. Pass product title as blog_title for ecommerce-accurate alt text.

Image CDNs / Media Libraries

Integrate at the point of upload into S3, Cloudflare Images, or any DAM system. Run alt text generation as part of your media processing pipeline.

Make.com / Zapier Automation

No-code workflows that trigger alt text generation on new image uploads from Google Drive, Dropbox, Airtable, or any connected source.

WordPress Developers

Build custom integrations or extend the Alt Magic plugin for bespoke multisite or enterprise WordPress setups using the same API the plugin uses.

Reference

API Parameters at a Glance

Full documentation at docs.altmagic.pro

Request Body (JSON)

ParameterRequiredTypeDescription
image_urlRequiredStringPublicly accessible URL of the image
user_idRequiredStringYour account email address
seo_keywordsOptionalStringKeywords to embed naturally in alt text
blog_titleOptionalStringPage/post/product title for context
language_codeOptionalStringBCP 47 language code (default: 'en')

Request Headers

HeaderRequiredValue
x-api-keyRequiredYour API key from Alt Magic dashboard
Content-TypeRequiredapplication/json
Error Handling

HTTP Status Codes

CodeMeaningHow to Fix
200SuccessAlt text returned in response body
400Bad RequestCheck required parameters (image_url, user_id)
401UnauthorizedVerify your x-api-key header is correct
403ForbiddenInsufficient credits — top up your account
429Rate Limit ExceededReduce to <100 requests per minute
500Server ErrorRetry with exponential backoff
No-Code

Use Without Writing Code

The same API, accessible through automation platforms.

Make.com Module

Build no-code alt text workflows. Trigger on file upload from Google Drive, Airtable, Dropbox, or any app.

View Make.com Integration

Zapier Integration

Trigger alt text generation on new image upload events from thousands of apps. Coming soon.

Coming Soon

WordPress Plugin

Uses the same API under the hood — zero configuration once connected. Install and forget.

WordPress Plugin Page
FAQ

Developer FAQ

One API key. Every image. Any platform.

Start with free credits. No SDK, no infrastructure, no setup. Just a POST request and alt text back in milliseconds.