Image API
Create and store a revocable pk_… key. Send it on every request as Authorization: Bearer <key>. Each image uses one credit; failed jobs are refunded.
Before you submit, create an API key in your dashboard.
curl -sS -X POST https://api.peelaway.io/api/process \
-H "Authorization: Bearer $PEELAWAY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"image": "<base64-encoded JPEG, PNG, or WebP>",
"prompt": "remove the background"
}'curl -sS \
-H "Authorization: Bearer $PEELAWAY_API_KEY" \
"https://api.peelaway.io/api/process/status?job_id=<job_id>"curl -sS \
-H "Authorization: Bearer $PEELAWAY_API_KEY" \
"https://api.peelaway.io/api/process/result?job_id=<job_id>"Endpoints
- POST /api/process
Submit image + prompt. Returns job_id. Optional: format, quality, negative_prompt, webhook_url, mask, detect.
- GET /api/process/status?job_id=…
Returns pending, done, or error. Poll every 2–5 seconds.
- GET /api/process/result?job_id=…
Returns the finished image metadata and a signed URL valid for one hour.
To avoid polling, include a public HTTPS webhook_url when you submit. For batches, send images instead of image.
MCP
Add Peelaway as a remote Streamable HTTP server. OAuth-capable clients open Peelaway sign-in. If OAuth is unavailable, use a dedicated API key as the bearer token.
https://mcp.peelaway.io/mcp- edit_image
Submit an image and plain-language edit.
- get_job_status
Check a job for pending, done, or error.
- get_job_result
Receive the finished image URL and metadata.
Client-specific instructions are in the MCP setup guide.
Errors
- 400
Invalid request — fix it before retrying.
- 402
Insufficient credits — add credits before retrying.
- 403
Access not verified — verify email or billing.
- 429
Rate limited — honor Retry-After.
- 502
Processing failed — retry with the same Idempotency-Key.
References
Start building
Create a revocable API key and run your first image edit.