---
title: "Analyze images"
method: POST
path: "/v1/vision"
tags: ["Vision"]
---

# Analyze images

`POST /v1/vision`

Submit images and documents with a prompt to generate an analysis. Supports JPG, PNG, PDF, and TXT files up to 7MB each.

## Request body

- VisionRequest
  - `model` 'palmyra-vision', required — The model to use for image analysis.
  - `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` VisionRequestFileVariable[], required
    - `name` string, required — The name of the file variable. You must reference this name in the prompt with double curly braces (`{{}}`). For example, `Describe the difference between the image {{image_1}} and the image {{image_2}}`.
    - `file_id` string, required — The File ID of the file to analyze. The file must be uploaded to the Writer platform before it can be used in a vision request. Supported file types: JPG, PNG, PDF, TXT (max 7MB each).

## Response `200`

Successful response

- VisionResponse
  - `data` string, required — The result of the image analysis.

## Changes

- **2025-04-25** `a0e83ebfd818` — 1 breaking, 1 info
  - request property `model` was restricted to a list of enum values
  - added the new `palmyra-vision` enum value to the request property `model`
- **2025-04-02** `d15316b8a3a0` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/writer/apis/api/changes/v1/vision/post.md)

---

[API](https://skmtc.dev/writer/apis/api.md) · [All operations](https://skmtc.dev/writer/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/writer/api/revisions/ae230e1d8c09/schema)
