Pexels · Capability

Pexels API — Photos

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

Run with Naftiko PexelsPhotos

What You Can Do

GET
Getcuratedphotos — Curated Photos
/v1/curated
GET
Getphoto — Get Photo
/v1/photos/{id}
GET
Searchphotos — Search Photos
/v1/search

MCP Tools

curated-photos

Curated Photos

read-only idempotent
get-photo

Get Photo

read-only idempotent
search-photos

Search Photos

read-only idempotent

Capability Spec

pexels-photos.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Pexels API — Photos
  description: 'Pexels API — Photos. 3 operations. Lead operation: Curated Photos. Self-contained Naftiko capability covering
    one Pexels business surface.'
  tags:
  - Pexels
  - Photos
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PEXELS_API_KEY: PEXELS_API_KEY
capability:
  consumes:
  - type: http
    namespace: pexels-photos
    baseUri: https://api.pexels.com/v1
    description: Pexels API — Photos business capability. Self-contained, no shared references.
    resources:
    - name: curated
      path: /curated
      operations:
      - name: getcuratedphotos
        method: GET
        description: Curated Photos
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: page
          in: query
          type: integer
        - name: per_page
          in: query
          type: integer
    - name: photos-id
      path: /photos/{id}
      operations:
      - name: getphoto
        method: GET
        description: Get Photo
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
    - name: search
      path: /search
      operations:
      - name: searchphotos
        method: GET
        description: Search Photos
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: query
          in: query
          type: string
          description: Search keyword such as "Ocean" or "Tigers".
          required: true
        - name: orientation
          in: query
          type: string
        - name: size
          in: query
          type: string
        - name: color
          in: query
          type: string
        - name: locale
          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-photos-rest
    port: 8080
    description: REST adapter for Pexels API — Photos. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/curated
      name: curated
      description: REST surface for curated.
      operations:
      - method: GET
        name: getcuratedphotos
        description: Curated Photos
        call: pexels-photos.getcuratedphotos
        with:
          page: rest.page
          per_page: rest.per_page
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/photos/{id}
      name: photos-id
      description: REST surface for photos-id.
      operations:
      - method: GET
        name: getphoto
        description: Get Photo
        call: pexels-photos.getphoto
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/search
      name: search
      description: REST surface for search.
      operations:
      - method: GET
        name: searchphotos
        description: Search Photos
        call: pexels-photos.searchphotos
        with:
          query: rest.query
          orientation: rest.orientation
          size: rest.size
          color: rest.color
          locale: rest.locale
          page: rest.page
          per_page: rest.per_page
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: pexels-photos-mcp
    port: 9090
    transport: http
    description: MCP adapter for Pexels API — Photos. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: curated-photos
      description: Curated Photos
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: pexels-photos.getcuratedphotos
      with:
        page: tools.page
        per_page: tools.per_page
      outputParameters:
      - type: object
        mapping: $.
    - name: get-photo
      description: Get Photo
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: pexels-photos.getphoto
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: search-photos
      description: Search Photos
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: pexels-photos.searchphotos
      with:
        query: tools.query
        orientation: tools.orientation
        size: tools.size
        color: tools.color
        locale: tools.locale
        page: tools.page
        per_page: tools.per_page
      outputParameters:
      - type: object
        mapping: $.