---
name: image-browser
description: Browse, inspect, rename, delete, restore, and resolve NiftyImages image assets through the v2 API. Use when a user asks an agent to list images, list maps, inspect image details, use thumbnails, rename images, soft-delete images, restore images, or look up an image by production URL.
---

# Image Browser

Use this skill to work with account-owned NiftyImages image assets.

## API Context

- Base URL: `https://dev.niftyimages.com/v2`
- OpenAPI: `https://dev.niftyimages.com/openapi/v1.json`
- Guide: `https://dev.niftyimages.com/docs/images.md`
- Workflow: `https://dev.niftyimages.com/docs/workflows/browse-images-and-thumbnails.md`
- Auth: `Authorization: Bearer {apiKey}`

## Credential Rules

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

## Workflow

1. Use `GET /v2/image-types` if the user asks what image categories exist.
2. List images with `GET /v2/images`.
3. Use query filters when useful:
   - `type=map` for maps
   - `status=active|deleted|all`
   - `q={name}` for name search
   - `limit={n}` for page size
4. Preserve image ids and `thumbnailUrl` values exactly as returned.
5. Use `GET /v2/images/{id}` for details.
6. Use returned `thumbnailUrl` values for visual previews.

## Operations

- Rename: `PATCH /v2/images/{id}` with `name`.
- Soft-delete: `DELETE /v2/images/{id}`.
- Restore: `POST /v2/images/{id}/restore`.
- Lookup by production URL: `POST /v2/images/lookup`.

## Thumbnail Rules

- Do not construct thumbnail URLs manually.
- Use the `thumbnailUrl` returned by list or detail responses.
- Treat thumbnail URLs as short-lived and anonymous.
- Deleted or inactive images may have `thumbnailUrl = null`.

## Safety Rules

- Ask for confirmation before delete or restore if the user's intent is ambiguous.
- Explain that delete is a soft-delete when relevant.
- Treat unknown, cross-tenant, and invalid image ids as not found.
- Do not expose API keys in image URLs or copied output.
