Submit images and a prompt to generate an analysis of the images.
POST
/
v1
/
vision
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"}
Assistant
Responses are generated using AI and may contain mistakes.
Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key.
Body
application/json
Response
200 - application/json
Successful response
The response is of type object.
Was this page helpful?
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"}