naftiko: 1.0.0-alpha2 info: label: OpenRouter API — Keys description: 'OpenRouter API — Keys. 5 operations. Lead operation: List API keys. Self-contained Naftiko capability covering one Openrouter business surface.' tags: - Openrouter - Keys created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: OPENROUTER_API_KEY: OPENROUTER_API_KEY capability: consumes: - type: http namespace: openrouter-keys baseUri: https://openrouter.ai/api/v1 description: OpenRouter API — Keys business capability. Self-contained, no shared references. resources: - name: keys path: /keys operations: - name: listkeys method: GET description: List API keys outputRawFormat: json outputParameters: - name: result type: object value: $. - name: createkey method: POST description: Create API key outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: keys-hash path: /keys/{hash} operations: - name: getkey method: GET description: Get API key outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hash in: path type: string required: true - name: deletekey method: DELETE description: Delete API key outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hash in: path type: string required: true - name: updatekey method: PATCH description: Update API key outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hash in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true authentication: type: bearer token: '{{env.OPENROUTER_API_KEY}}' exposes: - type: rest namespace: openrouter-keys-rest port: 8080 description: REST adapter for OpenRouter API — Keys. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/keys name: keys description: REST surface for keys. operations: - method: GET name: listkeys description: List API keys call: openrouter-keys.listkeys outputParameters: - type: object mapping: $. - method: POST name: createkey description: Create API key call: openrouter-keys.createkey with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/keys/{hash} name: keys-hash description: REST surface for keys-hash. operations: - method: GET name: getkey description: Get API key call: openrouter-keys.getkey with: hash: rest.hash outputParameters: - type: object mapping: $. - method: DELETE name: deletekey description: Delete API key call: openrouter-keys.deletekey with: hash: rest.hash outputParameters: - type: object mapping: $. - method: PATCH name: updatekey description: Update API key call: openrouter-keys.updatekey with: hash: rest.hash body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: openrouter-keys-mcp port: 9090 transport: http description: MCP adapter for OpenRouter API — Keys. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-api-keys description: List API keys hints: readOnly: true destructive: false idempotent: true call: openrouter-keys.listkeys outputParameters: - type: object mapping: $. - name: create-api-key description: Create API key hints: readOnly: false destructive: false idempotent: false call: openrouter-keys.createkey with: body: tools.body outputParameters: - type: object mapping: $. - name: get-api-key description: Get API key hints: readOnly: true destructive: false idempotent: true call: openrouter-keys.getkey with: hash: tools.hash outputParameters: - type: object mapping: $. - name: delete-api-key description: Delete API key hints: readOnly: false destructive: true idempotent: true call: openrouter-keys.deletekey with: hash: tools.hash outputParameters: - type: object mapping: $. - name: update-api-key description: Update API key hints: readOnly: false destructive: false idempotent: true call: openrouter-keys.updatekey with: hash: tools.hash body: tools.body outputParameters: - type: object mapping: $.