Portkey · Capability

Portkey API — Completions

Portkey API — Completions. 1 operations. Lead operation: Completions. Self-contained Naftiko capability covering one Portkey business surface.

Run with Naftiko PortkeyCompletions

What You Can Do

POST
Createcompletion — Completions
/v1/completions

MCP Tools

completions

Completions

Capability Spec

portkey-completions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Portkey API — Completions
  description: 'Portkey API — Completions. 1 operations. Lead operation: Completions. Self-contained Naftiko capability covering
    one Portkey business surface.'
  tags:
  - Portkey
  - Completions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PORTKEY_API_KEY: PORTKEY_API_KEY
capability:
  consumes:
  - type: http
    namespace: portkey-completions
    baseUri: https://api.portkey.ai/v1
    description: Portkey API — Completions business capability. Self-contained, no shared references.
    resources:
    - name: completions
      path: /completions
      operations:
      - name: createcompletion
        method: POST
        description: Completions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.PORTKEY_API_KEY}}'
  exposes:
  - type: rest
    namespace: portkey-completions-rest
    port: 8080
    description: REST adapter for Portkey API — Completions. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/completions
      name: completions
      description: REST surface for completions.
      operations:
      - method: POST
        name: createcompletion
        description: Completions
        call: portkey-completions.createcompletion
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: portkey-completions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Portkey API — Completions. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: completions
      description: Completions
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: portkey-completions.createcompletion
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.