Fetch, pin, reject and delete an image
Everything under /api/v1/image/:id, where :id is the imageId from a completed job.
All of them need a secret key, and all of them only ever touch images your account owns. Anything else is a 404, never a 403, so the endpoints give nothing away about images that are not yours.
GET /api/v1/image/:id
Redirect to an image you already made.
curl -L https://pixloom.dev/api/v1/image/b71e... \
-H "Authorization: Bearer sk_live_..."A 302 to the file, cached for a day. This is a stable address: unlike a job, it does not expire, so it is the id worth storing when a generation completes.
If you still have the job id, add ?jobId= and we answer straight from the job store without a database read. It is a small win on a page that just finished generating.
| Status | Body |
|---|---|
302 | Redirect to the image. |
401 | Missing or invalid key. |
404 | { "error": "Image not found" }. Unknown, or not yours. |
PATCH /api/v1/image/:id/pin
Keep this one. A pinned image is the image we serve for its permalink from then on, instead of generating a new take.
curl -X PATCH https://pixloom.dev/api/v1/image/b71e.../pin \
-H "Authorization: Bearer sk_live_..."
# 200 { "id": "b71e...", "pinned": true }Pinning also clears a rejection, so pinning something you rejected earlier undoes that.
DELETE /api/v1/image/:id/pin
Unpin. The permalink goes back to rotating through whatever else it has.
curl -X DELETE https://pixloom.dev/api/v1/image/b71e.../pin \
-H "Authorization: Bearer sk_live_..."
# 200 { "id": "b71e...", "pinned": false }PATCH /api/v1/image/:id/reject
Tell us this one missed.
curl -X PATCH https://pixloom.dev/api/v1/image/b71e.../reject \
-H "Authorization: Bearer sk_live_..."
# 200 { "id": "b71e...", "rejected": true }Rejecting does more than hide the image. It unpins it, stops its permalink from ever serving it, drops it from the render cache, and marks any embedded prompt pointing at it for regeneration. In practice: the next request for that prompt makes a fresh image rather than serving the one you just turned down. On a permalink, the image stays listed under Hidden on its dashboard page, where you can show it again.
A rejected image that is not on a permalink still joins the shared library on the usual thirty day schedule. Permalink images never do. Rejection is a signal about fit, not a delete. To remove an image for good, delete it.
DELETE /api/v1/image/:id
Delete an image: the file and its record are gone, and its size comes off your storage. Images on a permalink, or already in the shared library, cannot be deleted this way and answer 400.
curl -X DELETE https://pixloom.dev/api/v1/image/b71e... \
-H "Authorization: Bearer sk_live_..."
# 200 { "id": "b71e...", "deleted": true }Responses for pin, reject and delete
| Status | Body |
|---|---|
200 | The result above. |
401 | Missing or invalid key. |
403 | Account not approved, or you used a publishable key. |
400 | Delete only: the image is on a permalink or in the shared library. |
404 | { "error": "Image not found" } |
500 | The write failed. Retry. |