# Workflow: Browse Images and Thumbnails

Use this workflow when a user wants to inspect NiftyImages assets.

## Before live calls

- If no NiftyImages API key is available, ask the user for one before calling `/v2`.
- Do not invent, guess, log, or expose the API key.
- If the user only wants planning or code generation, continue without an API key.

## List images

```bash
curl "https://dev.niftyimages.com/v2/images?limit=20&status=active" \
  -H "Authorization: Bearer $NIFTYIMAGES_API_KEY"
```

## Filter by image type

```bash
curl "https://dev.niftyimages.com/v2/images?type=map&limit=20" \
  -H "Authorization: Bearer $NIFTYIMAGES_API_KEY"
```

## Get image detail

```bash
curl https://dev.niftyimages.com/v2/images/{id} \
  -H "Authorization: Bearer $NIFTYIMAGES_API_KEY"
```

## Use thumbnails

Image list and detail responses include `thumbnailUrl` for active images. The URL is short-lived and anonymous.

```bash
curl "https://dev.niftyimages.com/v2/image-thumbnails/{token}/{imageId}"
```

## Agent notes

- Do not construct thumbnail URLs yourself. Use returned `thumbnailUrl`.
- Deleted images may still be returned depending on filters, but `thumbnailUrl` is null.
- Use `GET /v2/image-types` before filtering if the user asks for available asset categories.
