1Keys and limits
Make a key in Settings: it is shown once; name it after the tool that uses it and revoke it there. Send it on every call:
Authorization: Bearer pc_…
- 60 requests a minute per key, 20 new orders an hour per account, 30 uploads an hour. Over a limit the answer is
429withRetry-Afterin seconds. - Cards cost no points but count against a limit: 30 cards ever with no pack bought, 60 a day after any pack. A new order writes 3, a change or a retry 1, a failed card nothing. Past it,
429with{ "error", "limit": { "who", "used", "max", "next" } }. - Errors are JSON:
{ "error": "…" }.401no or a bad key,403blocked account or Terms to accept in the app,404not yours or not there,409not at this stage,402too few points at Accept.
2One order with curl
KEY=pc_…; H="Authorization: Bearer $KEY"; J="Content-Type: application/json"
API=https://playablechef.com/api/v1
# 1. Order: store links and/or a brief; three cards start writing
ID=$(curl -s -H "$H" -H "$J" $API/orders \
-d '{"storeLinks":["https://apps.apple.com/app/id123"],"brief":"Boss fight hook, CTA: Play free"}' | jq -r .id)
# 2. Creatives (optional): images and videos, already compressed
curl -s -H "$H" -F file=@gameplay.mp4 $API/orders/$ID/files
# 3. Poll until the cards are written, then pick one
curl -s -H "$H" $API/orders/$ID | jq '.suggestion.cards[] | {slot, points: .shown.points, status: .current.status}'
curl -s -H "$H" -H "$J" $API/orders/$ID/approve -d '{"slot":"standard"}'
# 4. The chef builds; poll the stage and the thread
curl -s -H "$H" $API/orders/$ID | jq .stage # queue, build, accept
curl -s -H "$H" $API/orders/$ID/messages
# 5. At accept: play the dev build, then accept (charges the price)
curl -s -H "$H" $API/orders/$ID/builds | jq .dev.url
curl -s -H "$H" -H "$J" $API/orders/$ID/accept -d '{"showAsExample":false}'
# 6. Once delivered: a 15-minute link per network, or a zip of all
curl -s -H "$H" $API/orders/$ID/builds | jq '.production'
curl -sL -o builds.zip "$(curl -s -H "$H" $API/orders/$ID/builds | jq -r .production.zipUrl)"
3Stages
An order's stage is what the client sees: scope (three cards; pick one), queue (waiting for a chef; place gives the position), build (the chef works; dev builds appear), accept (check and accept), download (making the network builds; deliveredAt is set once they are ready), or cancelled. The price is null until Approve, then the picked card's, plus edits you confirm.
4Endpoints
| Method and path | Does |
|---|---|
GET /api/v1/me | The account: email, role, paid, the Terms state. |
GET /api/v1/store-lookup?url= | The game's name and icon for an App Store or Google Play link. |
POST /api/v1/orders | { storeLinks: string[], brief: string | null }, at least one of them; up to 5 links, a brief up to 5,000 characters. Answers the order at scope, 201. |
GET /api/v1/orders | Your orders, newest first. |
GET /api/v1/orders/:id | One order: stage, history, queue place, price, the cards (suggestion), Accept's shortfall at accept. |
POST /api/v1/orders/:id/files | One creative as multipart file (png, jpg, webp, gif, svg, mp4, mov, webm), or JSON { fileId } of an earlier upload. At most 10 files and 10 MB per order; at scope only. |
GET /api/v1/orders/:id/files, DELETE …/files/:fid | The order's creatives; take one off at scope (the upload stays in your files). |
GET /api/v1/files, GET|DELETE /api/v1/files/:id | Your uploads, one file, or delete one from every order and our server. |
POST /api/v1/orders/:id/suggestion/reroll | { slot: "light" | "standard" | "advanced", note? }: that card again, changed by your note (up to 300 characters). 202. |
POST /api/v1/orders/:id/suggestion/retry | { slot }: a failed card written again. |
POST /api/v1/orders/:id/suggestion/brief | { brief, rewrite }: a new brief; rewrite: true writes three new cards, otherwise the cards stay and the chef reads it. |
GET /api/v1/card-limit | Cards used, the maximum and what lifts it. |
POST /api/v1/orders/:id/approve | { slot, version? }: pick a card, or an earlier version of it; fixes the price, charges nothing. |
POST /api/v1/orders/:id/cancel | { reason? }, at scope or queue. |
GET|POST /api/v1/orders/:id/messages | The thread with the chef; post { text } or a multipart form with text and files. |
POST /api/v1/orders/:id/edits/:eid/confirm, …/withdraw | Yes or no to an edit the chef offered; yes adds its points to the price. |
GET /api/v1/orders/:id/builds | The dev build to play (a signed URL for 1 hour), and once delivered the network builds with 15-minute links and a zip. |
POST /api/v1/orders/:id/accept | { showAsExample? }: accept the playable and pay its price; 402 with the shortfall when your points do not cover it. |
POST /api/v1/orders/:id/example | { show }: after Accept, whether we may show the playable as an example. |
GET /api/v1/points | Free and bought points with their expiry, and every charge and return. |
5The cards
suggestion holds three slots sorted by price, Light, Standard and Advanced. Each slot has current (the newest card: writing, waiting, ready or failed), shown (the newest written one, its points and lines, the breakdown item by item) and versions, every written card of the slot oldest first. chosen is the picked slot.
6Support
Questions and bugs: support@playablechef.com.