Skip to main content
POST
/
v1
/
vision
cURL
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}}."}'
{
  "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"
}
Deprecation notice: The following models are deprecated and will be removed on July 13, 2026: palmyra-x-003-instruct, palmyra-vision, palmyra-med, palmyra-fin, and palmyra-creative.Migration path: Use palmyra-x5 as the replacement for all deprecated models. Palmyra X5 supports a 1M-token context window and covers general-purpose, financial, medical, and creative use cases. For vision workloads, use chat with images with Palmyra X5 instead of palmyra-vision. See the deprecation policy for more information.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key.

Body

application/json
model
enum<string>
required

The model to use for image analysis.

Available options:
palmyra-vision
prompt
string
required

The prompt to use for the image analysis. The prompt must include the name of each image variable, surrounded by double curly braces ({{}}). For example, Describe the difference between the image {{image_1}} and the image {{image_2}}.

variables
Vision Request File Variable · object[]
required

Response

200 - application/json

Successful response

data
string
required

The result of the image analysis.