---
title: "Check asset existence"
method: POST
path: "/api/assets/exist"
tags: ["assets"]
---

# Check asset existence

`POST /api/assets/exist`

Checks which assets exist in the user's library based on checksums or device identifiers. Provide exactly one of: checksums, checksum_sha1s, or (deviceId AND deviceAssetIds). List parameters are limited to 5000 items.

## Query parameters

- `library_id` string, nullable — Library to check assets in. Optional if the user has a single live (non-trashed) library; required when they have multiple.

## Request body

- AssetExistenceRequest — Request body for checking asset existence.
  - `checksums` string[], nullable — List of base64-encoded SHA-256 checksums to check for existence
  - `checksum_sha1s` string[], nullable — List of base64-encoded SHA-1 checksums to check for existence
  - `deviceId` string, nullable — Device ID to filter assets by (required with deviceAssetIds)
  - `deviceAssetIds` string[], nullable — List of device asset IDs to check for existence (requires deviceId)

## Response `200`

Successful Response

- AssetExistenceResponse — Response for asset existence check endpoint.
  - `assets` AssetLiteResponse[], required — List of assets matching the query criteria
    - `id` string, required — Unique asset identifier with 'asset_' prefix
    - `device_asset_id` string, required — Original asset identifier from the device that uploaded this asset
    - `device_id` string, required — Identifier of the device that uploaded this asset
    - `checksum` string, required — Base64-encoded SHA-256 hash of the asset contents for duplicate detection and integrity
    - `checksum_sha1` string, nullable — Base64-encoded SHA-1 hash of the asset contents. May be null for older assets.

## Other responses

- `401` — Missing, invalid, or expired credentials.
- `403` — The credentials are valid but not authorized for this operation — for example an API key whose action or library scope excludes it, or a credential type this operation does not accept.
- `404` — Not found
- `422` — Validation Error
- `429` — Rate limit exceeded. Retry after the interval in the `Retry-After` header.

---

[API](https://skmtc.net/gumnut-ai/apis/gumnut-api.md) · [All operations](https://skmtc.net/gumnut-ai/apis/gumnut-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gumnut-ai/gumnut-api/versions/e71db45f5d4a/schema)
