tokenAuthMiddleware from src/auth/api-tokens.ts).
POST /api/gateway
Submit a request to the gateway.
Response
202 (async)
200 (synchronous, options.synchronous: true)
GET /api/gateway/:requestId/status
Poll the status of a gateway request.200
Workflow Types
API Token Management
API tokens are scoped to the gateway and integration webhooks. Generate tokens in the settings UI or via:201
Rate Limits
Gateway requests are rate-limited per token:- Default: 60 requests / minute
- Burst: 10 requests / second
GATEWAY_RATE_LIMIT_RPM environment variable.
Gateway Context
TheGatewayContext type (src/gateway/types.ts) carries metadata through the request pipeline:
Related
- Tasks API - Direct task creation without workflow routing
- Agents API - View available agent adapters
- Chat Streaming - SSE streaming for interactive execution
- Webhooks API - Configure callback URLs for task completion