Pixloomdocs

Fetch, pin and reject an image

Everything under /api/v1/image/:id, where :id is the imageId from a completed job.

All three need a secret key, and all three 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.

StatusBody
302Redirect to the image.
401Missing 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, unhooks it from its permalink, 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.

A rejected image still joins the shared library on the usual thirty day schedule. Rejection is a signal about fit, not a delete. Use the dashboard if you need it gone.

Responses for pin and reject

StatusBody
200The result above.
401Missing or invalid key.
403Account not approved, or you used a publishable key.
404{ "error": "Image not found" }
500The write failed. Retry.

On this page