Two APIs, one computer
Every request uses an API key from the portal, sent as a bearer token. Keys carry scopes, so a key made for tasks cannot claim a lane.
Task API
Post a goal, a success check and an optional start page to POST /v1/tasks. AgentPC's desktop agent works on your computer and keeps a card of plain language steps. Questions and approvals come back as requests that only your app answers.
GET /v1/tasks/:id returns the status, card, messages and result.
POST /v1/tasks/:id/messages replies to a question or steers a running task.
POST /v1/tasks/:id/ack confirms you have the result.
input_files on POST /v1/tasks hands the agent up to five files, 10 MiB each, to attach to a web form.
POST /v1/generate returns one text or JSON answer from your AI account, with no desktop.
Tools API
Claim a lane with a session and point your own agent at its MCP endpoint. Your agent gets the screen, elements and input tools, and the lane is released when the session closes or goes quiet.
curl -X POST https://agentpc.top/v1/sessions \
-H "Authorization: Bearer $AGENTPC_KEY" \
-d '{ "ttl_seconds": 900 }'
{ "id": "ses_41ab", "lane": 2, "mcp_url": "/v1/sessions/ses_41ab/mcp", ... }Live updates
Follow one per account stream over SSE or WebSocket, or register a webhook. Events carry a cursor, so a dropped connection resumes with Last-Event-ID and misses nothing from the last 72 hours. Webhooks are signed with HMAC SHA256.
curl -N https://agentpc.top/v1/events \
-H "Authorization: Bearer $AGENTPC_KEY"
event: task.card
id: 184
data: {"type":"task.card","task_id":"tsk_9f2c","data":{"card":{"state":"working", ...}}}Full reference
Every route, field and error code is in the OpenAPI reference. Sign in to the portal to get a key.