SnapAPI · Capability

SnapAPI Screenshot

Capture a screenshot of any URL via headless Chromium. Returns PNG or JPEG binary image. Self-contained Naftiko capability covering the SnapAPI screenshot business surface.

Run with Naftiko SnapAPIScreenshotHeadless Chromium

What You Can Do

POST
Takescreenshot — Capture a website screenshot
/v1/api/screenshot
GET
Getusage — Check API usage and limit
/v1/api/usage

MCP Tools

take-screenshot

Capture a website screenshot (PNG or JPEG)

idempotent
get-usage

Check current monthly API usage

read-only idempotent

Capability Spec

screenshot.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: SnapAPI Screenshot
  description: Capture a screenshot of any URL via headless Chromium. Returns PNG or JPEG binary image. Self-contained Naftiko capability covering the SnapAPI screenshot business surface.
  tags:
    - SnapAPI
    - Screenshot
    - Headless Chromium
  created: '2026-05-27'
  modified: '2026-05-27'
binds:
  - namespace: env
    keys:
      SNAPAPI_API_KEY: SNAPAPI_API_KEY
capability:
  consumes:
    - type: http
      namespace: snapapi-screenshot
      baseUri: https://snap.michaelcli.com
      description: SnapAPI screenshot business capability. Self-contained, no shared references.
      resources:
        - name: screenshot
          path: /api/screenshot
          operations:
            - name: takeScreenshot
              method: POST
              description: Capture a website screenshot (PNG or JPEG)
              outputRawFormat: binary
              outputParameters:
                - name: image
                  type: binary
                  value: $.
              inputParameters:
                - name: body
                  in: body
                  type: object
                  description: Screenshot request body with URL and rendering options (JSON).
                  required: true
        - name: usage
          path: /api/usage
          operations:
            - name: getUsage
              method: GET
              description: Check current monthly usage and limit
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
              inputParameters: []
      authentication:
        type: bearer
        token: '{{env.SNAPAPI_API_KEY}}'
        header: X-API-Key
  exposes:
    - type: rest
      namespace: snapapi-screenshot-rest
      port: 8080
      description: REST adapter for SnapAPI Screenshot. One Spectral-compliant resource per consumed operation, prefixed with /v1.
      resources:
        - path: /v1/api/screenshot
          name: screenshot
          description: REST surface for the screenshot endpoint.
          operations:
            - method: POST
              name: takeScreenshot
              description: Capture a website screenshot
              call: snapapi-screenshot.takeScreenshot
              with:
                body: rest.body
              outputParameters:
                - type: binary
                  mapping: $.
        - path: /v1/api/usage
          name: usage
          description: REST surface for the usage endpoint.
          operations:
            - method: GET
              name: getUsage
              description: Check API usage and limit
              call: snapapi-screenshot.getUsage
              outputParameters:
                - type: object
                  mapping: $.
    - type: mcp
      namespace: snapapi-screenshot-mcp
      port: 9090
      transport: http
      description: MCP adapter for SnapAPI Screenshot. One tool per consumed operation, routed inline through this capability's consumes block.
      tools:
        - name: take-screenshot
          description: Capture a website screenshot (PNG or JPEG)
          hints:
            readOnly: false
            destructive: false
            idempotent: true
          call: snapapi-screenshot.takeScreenshot
          with:
            body: tools.body
          outputParameters:
            - type: binary
              mapping: $.
        - name: get-usage
          description: Check current monthly API usage
          hints:
            readOnly: true
            destructive: false
            idempotent: true
          call: snapapi-screenshot.getUsage
          outputParameters:
            - type: object
              mapping: $.