Memesio · Capability

Memesio API Contracts — billing

Memesio API Contracts — billing. 2 operations. Lead operation: Complete AI Job and Log Metered AI Cost. Self-contained Naftiko capability covering one Memesio business surface.

Run with Naftiko Memesiobilling

What You Can Do

POST
Post — Complete AI Job and Log Metered AI Cost
/v1/api/ai/jobs/{jobid}/complete
GET
Get — Get Billing Usage Snapshot
/v1/api/billing/usage

MCP Tools

complete-ai-job-and-log

Complete AI Job and Log Metered AI Cost

get-billing-usage-snapshot

Get Billing Usage Snapshot

read-only idempotent

Capability Spec

memesio-billing.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Memesio API Contracts — billing
  description: 'Memesio API Contracts — billing. 2 operations. Lead operation: Complete AI Job and Log Metered AI Cost. Self-contained
    Naftiko capability covering one Memesio business surface.'
  tags:
  - Memesio
  - billing
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MEMESIO_API_KEY: MEMESIO_API_KEY
capability:
  consumes:
  - type: http
    namespace: memesio-billing
    baseUri: ''
    description: Memesio API Contracts — billing business capability. Self-contained, no shared references.
    resources:
    - name: api-ai-jobs-jobId-complete
      path: /api/ai/jobs/{jobId}/complete
      operations:
      - name: post
        method: POST
        description: Complete AI Job and Log Metered AI Cost
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: jobId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-billing-usage
      path: /api/billing/usage
      operations:
      - name: get
        method: GET
        description: Get Billing Usage Snapshot
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspaceId
          in: query
          type: string
        - name: windowDays
          in: query
          type: integer
    authentication:
      type: apikey
      key: x-developer-api-key
      value: '{{env.MEMESIO_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: memesio-billing-rest
    port: 8080
    description: REST adapter for Memesio API Contracts — billing. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/ai/jobs/{jobid}/complete
      name: api-ai-jobs-jobid-complete
      description: REST surface for api-ai-jobs-jobId-complete.
      operations:
      - method: POST
        name: post
        description: Complete AI Job and Log Metered AI Cost
        call: memesio-billing.post
        with:
          jobId: rest.jobId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/billing/usage
      name: api-billing-usage
      description: REST surface for api-billing-usage.
      operations:
      - method: GET
        name: get
        description: Get Billing Usage Snapshot
        call: memesio-billing.get
        with:
          workspaceId: rest.workspaceId
          windowDays: rest.windowDays
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: memesio-billing-mcp
    port: 9090
    transport: http
    description: MCP adapter for Memesio API Contracts — billing. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: complete-ai-job-and-log
      description: Complete AI Job and Log Metered AI Cost
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: memesio-billing.post
      with:
        jobId: tools.jobId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-billing-usage-snapshot
      description: Get Billing Usage Snapshot
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: memesio-billing.get
      with:
        workspaceId: tools.workspaceId
        windowDays: tools.windowDays
      outputParameters:
      - type: object
        mapping: $.