Delete photos
Delete photos from a project, together with every edit, staging and video made from them. Only do this when the user explicitly asks to remove those photos; confirm which ones first. All IDs must belong to the project, otherwise nothing is deleted. Returns the deleted IDs; call get_project to see what remains.
Requires a connection with edit access.
AuthorizationBearer <token>An API key from Settings → Developers (pp_live_…), or an OAuth access token.
project_id*stringThe project the photos belong to.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidIdempotency-Key?stringA unique key (for example a UUID) that makes retries safe. A retry with the same key and body returns the stored response; the same key with a different body returns 422. Keys last 24 hours.
length <= 255application/json- body
photo_ids*array<>Photo IDs to delete (max 100).
1 <= items <= 100Delete photos
application/json- response
object*stringdeleted_ids*array<>project_id*string^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidcurl -X POST "https://example.com/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/photos/delete" \ -H "Content-Type: application/json" \ -d '{ "photo_ids": [ "68e4fc1a-5272-4c7c-88ae-00ad654f19af" ] }'{ "object": "deletion", "deleted_ids": [ "68e9c922-42e0-442b-8c61-e4abd0ab95e5" ], "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9"}Add photos to a project POST
Add photos to a project from public https image URLs (`image_urls`) or from files the user attached in ChatGPT (`files`). Up to 25 photos per call; a project holds at most 100. Each file must be JPEG, PNG, WebP, HEIC or HEIF and at most 25 MB. Dropbox and Google Drive share links work if they are shared publicly. HEIC is converted to JPEG and large photos are downscaled to a 2048px long edge, like the web app. Returns the new photos (use their IDs with enhance_photos, stage_photos or create_video) and a `failed` list with a reason per source; report failures to the user rather than retrying blindly. If the user has photos on their phone or computer and no links, call create_upload_link instead. Requires a connection with edit access.
Start a signed upload POST
Reserve room in a project for up to 25 photos and get one signed URL per file. PUT each file's raw bytes to its upload_url with exactly the returned headers, then call POST /uploads/{id}/complete with the storage_path, filename, size and content_type of every file that uploaded. Files must be JPEG, PNG, WebP, HEIC or HEIF, at most 25 MB each; a project holds at most 100 photos. The reservation expires at expires_at (about 15 minutes); complete before then. Files are stored exactly as sent, except HEIC/HEIF, which is converted to JPEG on completion. Downscale large images yourself (the web app uses a 2048px long edge). Requires a connection with edit access.