Alt Text Generator AI API Documentation
Integrate alt text generation into your app, CMS, or automation workflow. Use the API directly or install one of our ready-made platform integrations.
Why Use the Alt Text API?
Generate concise, accessibility-friendly alt text from image URLs with a simple authenticated request.
Simple POST endpoint
Send an image URL and API key to receive generated alt text as plain text.
Platform integrations
Use ready-made plugins and apps for WordPress, Shopify, Webflow, Zapier, and more.
Free credits to start
New accounts include free credits so you can test the API before scaling usage.
Overview
Alt Text Generator AI provides a simple and powerful API for generating SEO-friendly alt text for images. This documentation covers the API endpoint that allows you to integrate alt text generation directly into any application, website, or content management system.
Base URL:
https://alttextgeneratorai.com/api/wpAuthentication
All API requests require authentication using your API key. You can obtain an API key by registering for an account at Alt Text Generator AI.
Each API key comes with 5 free credits upon signup. Once your free credits are exhausted, you will need to buy credits from one of our pricing plans.
Endpoints
/api/wpGenerate Alt Text
Generates SEO-friendly alt text for an image URL.
Request Body
{
"image": "https://example.com/path/to/image.jpg",
"wpkey": "your-api-key"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| image | String | Yes | The URL of the image to generate alt text for |
| wpkey | String | Yes | Your API key for authentication |
Response
On success, the API returns the generated alt text as a plain text string.
"A golden retriever puppy playing with a red ball in a green grassy park"
Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 401 | Unauthorized - Invalid API key or no credits remaining |
| 500 | Server error |
Platform Integrations
Alt Text Generator AI works with popular CMS platforms, browsers, design tools, and automation apps. Choose a ready-made integration or use the API directly.
WordPress Plugin
Plugin
Generate alt text for your WordPress media library.
Chrome Extension
Extension
Generate alt text with Chrome while browsing any website.
Shopify App
App
Enhance product images with SEO-friendly alt text.
Firefox Add-on
Add-on
Generate alt text with Firefox on any webpage.
Microsoft Edge Add-on
Add-on
Generate alt text with Microsoft Edge on any site.
Bubble Plugin
Plugin
Generate alt text for images in Bubble apps.
Joomla Extension
Extension
Generate alt text for Joomla site images.
Zapier App
App
Automate alt text generation in Zapier workflows.
Drupal Module
Module
Generate alt text for Drupal media and content images.
Integrately App
App
Connect alt text generation with 1,500+ apps.
Pipedream App
App
Automate alt text generation in Pipedream workflows.
Craft CMS Plugin
Plugin
Generate alt text for Craft CMS assets.
Magento Extension
Extension
Enhance Magento product images with alt text.
BigCommerce App
App
Generate alt text for BigCommerce product images.
VS Code Extension
Extension
Generate alt text directly in Visual Studio Code.
RapidAPI Integration
API
Access the alt text API through RapidAPI.
OttoKit Integration
Integration
Automate alt text workflows with OttoKit.
ViaSocket Integration
Integration
Integrate alt text generation into ViaSocket workflows.
Apify Actor
Actor
Batch-generate alt text for hundreds of images with Apify.
Note:
Each image processed will consume one credit from your account. Make sure you have sufficient credits available.
Example Usage
cURL
curl -X POST https://alttextgeneratorai.com/api/wp \
-H "Content-Type: application/json" \
-d '{
"image": "https://example.com/path/to/image.jpg",
"wpkey": "your-api-key"
}'JavaScript (Fetch)
fetch('https://alttextgeneratorai.com/api/wp', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
image: 'https://example.com/path/to/image.jpg',
wpkey: 'your-api-key'
})
})
.then(response => response.text())
.then(altText => {
console.log('Generated Alt Text:', altText);
})
.catch(error => {
console.error('Error:', error);
});PHP
<?php
$url = 'https://alttextgeneratorai.com/api/wp';
$data = array(
'image' => 'https://example.com/path/to/image.jpg',
'wpkey' => 'your-api-key'
);
$options = array(
'http' => array(
'header' => "Content-type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) {
// Handle error
} else {
echo "Generated Alt Text: " . $result;
}
?>Python
import requests
url = 'https://alttextgeneratorai.com/api/wp'
data = {
'image': 'https://example.com/path/to/image.jpg',
'wpkey': 'your-api-key'
}
response = requests.post(url, json=data)
if response.status_code == 200:
alt_text = response.text
print('Generated Alt Text:', alt_text)
else:
print('Error:', response.text)Rate Limits and Usage
Your API usage is limited by the number of credits available on your account. Each API call consumes one credit.
To check your current usage and remaining credits, visit your dashboard.
Error Handling
The API uses standard HTTP status codes to indicate the success or failure of a request:
- 200 (OK): The request was successful.
- 401 (Unauthorized): Invalid API key or no credits remaining.
- 500 (Server Error): Something went wrong on the server.
When an error occurs, the response will contain a plain text message describing the error.
Support
If you have any questions or need assistance with the API, please contact our support team at balt1794@gmail.com.
Related Alt Text Tools and Guides
API Documentation FAQ
How do I get an API key?
Create a free account, open your dashboard, and copy your API key. New accounts include free credits to test the API.
How many free credits do I get?
Each new account receives 5 free credits. Every successful alt text generation request uses one credit.
What does each API request return?
On success, the API returns the generated alt text as a plain text string. On failure, it returns a plain text error message with an HTTP status code.
What image input does the API accept?
The documented endpoint accepts a public image URL in the request body. Platform integrations may also support uploads through their own UI or workflows.
Do I need the API if I use an integration?
Not always. Many integrations handle authentication for you, but developers and automation tools can use the API directly for custom workflows.
What happens when I run out of credits?
Requests return a 401 Unauthorized response when your API key is invalid or you have no credits remaining. You can buy more credits from the pricing page.
Is there rate limiting?
Usage is primarily limited by the credits available on your account. Check your dashboard for remaining credits and usage.
Where can I find platform setup guides?
Use the integration cards below for step-by-step guides for WordPress, Shopify, Webflow, Zapier, and the rest of our supported platforms.