Portkey · Capability

Portkey API — Responses

Portkey API — Responses. 4 operations. Lead operation: Creates a model response. Self-contained Naftiko capability covering one Portkey business surface.

Run with Naftiko PortkeyResponses

What You Can Do

POST
Createresponse — Creates a model response
/v1/responses
GET
Getresponse — Retrieves a model response with the given ID.
/v1/responses/{response-id}
DELETE
Deleteresponse — Deletes a model response with the given ID.
/v1/responses/{response-id}
GET
Listinputitems — Returns a list of input items for a given response.
/v1/responses/{response-id}/input-items

MCP Tools

creates-model-response

Creates a model response

retrieves-model-response-given-id

Retrieves a model response with the given ID.

read-only idempotent
deletes-model-response-given-id

Deletes a model response with the given ID.

idempotent
returns-list-input-items-given

Returns a list of input items for a given response.

read-only idempotent

Capability Spec

portkey-responses.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Portkey API — Responses
  description: 'Portkey API — Responses. 4 operations. Lead operation: Creates a model response. Self-contained Naftiko capability
    covering one Portkey business surface.'
  tags:
  - Portkey
  - Responses
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PORTKEY_API_KEY: PORTKEY_API_KEY
capability:
  consumes:
  - type: http
    namespace: portkey-responses
    baseUri: https://api.portkey.ai/v1
    description: Portkey API — Responses business capability. Self-contained, no shared references.
    resources:
    - name: responses
      path: /responses
      operations:
      - name: createresponse
        method: POST
        description: Creates a model response
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: responses-response_id
      path: /responses/{response_id}
      operations:
      - name: getresponse
        method: GET
        description: Retrieves a model response with the given ID.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: response_id
          in: path
          type: string
          description: The ID of the response to retrieve.
          required: true
        - name: include
          in: query
          type: array
          description: Specify additional output data to include in the response. Currently
      - name: deleteresponse
        method: DELETE
        description: Deletes a model response with the given ID.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: response_id
          in: path
          type: string
          description: The ID of the response to delete.
          required: true
    - name: responses-response_id-input_items
      path: /responses/{response_id}/input_items
      operations:
      - name: listinputitems
        method: GET
        description: Returns a list of input items for a given response.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: response_id
          in: path
          type: string
          description: The ID of the response to retrieve input items for.
          required: true
        - name: limit
          in: query
          type: integer
          description: A limit on the number of objects to be returned. Limit can range between
        - name: order
          in: query
          type: string
          description: The order to return the input items in. Default is `asc`.
        - name: after
          in: query
          type: string
          description: An item ID to list items after, used in pagination.
        - name: before
          in: query
          type: string
          description: An item ID to list items before, used in pagination.
    authentication:
      type: bearer
      token: '{{env.PORTKEY_API_KEY}}'
  exposes:
  - type: rest
    namespace: portkey-responses-rest
    port: 8080
    description: REST adapter for Portkey API — Responses. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/responses
      name: responses
      description: REST surface for responses.
      operations:
      - method: POST
        name: createresponse
        description: Creates a model response
        call: portkey-responses.createresponse
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/responses/{response-id}
      name: responses-response-id
      description: REST surface for responses-response_id.
      operations:
      - method: GET
        name: getresponse
        description: Retrieves a model response with the given ID.
        call: portkey-responses.getresponse
        with:
          response_id: rest.response_id
          include: rest.include
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteresponse
        description: Deletes a model response with the given ID.
        call: portkey-responses.deleteresponse
        with:
          response_id: rest.response_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/responses/{response-id}/input-items
      name: responses-response-id-input-items
      description: REST surface for responses-response_id-input_items.
      operations:
      - method: GET
        name: listinputitems
        description: Returns a list of input items for a given response.
        call: portkey-responses.listinputitems
        with:
          response_id: rest.response_id
          limit: rest.limit
          order: rest.order
          after: rest.after
          before: rest.before
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: portkey-responses-mcp
    port: 9090
    transport: http
    description: MCP adapter for Portkey API — Responses. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: creates-model-response
      description: Creates a model response
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: portkey-responses.createresponse
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieves-model-response-given-id
      description: Retrieves a model response with the given ID.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portkey-responses.getresponse
      with:
        response_id: tools.response_id
        include: tools.include
      outputParameters:
      - type: object
        mapping: $.
    - name: deletes-model-response-given-id
      description: Deletes a model response with the given ID.
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: portkey-responses.deleteresponse
      with:
        response_id: tools.response_id
      outputParameters:
      - type: object
        mapping: $.
    - name: returns-list-input-items-given
      description: Returns a list of input items for a given response.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portkey-responses.listinputitems
      with:
        response_id: tools.response_id
        limit: tools.limit
        order: tools.order
        after: tools.after
        before: tools.before
      outputParameters:
      - type: object
        mapping: $.