Overview
Integrating with the Photopurr API
Use an API key to call Photopurr from your own code: generate images, download them, and pull published image packs.
What you can do
| Endpoint | Purpose | Scope required |
|---|---|---|
POST /api/v1/generate | Generate images, returns image URLs synchronously | generate:write |
GET /api/file/<filename> | Download an image or thumbnail | assets:read |
GET /api/v1/image-pack-publications | List published image packs, incremental pulling | documents:read |
GET /api/v1/image-pack-publications/<id> | Read the full content of one published version | documents:read |
Five things to know before you start
- A key is shown once. Create it under Account → Developer Center. It starts with
sk_; close the dialog and it is gone for good. - Scopes are fixed at creation. Each key can only reach the endpoints you ticked. A missing scope returns
403 insufficient_scope. - Generation is synchronous. One request waits until the images are done, up to 5 minutes.
- Images have no public URL.
images[].urlis a relative path; request it with the same key. - Errors share one format.
{ error: { code, message, request_id } }. Branch oncode, and quoterequest_idwhen reporting a problem.
Contents
- Quick start — create a key, send the first request, download the result
- Key management — creation, expiry, revocation, logs, security advice
- Scopes — which endpoints each key can reach
- Image download — originals, thumbnails, download parameters, retention
- Error format — the shared error body, every error code, retry advice
- Rate limits — per-key request limits, new-account limits
- Image pack pulling — incremental pulling of published image packs
Full parameters, the model table and billing for the generation endpoint are in the API reference.
Photopurr Docs