Naftiko · Capability

Hugging Face Model Inference Governed Capability

A governed capability over Hugging Face Inference API — every inference call passes through Naftiko governance with usage and audit logged.

Run with Naftiko NaftikoHugging FaceInference

What You Can Do

POST
Run governed inference
/infer/{{model_id}}

MCP Tools

run-governed-inference

Capability Spec

hugging-face-model-inference-governed-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  title: Hugging Face Model Inference Governed Capability
  description: A governed capability over Hugging Face Inference API — every inference call passes through Naftiko governance with usage and audit logged.
  tags: [Naftiko, Hugging Face, Inference]
  created: '2026-05-01'
  modified: '2026-05-04'
binds:
- namespace: huggingface-env
  keys: {HF_TOKEN: HF_TOKEN}
capability:
  consumes:
  - namespace: huggingface
    type: http
    baseUri: https://api-inference.huggingface.co
    authentication: {type: bearer, token: '{{HF_TOKEN}}'}
    resources:
    - name: model-inference
      path: '/models/{{model_id}}'
      operations:
      - {name: run-inference, method: POST, inputParameters: [{name: model_id, in: path}]}
  exposes:
  - type: rest
    address: 0.0.0.0
    port: 8080
    namespace: hugging-face-model-inference-governed-capability-rest
    description: Governed Hugging Face inference surface.
    resources:
    - {name: infer, path: '/infer/{{model_id}}', operations: [{method: POST, name: run-governed-inference, inputParameters: [{name: model_id, in: path, type: string}], call: huggingface.run-inference}]}
  - type: mcp
    address: 0.0.0.0
    port: 3010
    namespace: hugging-face-model-inference-governed-capability-mcp
    description: MCP for governed HF inference.
    tools:
    - name: run-governed-inference
      inputParameters: [{name: model_id, type: string, required: true}]
      call: huggingface.run-inference
  - type: skill
    address: 0.0.0.0
    port: 3011
    namespace: hugging-face-model-inference-governed-capability-skills
    description: Skill for governed HF inference.
    skills:
    - name: hugging-face-model-inference-governed-capability
      description: Governed Hugging Face inference.
      location: file:///opt/naftiko/skills/hugging-face-model-inference-governed-capability
      allowed-tools: run-governed-inference
      tools:
      - {name: run-governed-inference, from: {sourceNamespace: hugging-face-model-inference-governed-capability-mcp, action: run-governed-inference}}