endpoint
PUT
/api/agents/tasks/{id}/files/{fileId}
Edit a changed file before review
auth: API keybase https://app.nz
Request
curl -sX PUT https://app.nz/api/agents/tasks/{id}/files/{fileId} \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{}'Agents API
Run cloud coding agents against a repo and a prompt, then poll status, stream step events, inspect changed files, and cancel or retry. GET /api/agents/config returns the option lists (engines, models, reasoning efforts, machine types, providers, skills) and needs no auth so a UI can render the form before sign-in.
POST /api/agents/tasks body
prompt*stringWhat the agent should do (max 20k chars).sourcestringProvider that runs it: openpaths (default, our cloud) | devin | cursor | codex-cloud. See the Agents SDK section.repostringTarget repo as owner/name.branchstringWorking branch to create or use.baseBranchstringBranch to base the work on.modelstringModel route, e.g. app/auto-code.enginestringAgent engine (see /config).reasoningEffortstringnone | low | medium | high | xhigh | auto.machineTypestringWorker capability tier (see /config), e.g. auto, cpx32, gpu-a100, or win-cpx32 for a Windows worker.providerstringExecution tier, e.g. shared (auto fleet), cloud CPU, or cloud GPU (see /config).skillsstring[]Enabled skills, e.g. ["github","visualbench"].autoMergePrbooleanAuto-merge the PR when checks pass.autoNextStepsbooleanLet the agent queue follow-up steps.spendCapUsdnumberHard spend ceiling for the task.timeoutSecondsnumberWall-clock timeout.projectIdstringProject to bill and scope to; defaults to your default project.titlestringDisplay title; derived from the prompt if omitted.Launch an agent
curl -sX POST https://app.nz/api/agents/tasks \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{
"prompt": "add usage analytics to the dashboard",
"repo": "acme/ai-dashboard",
"model": "app/auto-code",
"reasoningEffort": "high",
"machineType": "auto",
"provider": "shared",
"skills": ["github", "visualbench"],
"spendCapUsd": 2.00,
"autoMergePr": false
}'More in Agents API
GET
/api/agents/configOption lists for the agent formPOST/api/agents/tasksLaunch an agent taskGET/api/agents/tasksList your agent tasksGET/api/agents/tasks/{id}Get a task with its current statusGET/api/agents/tasks/{id}/eventsStep-by-step events and statusPOST/api/agents/tasks/{id}/cancelCancel a running taskPOST/api/agents/tasks/{id}/retryRetry a finished or failed taskGET/api/agents/tasks/{id}/filesList files the agent changed