Portkey · Capability

Portkey API — Providers

Portkey API — Providers. 5 operations. Lead operation: List All Providers. Self-contained Naftiko capability covering one Portkey business surface.

Run with Naftiko PortkeyProviders

What You Can Do

GET
Get — List All Providers
/v1/providers
POST
Post — Create a Provider
/v1/providers
GET
Get — Get a Provider
/v1/providers/{slug}
PUT
Put — Update a Provider
/v1/providers/{slug}
DELETE
Delete — Delete a Provider
/v1/providers/{slug}

MCP Tools

list-all-providers

List All Providers

read-only idempotent
create-provider

Create a Provider

get-provider

Get a Provider

read-only idempotent
update-provider

Update a Provider

idempotent
delete-provider

Delete a Provider

idempotent

Capability Spec

portkey-providers.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Portkey API — Providers
  description: 'Portkey API — Providers. 5 operations. Lead operation: List All Providers. Self-contained Naftiko capability
    covering one Portkey business surface.'
  tags:
  - Portkey
  - Providers
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PORTKEY_API_KEY: PORTKEY_API_KEY
capability:
  consumes:
  - type: http
    namespace: portkey-providers
    baseUri: https://api.portkey.ai/v1
    description: Portkey API — Providers business capability. Self-contained, no shared references.
    resources:
    - name: providers
      path: /providers
      operations:
      - name: get
        method: GET
        description: List All Providers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: current_page
          in: query
          type: integer
          description: Current page, defaults to 0
        - name: page_size
          in: query
          type: integer
          description: Page size, default to 50
        - name: workspace_id
          in: query
          type: string
          description: Not required when using workspace API keys. Required when using organisation admin keys
      - name: post
        method: POST
        description: Create a Provider
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: providers-slug
      path: /providers/{slug}
      operations:
      - name: get
        method: GET
        description: Get a Provider
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: query
          type: string
          description: optional, needed when using organisation admin keys
        - name: slug
          in: path
          type: string
          description: Provider slug
          required: true
      - name: put
        method: PUT
        description: Update a Provider
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: query
          type: string
          description: optional, needed when using organisation admin keys
        - name: slug
          in: path
          type: string
          description: Provider slug
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: delete
        method: DELETE
        description: Delete a Provider
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: query
          type: string
          description: optional, needed when using organisation admin keys
        - name: slug
          in: path
          type: string
          description: Provider slug
          required: true
    authentication:
      type: bearer
      token: '{{env.PORTKEY_API_KEY}}'
  exposes:
  - type: rest
    namespace: portkey-providers-rest
    port: 8080
    description: REST adapter for Portkey API — Providers. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/providers
      name: providers
      description: REST surface for providers.
      operations:
      - method: GET
        name: get
        description: List All Providers
        call: portkey-providers.get
        with:
          current_page: rest.current_page
          page_size: rest.page_size
          workspace_id: rest.workspace_id
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Create a Provider
        call: portkey-providers.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/providers/{slug}
      name: providers-slug
      description: REST surface for providers-slug.
      operations:
      - method: GET
        name: get
        description: Get a Provider
        call: portkey-providers.get
        with:
          workspace_id: rest.workspace_id
          slug: rest.slug
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update a Provider
        call: portkey-providers.put
        with:
          workspace_id: rest.workspace_id
          slug: rest.slug
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: Delete a Provider
        call: portkey-providers.delete
        with:
          workspace_id: rest.workspace_id
          slug: rest.slug
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: portkey-providers-mcp
    port: 9090
    transport: http
    description: MCP adapter for Portkey API — Providers. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-all-providers
      description: List All Providers
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portkey-providers.get
      with:
        current_page: tools.current_page
        page_size: tools.page_size
        workspace_id: tools.workspace_id
      outputParameters:
      - type: object
        mapping: $.
    - name: create-provider
      description: Create a Provider
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: portkey-providers.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-provider
      description: Get a Provider
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portkey-providers.get
      with:
        workspace_id: tools.workspace_id
        slug: tools.slug
      outputParameters:
      - type: object
        mapping: $.
    - name: update-provider
      description: Update a Provider
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: portkey-providers.put
      with:
        workspace_id: tools.workspace_id
        slug: tools.slug
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-provider
      description: Delete a Provider
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: portkey-providers.delete
      with:
        workspace_id: tools.workspace_id
        slug: tools.slug
      outputParameters:
      - type: object
        mapping: $.