# Glance (`glance-1`): Image captions and visual questions

Alt text for any image, or ask it a question.

Glance describes an image in plain English, from a one-line alt text to a detailed paragraph. Send a `question` instead and it answers about the image: what's the total on this receipt, what color is the car, is anyone wearing a helmet.

It's a small vision-language model, so treat answers as a first pass: it reads text and names things well, and it's weaker at counting and fine detail.

- **Price:** $1.50 per 1,000 images. One unit per image.
- **Languages:** English

- **Input:** An image: an https URL, a data URL (`data:image/png;base64,...`), or a file in a multipart upload. JPEG, PNG, WebP, GIF, AVIF or TIFF, up to 10 MB.
- **Batch:** no, one input per call
- **Status:** beta
- **Built on:** [HuggingFaceTB/SmolVLM-256M-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct), Apache-2.0, 256M

## Request

```bash
curl https://labs.greatwork.company/v1/run \
  -H "Authorization: Bearer $GWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glance-1","input":"https://labs.greatwork.company/examples/product.jpg"}'
```

Upload a local file with multipart: `curl https://labs.greatwork.company/v1/run -H "Authorization: Bearer $GWL_API_KEY" -F model=glance-1 -F input=@file`

## Options

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `input` | image (URL, data URL or upload) | yes | | An image: an https URL, a data URL (`data:image/png;base64,...`), or a file in a multipart upload. JPEG, PNG, WebP, GIF, AVIF or TIFF, up to 10 MB. |
| `question` | string | no |  | Ask something about the image. Without it, Glance writes a caption. |
| `detail` | string (short \| medium \| long) | no | `"short"` | Caption length: `short` for alt text, `long` for a full description. Ignored when `question` is set. |

## Output

| Field | Type | Description |
|---|---|---|
| `caption` | string | The description (when no question is asked). |
| `answer` | string | The answer (when `question` is set). |
| `question` | string | Your question, echoed. |

The response envelope is always `{"id", "object": "run", "model", "created", "output", "usage": {"units", "unit", "cost_usd", "cost_micros"}, "latency_ms"}`.

## Examples (real outputs from our servers)

### Alt text

```json
{
  "model": "glance-1",
  "input": "https://labs.greatwork.company/examples/product.jpg"
}
```

```json
{
  "caption": "A turquoise colored water bottle is on a light brown wooden table.",
  "width": 1024,
  "height": 1024
}
```

4210 ms, $0.0015.

### Ask a receipt

```json
{
  "model": "glance-1",
  "input": "https://labs.greatwork.company/examples/receipt.png",
  "question": "What is the total on this receipt?"
}
```

```json
{
  "question": "What is the total on this receipt?",
  "answer": "The total on this receipt is $24.65.",
  "width": 560,
  "height": 760
}
```

3525 ms, $0.0015.

### Describe a scene

```json
{
  "model": "glance-1",
  "input": "https://labs.greatwork.company/examples/street.jpg",
  "detail": "medium"
}
```

```json
{
  "caption": "In this image I can see a bicycle parked on the road. I can see a dog and a car. I can see buildings and the sky.",
  "width": 1024,
  "height": 1024
}
```

4050 ms, $0.0015.

## Good for

- Alt text for CMS and social uploads
- Answer questions about receipts, labels and screenshots
- Describe product photos for search
- Accessibility for user-generated images

## Limits and caveats

- Counting is unreliable (it may say two dogs when there's one).
- Takes 3 to 6 seconds per image.
- English only.
