cURL
JavaScript
Python
PHP
C#
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"url": "https://img.ayrshare.com/012/gb.jpg"}' \
-X POST https://api.ayrshare.com/api/generate/altText
200: Alt Text Generated
500: Error with the Image File
{
"status" : "success" ,
"altText" : "A ghostbusters vehicle driving through a field." ,
"url" : "https://img.ayrshare.com/012/gb.jpg"
}
Available on Premium, Business, Enterprise plans.Max Pack required
Create AI-generated alt text for your images. Choose the language to write the alt text and keywords to include in the alt text.
API Key of the Primary Profile.
Format:
Authorization: Bearer API_KEY
Body Parameters
Image URL of the image to create the alt text. Must start with https://
. Supports JPEG, PNG, GIF, WEBP, and BMP.
String array of keywords or phrases to be considered when generating the alt text. Typically only one or two of the keywords from the array will be used in the alt text.
Language to output the alt text. Use one of the available language codes .
cURL
JavaScript
Python
PHP
C#
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"url": "https://img.ayrshare.com/012/gb.jpg"}' \
-X POST https://api.ayrshare.com/api/generate/altText
200: Alt Text Generated
500: Error with the Image File
{
"status" : "success" ,
"altText" : "A ghostbusters vehicle driving through a field." ,
"url" : "https://img.ayrshare.com/012/gb.jpg"
}