naftiko: 1.0.0-alpha2 info: label: LangWatch AI Gateway API description: 'OpenAI/Anthropic-compatible governance proxy — virtual keys, providers, budgets, cache rules. Self-contained Naftiko capability covering one LangWatch business surface.' tags: - LangWatch - AI Gateway - Virtual Keys - Budgets created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: LANGWATCH_API_KEY: LANGWATCH_API_KEY capability: consumes: - type: http namespace: ai-gateway baseUri: https://app.langwatch.ai description: OpenAI/Anthropic-compatible governance proxy — virtual keys, providers, budgets, cache rules. resources: - name: api-gateway-v1-budgets path: /api/gateway/v1/budgets operations: - name: listBudgets method: GET description: List budgets. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: createBudget method: POST description: Create a budget. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: api-gateway-v1-budgets-id path: /api/gateway/v1/budgets/{id} operations: - name: updateBudget method: PATCH description: Update a budget. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: archiveBudget method: DELETE description: Archive a budget. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: api-gateway-v1-cache-rules path: /api/gateway/v1/cache-rules operations: - name: listCacheRules method: GET description: List cache rules. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: createCacheRule method: POST description: Create a cache rule. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: api-gateway-v1-cache-rules-id path: /api/gateway/v1/cache-rules/{id} operations: - name: getCacheRule method: GET description: Get a cache rule. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: updateCacheRule method: PATCH description: Update a cache rule. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: archiveCacheRule method: DELETE description: Archive a cache rule. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: api-gateway-v1-providers path: /api/gateway/v1/providers operations: - name: listProviderBindings method: GET description: List provider bindings. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: bindProvider method: POST description: Bind a model provider. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: api-gateway-v1-providers-id path: /api/gateway/v1/providers/{id} operations: - name: updateProviderBinding method: PATCH description: Update a provider binding. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: disableProviderBinding method: DELETE description: Disable a provider binding. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: api-gateway-v1-virtual-keys path: /api/gateway/v1/virtual-keys operations: - name: listVirtualKeys method: GET description: List virtual keys. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: createVirtualKey method: POST description: Create a virtual key. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: api-gateway-v1-virtual-keys-id path: /api/gateway/v1/virtual-keys/{id} operations: - name: getVirtualKey method: GET description: Get a virtual key. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: updateVirtualKey method: PATCH description: Update a virtual key. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-gateway-v1-virtual-keys-id-revoke path: /api/gateway/v1/virtual-keys/{id}/revoke operations: - name: revokeVirtualKey method: POST description: Revoke a virtual key. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-gateway-v1-virtual-keys-id-rotate path: /api/gateway/v1/virtual-keys/{id}/rotate operations: - name: rotateVirtualKey method: POST description: Rotate a virtual-key secret. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false authentication: type: bearer value: '{{env.LANGWATCH_API_KEY}}' placement: header exposes: - type: rest namespace: ai-gateway-rest port: 8080 description: REST adapter for LangWatch AI Gateway API. resources: - path: /v1/api/gateway/v1/budgets name: listbudgets-resource description: REST surface for listBudgets. operations: - method: GET name: listBudgets description: List budgets. call: ai-gateway.listBudgets outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/budgets name: createbudget-resource description: REST surface for createBudget. operations: - method: POST name: createBudget description: Create a budget. call: ai-gateway.createBudget with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/budgets/{id} name: updatebudget-resource description: REST surface for updateBudget. operations: - method: PATCH name: updateBudget description: Update a budget. call: ai-gateway.updateBudget with: id: rest.path.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/budgets/{id} name: archivebudget-resource description: REST surface for archiveBudget. operations: - method: DELETE name: archiveBudget description: Archive a budget. call: ai-gateway.archiveBudget with: id: rest.path.id outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/cache-rules name: listcacherules-resource description: REST surface for listCacheRules. operations: - method: GET name: listCacheRules description: List cache rules. call: ai-gateway.listCacheRules outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/cache-rules name: createcacherule-resource description: REST surface for createCacheRule. operations: - method: POST name: createCacheRule description: Create a cache rule. call: ai-gateway.createCacheRule with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/cache-rules/{id} name: getcacherule-resource description: REST surface for getCacheRule. operations: - method: GET name: getCacheRule description: Get a cache rule. call: ai-gateway.getCacheRule with: id: rest.path.id outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/cache-rules/{id} name: updatecacherule-resource description: REST surface for updateCacheRule. operations: - method: PATCH name: updateCacheRule description: Update a cache rule. call: ai-gateway.updateCacheRule with: id: rest.path.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/cache-rules/{id} name: archivecacherule-resource description: REST surface for archiveCacheRule. operations: - method: DELETE name: archiveCacheRule description: Archive a cache rule. call: ai-gateway.archiveCacheRule with: id: rest.path.id outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/providers name: listproviderbindings-resource description: REST surface for listProviderBindings. operations: - method: GET name: listProviderBindings description: List provider bindings. call: ai-gateway.listProviderBindings outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/providers name: bindprovider-resource description: REST surface for bindProvider. operations: - method: POST name: bindProvider description: Bind a model provider. call: ai-gateway.bindProvider with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/providers/{id} name: updateproviderbinding-resource description: REST surface for updateProviderBinding. operations: - method: PATCH name: updateProviderBinding description: Update a provider binding. call: ai-gateway.updateProviderBinding with: id: rest.path.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/providers/{id} name: disableproviderbinding-resource description: REST surface for disableProviderBinding. operations: - method: DELETE name: disableProviderBinding description: Disable a provider binding. call: ai-gateway.disableProviderBinding with: id: rest.path.id outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/virtual-keys name: listvirtualkeys-resource description: REST surface for listVirtualKeys. operations: - method: GET name: listVirtualKeys description: List virtual keys. call: ai-gateway.listVirtualKeys outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/virtual-keys name: createvirtualkey-resource description: REST surface for createVirtualKey. operations: - method: POST name: createVirtualKey description: Create a virtual key. call: ai-gateway.createVirtualKey with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/virtual-keys/{id} name: getvirtualkey-resource description: REST surface for getVirtualKey. operations: - method: GET name: getVirtualKey description: Get a virtual key. call: ai-gateway.getVirtualKey with: id: rest.path.id outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/virtual-keys/{id} name: updatevirtualkey-resource description: REST surface for updateVirtualKey. operations: - method: PATCH name: updateVirtualKey description: Update a virtual key. call: ai-gateway.updateVirtualKey with: id: rest.path.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/virtual-keys/{id}/revoke name: revokevirtualkey-resource description: REST surface for revokeVirtualKey. operations: - method: POST name: revokeVirtualKey description: Revoke a virtual key. call: ai-gateway.revokeVirtualKey with: id: rest.path.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/gateway/v1/virtual-keys/{id}/rotate name: rotatevirtualkey-resource description: REST surface for rotateVirtualKey. operations: - method: POST name: rotateVirtualKey description: Rotate a virtual-key secret. call: ai-gateway.rotateVirtualKey with: id: rest.path.id body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: ai-gateway-mcp port: 9090 transport: http description: MCP adapter for LangWatch AI Gateway API. One tool per consumed operation. tools: - name: langwatch-listBudgets description: List budgets. hints: readOnly: true destructive: false idempotent: true call: ai-gateway.listBudgets outputParameters: - type: object mapping: $. - name: langwatch-createBudget description: Create a budget. hints: readOnly: false destructive: false idempotent: false call: ai-gateway.createBudget with: body: tools.body outputParameters: - type: object mapping: $. - name: langwatch-updateBudget description: Update a budget. hints: readOnly: false destructive: false idempotent: false call: ai-gateway.updateBudget with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: langwatch-archiveBudget description: Archive a budget. hints: readOnly: false destructive: true idempotent: true call: ai-gateway.archiveBudget with: id: tools.id outputParameters: - type: object mapping: $. - name: langwatch-listCacheRules description: List cache rules. hints: readOnly: true destructive: false idempotent: true call: ai-gateway.listCacheRules outputParameters: - type: object mapping: $. - name: langwatch-createCacheRule description: Create a cache rule. hints: readOnly: false destructive: false idempotent: false call: ai-gateway.createCacheRule with: body: tools.body outputParameters: - type: object mapping: $. - name: langwatch-getCacheRule description: Get a cache rule. hints: readOnly: true destructive: false idempotent: true call: ai-gateway.getCacheRule with: id: tools.id outputParameters: - type: object mapping: $. - name: langwatch-updateCacheRule description: Update a cache rule. hints: readOnly: false destructive: false idempotent: false call: ai-gateway.updateCacheRule with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: langwatch-archiveCacheRule description: Archive a cache rule. hints: readOnly: false destructive: true idempotent: true call: ai-gateway.archiveCacheRule with: id: tools.id outputParameters: - type: object mapping: $. - name: langwatch-listProviderBindings description: List provider bindings. hints: readOnly: true destructive: false idempotent: true call: ai-gateway.listProviderBindings outputParameters: - type: object mapping: $. - name: langwatch-bindProvider description: Bind a model provider. hints: readOnly: false destructive: false idempotent: false call: ai-gateway.bindProvider with: body: tools.body outputParameters: - type: object mapping: $. - name: langwatch-updateProviderBinding description: Update a provider binding. hints: readOnly: false destructive: false idempotent: false call: ai-gateway.updateProviderBinding with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: langwatch-disableProviderBinding description: Disable a provider binding. hints: readOnly: false destructive: true idempotent: true call: ai-gateway.disableProviderBinding with: id: tools.id outputParameters: - type: object mapping: $. - name: langwatch-listVirtualKeys description: List virtual keys. hints: readOnly: true destructive: false idempotent: true call: ai-gateway.listVirtualKeys outputParameters: - type: object mapping: $. - name: langwatch-createVirtualKey description: Create a virtual key. hints: readOnly: false destructive: false idempotent: false call: ai-gateway.createVirtualKey with: body: tools.body outputParameters: - type: object mapping: $. - name: langwatch-getVirtualKey description: Get a virtual key. hints: readOnly: true destructive: false idempotent: true call: ai-gateway.getVirtualKey with: id: tools.id outputParameters: - type: object mapping: $. - name: langwatch-updateVirtualKey description: Update a virtual key. hints: readOnly: false destructive: false idempotent: false call: ai-gateway.updateVirtualKey with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: langwatch-revokeVirtualKey description: Revoke a virtual key. hints: readOnly: false destructive: false idempotent: false call: ai-gateway.revokeVirtualKey with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: langwatch-rotateVirtualKey description: Rotate a virtual-key secret. hints: readOnly: false destructive: false idempotent: false call: ai-gateway.rotateVirtualKey with: id: tools.id body: tools.body outputParameters: - type: object mapping: $.