openapi: 3.2.0 info: title: Karada Gateway API version: 1.0.0 description: Spec-Driven API definition for Karada MCP Platform servers: - url: https://api.karada.ai description: Production API - url: http://localhost:8080 description: Local development API tags: - name: Gateway paths: /api/v1/gateway: get: summary: Get or lazily initialize user gateway operationId: getGateway tags: - Gateway security: - BearerAuth: [] responses: '200': description: Gateway details retrieved or provisioned content: application/json: schema: type: object properties: id: type: string name: type: string gateway_url: type: string token_prefix: type: string is_active: type: boolean dynamic_discovery_enabled: type: boolean autonomous_agent_enabled: type: boolean post: summary: Create a new gateway operationId: createGateway tags: - Gateway security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string team_id: type: string autonomous_agent_enabled: type: boolean responses: '201': description: Gateway created content: application/json: schema: type: object properties: id: type: string name: type: string gateway_url: type: string token: type: string token_prefix: type: string patch: summary: Update default gateway configuration operationId: updateDefaultGateway tags: - Gateway security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object properties: name: type: string autonomous_agent_enabled: type: boolean dynamic_discovery_enabled: type: boolean responses: '200': description: Gateway updated successfully '400': description: Invalid request payload /api/v1/gateway/list: get: summary: List all gateways for a user or team operationId: listGateways tags: - Gateway security: - BearerAuth: [] parameters: - name: team_id in: query required: false schema: type: string responses: '200': description: List of user or team gateways content: application/json: schema: type: array items: type: object properties: id: type: string name: type: string gateway_url: type: string token_prefix: type: string is_active: type: boolean /api/v1/gateway/{id}: get: summary: Get gateway by ID operationId: getGatewayById tags: - Gateway security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: '200': description: Gateway details delete: summary: Delete gateway by ID operationId: deleteGateway tags: - Gateway security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: '204': description: Gateway deleted patch: summary: Update gateway configuration operationId: updateGateway tags: - Gateway security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: name: type: string autonomous_agent_enabled: type: boolean dynamic_discovery_enabled: type: boolean responses: '200': description: Gateway updated successfully '400': description: Invalid request payload '404': description: Gateway not found /api/v1/gateway/{id}/token: post: summary: Regenerate gateway bearer token for specific gateway operationId: regenerateGatewayTokenById tags: - Gateway security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: '200': description: New gateway token generated /api/v1/gateway/{id}/tools: get: summary: List connected tools for specific gateway operationId: listGatewayToolsById tags: - Gateway security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: '200': description: List of connected MCPs post: summary: Connect an MCP to a specific gateway operationId: connectGatewayToolById tags: - Gateway security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: '201': description: MCP connected to gateway /api/v1/gateway/token: post: summary: Regenerate gateway bearer token operationId: regenerateGatewayToken tags: - Gateway security: - BearerAuth: [] responses: '200': description: New gateway token generated content: application/json: schema: type: object properties: token: type: string token_prefix: type: string /api/v1/gateway/tools: get: summary: List connected gateway tools operationId: listGatewayTools tags: - Gateway security: - BearerAuth: [] responses: '200': description: List of connected MCPs content: application/json: schema: type: array items: type: object post: summary: Connect an MCP to the gateway operationId: connectGatewayTool tags: - Gateway security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - name - namespace_prefix - upstream_url properties: listing_id: type: string project_id: type: string name: type: string namespace_prefix: type: string upstream_url: type: string transport_type: type: string responses: '201': description: MCP connected to gateway /api/v1/gateway/tools/{id}: patch: summary: Update connected gateway tool operationId: updateGatewayTool tags: - Gateway security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: is_enabled: type: boolean name: type: string namespace_prefix: type: string responses: '200': description: Gateway tool updated delete: summary: Remove connected gateway tool operationId: deleteGatewayTool tags: - Gateway security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: '204': description: Tool removed from gateway /api/v1/gateway/tools/{id}/secret: put: summary: Set secret token for connected MCP tool operationId: setGatewayToolSecret tags: - Gateway security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object required: - secret properties: auth_header_name: type: string secret: type: string responses: '200': description: Secret encrypted and saved /api/v1/gateway/agent: post: summary: Execute an autonomous task using Karada Agent on default gateway operationId: executeDefaultGatewayAgent tags: - Gateway security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - task properties: task: type: string context: type: string max_steps: type: integer responses: '200': description: Task execution completed content: application/json: schema: type: object properties: response: type: string iterations: type: integer is_complete: type: boolean /api/v1/gateway/{id}/agent: post: summary: Execute an autonomous task using Karada Agent on specific gateway operationId: executeGatewayAgent tags: - Gateway security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object required: - task properties: task: type: string context: type: string max_steps: type: integer responses: '200': description: Task execution completed content: application/json: schema: type: object properties: response: type: string iterations: type: integer is_complete: type: boolean components: securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT