API - Building with AI agents
We've built the API so that an AI agent, whether that's a Codex or Claude-style assistant or something you've written yourself, can pick it up and run your gallery with very little help. If you're wiring the API into an agent, this is the place to start.
Everything in one read: llms.txt
Point your agent at:
https://api.digitalphotogallery.com/llms.txtIt's a plain-language brief: how to authenticate, how writes work, idempotency, identifiers, paging, rate limits and the error format, all sized to read in a single fetch. There's also /llms-full.txt, which adds the entire specification inline, so an agent can take the whole thing in at once.
Turning the spec into tools
The OpenAPI specification at /openapi.v1.yaml carries every request and response, all the limits (lengths, allowed values, ranges) and worked examples. Most agent frameworks turn that straight into tools your agent can call, so it checks a request against the same rules we do before it ever sends one.
Why it works well for agents
- It's self-describing:
GET /v1/metells the agent what it's allowed to do. - It's self-correcting: a
400names the field and the rule, so the agent can fix it and carry on. - It's safe to retry: idempotency keys mean a confused or interrupted agent never makes the same change twice.
- It backs off politely: a
429carries aRetry-After, so the agent knows how long to wait.
status is what's true, not the fact that the request was accepted.