API & MCP — agent को कहीं से भी hire कीजिए

OnePress जान-बूझकर छोटा surface रखता है: task भेजिए, result के लिए poll कीजिए, conversation जारी रखिए। Scripts, दूसरे agents और Claude Code जैसे MCP hosts के लिए इतना काफ़ी है।

API key लीजिए

App में: Settings → Account → API keys → Create. Key सिर्फ़ एक बार दिखती है (यह opk_ से शुरू होती है) — इसे अपने environment में रखिए, code में नहीं। उसी page से कोई भी key revoke कीजिए; एक साथ 10 active keys तक।

हर request आपके अपने credits से bill होता है, बिलकुल chat की तरह — और हर key 60 requests प्रति minute तक सीमित है।

REST API

तीन calls पूरा contract cover करती हैं:

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}

Result के लिए poll कीजिए

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

जब status "done" होता है, answer में agent का summary होता है और preview_path आपके workspace में deliverable का नाम बताता है — preview, share या export करने के लिए उसे app में खोलिए।

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 पूरा context रखते हैं। अगर कोई run अभी भी active है, तो message अगले turn में inject हो जाता है ("injected": true) — उसी conversation को poll करते रहिए।

Zapier, Make या n8n से trigger कीजिए

कोई भी tool जो HTTP request भेज सकती है, agent को hire कर सकती है — वही तीन calls webhook की तरह काम करती हैं। Zapier में Webhooks → POST इस्तेमाल कीजिए, Make में एक HTTP → Make a request module:

URLhttps://www.getonepress.com/api/v1/conversations
MethodPOST
HeadersAuthorization: Bearer opk_…
Content-Type: application/json
Body{"message": "Summarize this new row: {{fields}}", "title": "from Zapier"}

Trigger app के किसी भी field को message में map कीजिए — एक नई Airtable row, एक Stripe payment, एक form submission — और run तुरंत शुरू हो जाता है। अगर आपको उसी Zap में result वापस चाहिए तो दूसरे step में लौटा हुआ conversationId poll कीजिए।

MCP server

REST की जगह tools पसंद हैं? किसी भी MCP-capable host को endpoint पर point कीजिए और उसे तीन tools मिल जाते हैं — onepress_create_task, onepress_task_status, onepress_list_tasks:

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

अब दूसरे agents आपके agent को hire कर सकते हैं — "use onepress to make that deck" Claude Code, Cursor या किसी भी MCP host से काम करता है।

संभालने लायक errors

Statusमतलब
401Key गायब या revoked है
402Credits ख़त्म — Settings में top up कीजिए
409Conversation busy है — message queue हुआ, poll करते रहिए
429Rate limit (60 req/min) या बहुत ज़्यादा active runs — कुछ देर रुकिए

API जान-बूझकर क्या नहीं करता

अभी न workspace file downloads, न streaming, न group conversations। Contract यही है — "task submit कीजिए, result पाइए" — और यह सिर्फ़ बढ़ेगा, कभी टूटेगा नहीं। बताइए आपको क्या चाहिए: support [at] getonepress.com पर; असली इस्तेमाल ही अगला surface तय करता है।

एक key, तीस seconds

Settings → Account → API keys → Create. फिर ऊपर वाला curl चलाइए और अपना पहला task चलते देखिए।

App खोलें