API Reference
Keypost exposes two APIs: the MCP proxy for tool calls, and webhooks for events.
Base URLs
| Service | URL |
|---|---|
| MCP Proxy | https://{slug}.keypost.ai/mcp |
| Control Plane | https://keypost.ai/api |
| Status | https://status.keypost.ai |
Authentication
Keypost URLs use unguessable slugs (10-12 characters) for basic security. For additional authentication, configure an API key in your Keypost settings.
POST https://abc123xyz.keypost.ai/mcp
Authorization: Bearer your-api-key
Content-Type: application/jsonMCP Protocol
Keypost implements the full Model Context Protocol specification. All standard methods are supported.
Request format
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "tool_name",
"arguments": { ... }
}
}Success response
{
"jsonrpc": "2.0",
"id": 1,
"result": { ... }
}Error response
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32001,
"message": "Request denied by policy: ..."
}
}Error codes
| Code | Meaning |
|---|---|
| -32001 | Policy denied |
| -32002 | Keypost not found |
| -32003 | Keypost disabled |
| -32004 | Upstream error |
| -32005 | Circuit breaker open |
| -32006 | Approval required |
Rate limiting headers
When throttle policies are active, responses include rate limit headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1640995200Status endpoints
Health and metrics are available at status.keypost.ai:
GET /health- Health checkGET /metrics- Prometheus metrics