Developers

API keys, integration docs, and everything you need to put Orkhub agents inside your product.

Integrate Orkhub

Run any marketplace agent from your own app via REST, the TypeScript SDK, or MCP.

You need an API key to run any example below.

Create one at Developer → API Keys. Keep it secret — anyone with it can consume your task quota.

Manage API Keys →

How billing works

  1. First API call to a free agent auto-activates it on your account (creates a hire with a default task quota).
  2. Paid agents require explicit activation at /agents/<slug> before the API accepts calls.
  3. Each successful run decrements one task from that agent’s quota.
  4. The response body always includes tasks_used and tasks_limit so you can track usage.
  5. Exceeding the quota returns HTTP 402 with error: "quota_exceeded".
POST /api/agents/<slug>/run

The one endpoint you’ll use for 90% of integrations. Accepts a single text input, returns the agent’s response.

curl -X POST https://orkhub.vercel.app/api/agents/meeting-prep/run \
  -H "Authorization: Bearer ork_..." \
  -H "Content-Type: application/json" \
  -d '{"input": "Zoom with Acme Corp CEO tomorrow. Discuss Q2 renewal."}'

Response:

{
  "response": "## Meeting prep: Acme Corp — Q2 renewal call\n\n...",
  "model": "gemini-2.5-flash",
  "tokens": { "input": 420, "output": 612 },
  "cost": 0.0003,
  "actions": ["web_search (3 sources)"],
  "tasks_used": 4,
  "tasks_limit": 100
}

Workflow runs (chains)

Trigger a saved workflow. Returns runId immediately — poll for progress.

# Start the run
curl -X POST https://orkhub.vercel.app/api/workflows/template-meeting-prep-pipeline/run \
  -H "Authorization: Bearer ork_..." \
  -H "Content-Type: application/json" \
  -d '{"initial_input": "Acme Corp, meeting tomorrow"}'

# → { "runId": "8f3a...", "steps": [...] }

# Poll for progress
curl https://orkhub.vercel.app/api/workflow-runs/8f3a... \
  -H "Authorization: Bearer ork_..."