Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 569 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 569 Bytes

cf-image-to-alt-text

Using Cloudflare AI for SEO to take any image and create alt text for it

Setup

npm install

Run Dev

npm run dev

Test Locally

You can change the image to anything on the web btw :)

curl -X POST http://localhost:8787/api/v1/image \
-H "Content-Type: application/json" \
-d '{
  "url": "https://www.johnmurch.com/assets/img/john-murch.jpg"
}'

Example output

{
	"imageUrl": "https://www.johnmurch.com/assets/img/john-murch.jpg",
	"altText": "A man wearing a plaid shirt and a black shirt is smiling."
}