curl --location --request POST https://api.writer.com/v1/vision \ --header "Authorization: Bearer <token>" \ --header "Content-Type: application/json" \--data-raw '{"model":"palmyra-vision","variables":[{"name":"image_1","file_id":"f1234"},{"name":"image_2","file_id":"f9876"}],"prompt":"Describe the difference between the image {{image_1}} and the image {{image_2}}."}'
Copy
{ "data": "Image f1234 shows a densely crowded urban beach with many umbrellas, while image f9876 depicts a sparsely populated tropical beach with clear turquoise water and lush greenery"}
Vision API
Analyze images
Submit images and a prompt to generate an analysis of the images.
POST
/
v1
/
vision
cURL
Copy
curl --location --request POST https://api.writer.com/v1/vision \ --header "Authorization: Bearer <token>" \ --header "Content-Type: application/json" \--data-raw '{"model":"palmyra-vision","variables":[{"name":"image_1","file_id":"f1234"},{"name":"image_2","file_id":"f9876"}],"prompt":"Describe the difference between the image {{image_1}} and the image {{image_2}}."}'
Copy
{ "data": "Image f1234 shows a densely crowded urban beach with many umbrellas, while image f9876 depicts a sparsely populated tropical beach with clear turquoise water and lush greenery"}