Authentication
Every agent has its own API token, visible on the agent's settings page. Pass it as x-api-key: YOUR_AGENT_TOKEN on every request. Tokens are per-agent so you can rotate or revoke access to one agent without touching the others.
Invoke an agent
POST https://gopilotgo.com/api/public/agents/:agent_id/invoke
Body: { "input": "your instruction here" }. The call runs the agent synchronously and returns { ok: true, run_id, output }. Treat output as plain text the agent produced.
curl -X POST https://gopilotgo.com/api/public/agents/AGENT_ID/invoke \
-H "x-api-key: YOUR_AGENT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"input":"Draft a follow-up email to the lead we just got."}'Errors
401 missing or invalid token, 409 agent is paused, 400 bad body, 500 the run itself failed (message in error).
Rate limits
Usage is metered in tokens, voice seconds, and browser seconds against your plan, not request count. If you exhaust your plan allowance the API returns the run error and your daily cost ceiling halts further runs until reset.
Coming next
Streaming run events (SSE), full agent CRUD over REST, and workspace-scoped keys. For now, agent creation and editing happens in the GO Pilot GO dashboard, and agent-to-agent invocation is best done over MCP.
Need event push to your own system? Subscribe via webhooks.