Prerequisites

Step 1: Get Your API Key

  1. Sign up at altextapi.com/signup
  2. Go to your dashboard
  3. Copy your API key — it starts with alt_

Keep your key secret

Your API key grants access to your account. Never commit it to version control or expose it in client-side code. Use environment variables.

Step 2: Make Your First API Call

txt
curl -X POST https://api.altextapi.com/v1/alt-text \
  -H "Content-Type: application/json" \
  -H "X-API-Key: alt_YOUR_API_KEY" \
  -d '{
    "image_url": "https://example.com/photo.jpg"
  }'

Response:

txt
{
  "alt_text": "A red fox stands alert on sandy dunes with dry grass and a blurred ocean horizon behind it.",
  "credits_remaining": 47,
  "wcag_compliant": true,
  "character_count": 112,
  "processing_time_ms": 1450
}

Step 3: Choose Your Integration

WordPress Plugin

The simplest way to add alt text to your WordPress site.

  1. Go to Plugins → Add New
  2. Search for "AltText AI"
  3. Click Install → Activate
  4. Go to Settings → AltText AI and paste your API key
  5. Upload an image — alt text is generated automatically!

JavaScript Widget

Add one script tag to any website:

txt
<script
  src="https://cdn.altextapi.com/widget.js"
  data-api-key="alt_YOUR_API_KEY"
  data-auto="true"
></script>

The widget automatically scans your page for images with missing alt text and fills them in.

REST API

Full programmatic access. See the API Reference for complete documentation.

Step 4: Verify It Works

Visit any page on your site and inspect an image:

txt
<img
  src="photo.jpg"
  alt="A red fox stands alert on sandy dunes with dry grass and a blurred ocean horizon behind it."
/>

That's it! Your images now have WCAG-compliant, SEO-optimized alt text.

Next Steps