LogoPhotopurr Docs
LogoPhotopurr Docs
HomepageWhat is PhotopurrGenerating imagesCreditsAPI reference
Developer Center
Quick startKey managementScopesImage downloadError formatRate limitsImage pack pulling

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

EndpointPurposeScope required
POST /api/v1/generateGenerate images, returns image URLs synchronouslygenerate:write
GET /api/file/<filename>Download an image or thumbnailassets:read
GET /api/v1/image-pack-publicationsList published image packs, incremental pullingdocuments:read
GET /api/v1/image-pack-publications/<id>Read the full content of one published versiondocuments:read

Five things to know before you start

  1. A key is shown once. Create it under Account → Developer Center. It starts with sk_; close the dialog and it is gone for good.
  2. Scopes are fixed at creation. Each key can only reach the endpoints you ticked. A missing scope returns 403 insufficient_scope.
  3. Generation is synchronous. One request waits until the images are done, up to 5 minutes.
  4. Images have no public URL. images[].url is a relative path; request it with the same key.
  5. Errors share one format. { error: { code, message, request_id } }. Branch on code, and quote request_id when reporting a problem.

Contents

  1. Quick start — create a key, send the first request, download the result
  2. Key management — creation, expiry, revocation, logs, security advice
  3. Scopes — which endpoints each key can reach
  4. Image download — originals, thumbnails, download parameters, retention
  5. Error format — the shared error body, every error code, retry advice
  6. Rate limits — per-key request limits, new-account limits
  7. 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.

API reference

Full parameters, response and billing for POST /api/v1/generate

Quick start

Create a key, send the first request, download the result

Table of Contents

What you can doFive things to know before you startContents