# OpenAI vision options

> Reference for the openai vision options of the shotkit screenshot API, with an example request for each.

Send the screenshot to an OpenAI vision model with your prompt and return its answer. Your OpenAI key is used for this request only and never stored.

### `openai_api_key`

Your OpenAI key (never stored). Required for vision, together with `vision_prompt`. The model is `gpt-4o-mini` unless configured otherwise.

Type: `string`

```bash
curl -X POST "https://shotkit.net/api/take" \
  -H "X-Access-Key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","response_type":"json","openai_api_key":"sk-YOUR_OPENAI_KEY","vision_prompt":"Describe this page in one sentence."}' \
  --fail-with-body -o shot.json
```

### `vision_prompt`

Prompt sent with the screenshot. The answer is returned as `vision.completion` with `response_type=json`, otherwise in the `X-Vision` header.

Type: `string`

```bash
curl -X POST "https://shotkit.net/api/take" \
  -H "X-Access-Key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","response_type":"json","openai_api_key":"sk-YOUR_OPENAI_KEY","vision_prompt":"Is there a cookie banner on this page? Answer yes or no."}' \
  --fail-with-body -o shot.json
```

### `vision_max_tokens`

Max completion tokens.

Type: `number` · Range: `1`–`4096`

```bash
curl -X POST "https://shotkit.net/api/take" \
  -H "X-Access-Key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","response_type":"json","openai_api_key":"sk-YOUR_OPENAI_KEY","vision_prompt":"Summarize this page.","vision_max_tokens":200}' \
  --fail-with-body -o shot.json
```
