Pexels · Capability

Pexels API — Collections

Pexels API — Collections. 3 operations. Lead operation: My Collections. Self-contained Naftiko capability covering one Pexels business surface.

Run with Naftiko PexelsCollections

What You Can Do

GET
Getmycollections — My Collections
/v1/collections
GET
Getfeaturedcollections — Featured Collections
/v1/collections/featured
GET
Getcollectionmedia — Collection Media
/v1/collections/{id}

MCP Tools

my-collections

My Collections

read-only idempotent
featured-collections

Featured Collections

read-only idempotent
collection-media

Collection Media

read-only idempotent

Capability Spec

pexels-collections.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Pexels API — Collections
  description: 'Pexels API — Collections. 3 operations. Lead operation: My Collections. Self-contained Naftiko capability
    covering one Pexels business surface.'
  tags:
  - Pexels
  - Collections
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PEXELS_API_KEY: PEXELS_API_KEY
capability:
  consumes:
  - type: http
    namespace: pexels-collections
    baseUri: https://api.pexels.com/v1
    description: Pexels API — Collections business capability. Self-contained, no shared references.
    resources:
    - name: collections
      path: /collections
      operations:
      - name: getmycollections
        method: GET
        description: My Collections
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: page
          in: query
          type: integer
        - name: per_page
          in: query
          type: integer
    - name: collections-featured
      path: /collections/featured
      operations:
      - name: getfeaturedcollections
        method: GET
        description: Featured Collections
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: page
          in: query
          type: integer
        - name: per_page
          in: query
          type: integer
    - name: collections-id
      path: /collections/{id}
      operations:
      - name: getcollectionmedia
        method: GET
        description: Collection Media
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: type
          in: query
          type: string
        - name: sort
          in: query
          type: string
        - name: page
          in: query
          type: integer
        - name: per_page
          in: query
          type: integer
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.PEXELS_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: pexels-collections-rest
    port: 8080
    description: REST adapter for Pexels API — Collections. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/collections
      name: collections
      description: REST surface for collections.
      operations:
      - method: GET
        name: getmycollections
        description: My Collections
        call: pexels-collections.getmycollections
        with:
          page: rest.page
          per_page: rest.per_page
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/collections/featured
      name: collections-featured
      description: REST surface for collections-featured.
      operations:
      - method: GET
        name: getfeaturedcollections
        description: Featured Collections
        call: pexels-collections.getfeaturedcollections
        with:
          page: rest.page
          per_page: rest.per_page
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/collections/{id}
      name: collections-id
      description: REST surface for collections-id.
      operations:
      - method: GET
        name: getcollectionmedia
        description: Collection Media
        call: pexels-collections.getcollectionmedia
        with:
          id: rest.id
          type: rest.type
          sort: rest.sort
          page: rest.page
          per_page: rest.per_page
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: pexels-collections-mcp
    port: 9090
    transport: http
    description: MCP adapter for Pexels API — Collections. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: my-collections
      description: My Collections
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: pexels-collections.getmycollections
      with:
        page: tools.page
        per_page: tools.per_page
      outputParameters:
      - type: object
        mapping: $.
    - name: featured-collections
      description: Featured Collections
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: pexels-collections.getfeaturedcollections
      with:
        page: tools.page
        per_page: tools.per_page
      outputParameters:
      - type: object
        mapping: $.
    - name: collection-media
      description: Collection Media
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: pexels-collections.getcollectionmedia
      with:
        id: tools.id
        type: tools.type
        sort: tools.sort
        page: tools.page
        per_page: tools.per_page
      outputParameters:
      - type: object
        mapping: $.