naftiko: 1.0.0-alpha2 info: label: Portkey API — Models description: 'Portkey API — Models. 3 operations. Lead operation: List Available Models. Self-contained Naftiko capability covering one Portkey business surface.' tags: - Portkey - Models created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: PORTKEY_API_KEY: PORTKEY_API_KEY capability: consumes: - type: http namespace: portkey-models baseUri: https://api.portkey.ai/v1 description: Portkey API — Models business capability. Self-contained, no shared references. resources: - name: models path: /models operations: - name: listmodels method: GET description: List Available Models outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: ai_service in: query type: string description: Filter models by the AI service (e.g., 'openai', 'anthropic'). - name: provider in: query type: string description: Filter models by the provider. - name: limit in: query type: integer description: The maximum number of models to return. - name: offset in: query type: integer description: The number of models to skip before starting to collect the result set. - name: sort in: query type: string description: The field to sort the results by. - name: order in: query type: string description: The order to sort the results in. - name: models-model path: /models/{model} operations: - name: retrievemodel method: GET description: Retrieves a model instance, providing basic information about the model such as the owner and permissioning. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: model in: path type: string description: The ID of the model to use for this request required: true - name: deletemodel method: DELETE description: Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: model in: path type: string description: The model to delete required: true authentication: type: bearer token: '{{env.PORTKEY_API_KEY}}' exposes: - type: rest namespace: portkey-models-rest port: 8080 description: REST adapter for Portkey API — Models. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/models name: models description: REST surface for models. operations: - method: GET name: listmodels description: List Available Models call: portkey-models.listmodels with: ai_service: rest.ai_service provider: rest.provider limit: rest.limit offset: rest.offset sort: rest.sort order: rest.order outputParameters: - type: object mapping: $. - path: /v1/models/{model} name: models-model description: REST surface for models-model. operations: - method: GET name: retrievemodel description: Retrieves a model instance, providing basic information about the model such as the owner and permissioning. call: portkey-models.retrievemodel with: model: rest.model outputParameters: - type: object mapping: $. - method: DELETE name: deletemodel description: Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. call: portkey-models.deletemodel with: model: rest.model outputParameters: - type: object mapping: $. - type: mcp namespace: portkey-models-mcp port: 9090 transport: http description: MCP adapter for Portkey API — Models. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-available-models description: List Available Models hints: readOnly: true destructive: false idempotent: true call: portkey-models.listmodels with: ai_service: tools.ai_service provider: tools.provider limit: tools.limit offset: tools.offset sort: tools.sort order: tools.order outputParameters: - type: object mapping: $. - name: retrieves-model-instance-providing-basic description: Retrieves a model instance, providing basic information about the model such as the owner and permissioning. hints: readOnly: true destructive: false idempotent: true call: portkey-models.retrievemodel with: model: tools.model outputParameters: - type: object mapping: $. - name: delete-fine-tuned-model-you description: Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. hints: readOnly: false destructive: true idempotent: true call: portkey-models.deletemodel with: model: tools.model outputParameters: - type: object mapping: $.