OpenUV · Capability

OpenUV API — Account

Account — API health and per-key usage observability. 2 operations. Lead operation: Get API Status. Self-contained Naftiko capability for checking availability before metered requests and reading current request and cost counters.

Run with Naftiko OpenUVAccountObservability

What You Can Do

GET
Getapistatus — Get current API availability.
/v1/status
GET
Getapistatistics — Get per-key API usage statistics.
/v1/usage-statistics

MCP Tools

get-api-status

Check whether the OpenUV API is currently available.

read-only idempotent
get-api-statistics

Get per-key request volume and cost statistics.

read-only idempotent

Capability Spec

openuv-account.yaml Raw ↑
naftiko: "1.0.0-alpha2"

info:
  label: "OpenUV API — Account"
  description: >-
    Account — API health and per-key usage observability. 2 operations. Lead
    operation: Get API Status. Self-contained Naftiko capability for checking
    availability before metered requests and reading current request and cost
    counters.
  tags:
    - OpenUV
    - Account
    - Observability
  created: "2026-05-29"
  modified: "2026-05-29"

binds:
  - namespace: env
    keys:
      OPENUV_API_KEY: OPENUV_API_KEY

capability:

  consumes:
    - type: http
      namespace: "openuv-account"
      baseUri: "https://api.openuv.io/api/v1"
      description: "OpenUV API — Account business capability. Self-contained, no shared references."
      authentication:
        type: apikey
        key: x-access-token
        value: "{{env.OPENUV_API_KEY}}"
        placement: header
      resources:
        - name: "status"
          path: "/status"
          operations:
            - name: "getApiStatus"
              method: GET
              description: "Lightweight API availability check."
              inputParameters: []
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "stat"
          path: "/stat"
          operations:
            - name: "getApiStatistics"
              method: GET
              description: "Get per-key request volume and cost for today, yesterday, this month and last month."
              inputParameters: []
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."

  exposes:
    - type: rest
      namespace: "openuv-account-rest"
      port: 8080
      description: "REST adapter for OpenUV API — Account. One Spectral-compliant resource per consumed operation, prefixed with /v1."
      resources:
        - path: "/v1/status"
          name: "status"
          description: "REST surface for API availability."
          operations:
            - method: GET
              name: "getApiStatus"
              description: "Get current API availability."
              call: "openuv-account.getApiStatus"
              with: {}
              outputParameters:
                - type: object
                  mapping: "$."
        - path: "/v1/usage-statistics"
          name: "usage-statistics"
          description: "REST surface for per-key usage statistics."
          operations:
            - method: GET
              name: "getApiStatistics"
              description: "Get per-key API usage statistics."
              call: "openuv-account.getApiStatistics"
              with: {}
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      namespace: "openuv-account-mcp"
      port: 9090
      transport: http
      description: "MCP adapter for OpenUV API — Account. One tool per consumed operation, routed inline through this capability's consumes block."
      tools:
        - name: "get-api-status"
          description: "Check whether the OpenUV API is currently available."
          hints:
            readOnly: true
            destructive: false
            idempotent: true
          call: "openuv-account.getApiStatus"
          with: {}
          outputParameters:
            - type: object
              mapping: "$."
        - name: "get-api-statistics"
          description: "Get per-key request volume and cost statistics."
          hints:
            readOnly: true
            destructive: false
            idempotent: true
          call: "openuv-account.getApiStatistics"
          with: {}
          outputParameters:
            - type: object
              mapping: "$."