API - Overview

The DPG API lets you do everything you'd normally do with your images in the admin, only from your own code: browse, search, upload, keyword, caption, arrange into sets, publish and download. It's a versioned REST interface that speaks JSON.

The current version is /v1, and it lives at:

https://api.digitalphotogallery.com/v1

We publish the whole contract as an OpenAPI 3.1 specification, so you can generate a client straight from it. And because every request is checked as it arrives, a mistake comes back to you as a clear, readable error rather than quietly reaching your data.

New to this? The Quickstart takes you from an empty account to your first authenticated call in a few minutes.

What you can do

  • Images. Browse and search your whole library; filter by keyword, rating, Exif, capture date and more; read every version and its URL; and edit titles, descriptions, ratings, crops, keywords and metadata.
  • Sets. Read your set hierarchy, add and remove images, reorder them, and control when a set goes live.
  • Uploads. Send files to your account's image processor through a short-lived, signed ticket.
  • Downloads and archives. Get secure, expiring download links and build ZIP archives.

How it works

A few ideas run through the whole API, so once you've met them everything feels familiar:

  • Every object has a stable public_uuid, and every list paginates the same way.
  • Every write takes an Idempotency-Key, so if a request times out you can safely send it again without doubling up.
  • GET /v1/me tells you exactly what your token is allowed to do.
  • Every error comes back in the same shape, with a machine-readable code and the field that caused it.
  • And if you're pointing an AI agent at the API, there's a plain-language guide at /llms.txt and the full contract at /llms-full.txt.

Open the OpenAPI specification

Reads and writes

You authenticate with a bearer token, then read or write JSON:

curl https://api.digitalphotogallery.com/v1/images \
  -H "Authorization: Bearer YOUR_TOKEN"

Reads hand you the data straight away. Writes work a little differently: they return an Operation (a 202 response) that you poll until it's finished. The Operations guide explains it in full.

Where to go next

These guides are written to be read in order:

  1. Quickstart. Turn the API on, make a token, and make your first call.
  2. Authentication. Service tokens, signing users in, and scopes.
  3. How writes work: Operations. The asynchronous model, and idempotency.
  4. Working with images. Browsing, searching and editing.
  5. Sets & galleries. Hierarchy, membership, order and going live.
  6. Keywords, metadata & enrichment. The editorial side.
  7. Uploading images. The signed-ticket flow.
  8. Downloads & archives. Download links and ZIP bundles.
  9. Errors, rate limits & conventions. The things that apply everywhere.
  10. Building with AI agents. Pointing a language model at your gallery.
Last updated: