Integrations
Public API
Start, follow and steer Picnic jobs from your own apps and scripts with an API key and a simple JSON API at api.onpicnic.com.
The Picnic API lets your own code use your agent factory: start jobs from a script, a CI pipeline or an issue tracker, follow them, answer their questions and read their results. It's a small JSON API at:
https://api.onpicnic.com/api/v1
The full reference, with every field and error, is at /docs/api.md. If you'd rather connect an AI app, see the MCP server.
Keys
- Open the Account page of the console at onpicnic.com/console/account.
- Under API keys, create a key and give it a name.
- Copy it. It starts
pk_live_and is shown only once.
Send it on every request:
Authorization: Bearer pk_live_...
A key acts as you, with access to every machine and job on your account, and nobody else's. There are no scopes yet. The console shows when each key was last used; revoke a key there and it stops working at once.
Jobs made with a key show the key's name as their creator on the board.
Create a job
curl https://api.onpicnic.com/api/v1/jobs \
-H "Authorization: Bearer $PICNIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Fix the login redirect loop on Safari",
"protocol": "ship",
"engine": "claude",
"deviceId": "any",
"repo": "my-app"
}'
| Field | What it is |
|---|---|
prompt |
What to do |
protocol |
The mode: plan, build (Plan and build) or ship. The old values still work: propose and diagnose are read as plan, demo as build and land as ship |
engine |
Optional. claude (the default) or codex |
accountId |
Optional. One of that engine's accounts on the machine, from GET /api/v1/devices/:id/accounts. The machine's default otherwise |
deviceId |
A device id from GET /api/v1/devices, or "any": the online machine with the fewest running jobs that has the repository |
repo |
A path on the machine, a ~/ path, or a repository name such as my-app |
baseBranch |
Optional. The repository's default branch otherwise |
prUrl |
Optional, with ship. An existing pull request for the job to take over and merge |
schedule |
Optional. { "at": "2026-11-18T09:00:00+00:00" } starts it at a time, { "after": "<job id>" } once another job on the same machine is done |
start |
Optional, default true. false adds the job to Backlog |
Your global instructions are added automatically, and the title is written for you. The answer is the new job, 201:
{
"id": "01j..._01j...",
"deviceId": "01j...",
"title": "Fix the login redirect loop on Safari",
"protocol": "ship",
"column": "waiting",
"ask": null,
"prUrl": null,
"online": true,
"waiting": false,
"url": "picnic://job/01j..._01j..."
}
A job for an offline machine comes back with waiting: true and starts as soon as the machine connects.
Follow it
| Method | Path | What |
|---|---|---|
| GET | /api/v1/devices |
Your machines |
| GET | /api/v1/devices/:id/repos |
A machine's repositories |
| GET | /api/v1/devices/:id/accounts |
A machine's Claude Code and Codex accounts |
| GET | /api/v1/jobs |
Jobs, newest first. ?column=, ?deviceId=, ?limit= |
| POST | /api/v1/jobs |
Create a job |
| GET | /api/v1/jobs/:id |
One job |
| GET | /api/v1/jobs/:id/events |
Its chat and steps, ?since= for new ones |
| POST | /api/v1/jobs/:id/messages |
Write to the chat or answer a question, { "text": "..." } |
| POST | /api/v1/jobs/:id/reply |
Act on a job ready to review, { "action": "ship", "message": "..." } |
| POST | /api/v1/jobs/:id/start |
Start a backlog job, or a waiting one now |
| POST | /api/v1/jobs/:id/cancel |
Stop a job |
A job's column is where it is on the board: backlog, waiting, running, needs_you or done. When it's needs_you, ask says what it needs from you. Answer a question with a message.
Review it
A plan or a build that's ready to review is in needs_you with state: "review" (?column=review lists just those). POST /api/v1/jobs/:id/reply does what the Review buttons do in the apps:
action |
What it does |
|---|---|
revise |
Make changes, with your comments in message |
build |
A plan: build it |
ship |
A plan: build and merge it. A build: merge its pull request once CI is green |
approve |
A ship job: merge now |
done |
Mark it done, keeping the branch and any pull request |
close |
Close it, and stop it if it's still going |
admin: true with ship on a build, or approve on a ship job, merges past branch rules such as a required review.
Loops
Your loops are under /api/v1/loops: GET to list them, POST to make one, PATCH /:id to change or pause one, DELETE /:id and POST /:id/run to run one now. They're your own, the same ones as in the Loops tab, and run only on your own machines.
{
"name": "Nightly deps",
"prompt": "Update dependencies and fix anything that breaks",
"protocol": "ship",
"deviceId": "01j...",
"repo": "my-app",
"schedule": { "every": "day", "at": "02:00", "tz": "Europe/London" }
}
every is hour, day, weekday or week (with day, 0 is Sunday).
There are no webhooks yet. Poll the job, or its events with since, every so often.
Limits
Each key can make 60 requests a minute and create 10 jobs a minute. Over that you get 429 rate_limited with a Retry-After header.
Errors
Errors look like this:
{ "error": { "code": "repo_not_found", "message": "That repo isn't on this machine" } }
Common ones: invalid_key, repo_not_found, no_device_available, invalid_schedule, device_offline, device_timeout and rate_limited. Errors from the machine itself, such as not_in_backlog, not_in_review, low_storage or permission_open, are passed through unchanged. See Common errors.
Privacy
Jobs on a metadata-only machine come back with their content replaced by "(kept on this machine)", as everywhere else.
