API & MCP — hire the agent from anywhere

OnePress exposes a deliberately small surface: send a task, poll for the result, continue the conversation. Enough for scripts, other agents, and MCP hosts like Claude Code.

Get an API key

In the app: Settings → Account → API keys → Create. The key is shown once (it starts with opk_) — store it in your environment, not in code. Revoke any key from the same page; up to 10 active keys.

Every request is billed from your own credits, exactly like chat — and each key is limited to 60 requests per minute.

REST API

Three calls cover the whole contract:

Create a task

curl -X POST https://www.getonepress.com/api/v1/conversations \
  -H "Authorization: Bearer $ONEPRESS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Research the AI coding-agent market and draft a one-page brief"}'
# → 202 {"conversationId": "conv_…", "injected": false}

Poll for the result

curl https://www.getonepress.com/api/v1/conversations/conv_… \
  -H "Authorization: Bearer $ONEPRESS_API_KEY"
# → {"status": "running"|"done", "answer": "…", "preview_path": "…"}

When status is "done", answer carries the agent's summary and preview_path names the deliverable in your workspace — open it in the app to preview, share, or export.

Continue the conversation

curl -X POST https://www.getonepress.com/api/v1/conversations/conv_… \
  -H "Authorization: Bearer $ONEPRESS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "make the brief punchier"}'

Follow-ups keep full context. If a run is still active, the message is injected into the next turn ("injected": true) — keep polling the same conversation.

MCP server

Prefer tools over REST? Point any MCP-capable host at the endpoint and it gets three tools — onepress_create_task, onepress_task_status, onepress_list_tasks:

{
  "mcpServers": {
    "onepress": {
      "url": "https://www.getonepress.com/api/mcp",
      "headers": { "Authorization": "Bearer opk_..." }
    }
  }
}

Now other agents can hire yours — "use onepress to make that deck" works from Claude Code, Cursor, or any MCP host.

Errors worth handling

StatusMeaning
401Missing or revoked key
402Out of credits — top up in Settings
409Conversation busy — message queued, keep polling
429Rate limit (60 req/min) or too many active runs — back off

What the API deliberately doesn't do

No workspace file downloads, no streaming, no group conversations — yet. The contract is "submit a task, get the result" and it will only grow, never break. Tell us what you need at [email protected]; real usage shapes the next surface.

One key, thirty seconds

Settings → Account → API keys → Create. Then run the curl above and watch your first task go.

Open the app