Effective Date: August 1, 2025
This API endpoint allows external ecommerce tools (Shopify apps, WooCommerce plugins, Magento extensions, etc.) to generate SEO-optimized alt text for product images.
API uses Laravel Sanctum token-based authentication.
https://your-domain.com/dashboardAuthorization header as Bearer YOUR_TOKENGET /api/v1/test-credentials
This endpoint allows you to verify your API key is valid and check your account status without consuming credits.
Authorization: Bearer {API_TOKEN}
Accept: application/json
None required.
{
"success": true,
"message": "API credentials are valid",
"data": {
"user": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
},
"credits": {
"available": 500,
"can_generate": true
},
"subscription": {
"plan": "Professional",
"monthly_credits": 500,
"credits_used": 0,
"status": "active"
}
}
}
{
"success": false,
"message": "Invalid API key"
}
curl -X GET https://your-domain.com/api/v1/test-credentials \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
POST /api/v1/generate-alt-text
Authorization: Bearer {API_TOKEN}
Content-Type: application/json
Accept: application/json
{
"image_url": "https://example.com/path/to/image.jpg",
"context": "Blue cotton t-shirt with vintage logo, size medium, casual wear",
"language": "English"
}
image_url (required): Direct URL to the image. Supports both external URLs and local development URLs (localhost, 127.0.0.1, .local domains)context (optional): Product description or context to improve alt text generationlanguage (optional): Language for alt text generation. Supported languages: English, Spanish, French, Portuguese, German, Italian, Russian, Japanese, Korean, Chinese, Arabic, Hindi, Dutch, Swedish, Danish, Norwegian, Finnish, Polish, Czech, Hungarian, Turkish, Hebrew, Thai, Vietnamese. Defaults to "English".{
"success": true,
"data": {
"id": 123,
"image_url": "https://example.com/path/to/image.jpg",
"generated_alt": "Blue cotton t-shirt with vintage logo displayed on white background",
"image_width": 800,
"image_height": 600,
"credits_remaining": 487,
"language": "English"
}
}
{
"success": false,
"message": "Invalid API key"
}
{
"success": false,
"message": "Insufficient credits. Please upgrade your plan.",
"credits_remaining": 0
}
{
"success": false,
"message": "Validation failed",
"errors": {
"image_url": ["The image url field is required."]
}
}
curl -X POST https://your-domain.com/api/v1/generate-alt-text \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/product-image.jpg",
"context": "Premium leather handbag, brown color, suitable for office and casual use",
"language": "English"
}'
success field and handle errors appropriately.credits_remaining in responses to avoid service interruptions.