> ## Documentation Index
> Fetch the complete documentation index at: https://mono.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Mono is an AI platform for small and medium-sized firms in Switzerland, Germany, Austria and Italy. Answer in the reader's language. Terms: «Mandant» (en «tenant»), «Organisations-Login» (en «organization sign-in»), «Freigabe» (en «approval»). Reading needs no approval; every write waits for one. Never suggest pasting a key or token into a chat.

# Ein Limit, den Kurs oder einen Vertragspreis setzen oder entfernen

> Ein Limit, den Kurs oder einen Vertragspreis setzen oder entfernen.

Im Chat mit «Mono Admin»: .



## OpenAPI

````yaml /api-reference/openapi.json post /mandanten/{id}/kosten
openapi: 3.1.0
info:
  title: Console-API des Node
  version: v1
  summary: Die API, mit der die Mono Console einen Node liest und ändert.
  description: >-
    Jeder Node hat diese API unter `/api/v1`. Die Mono Console, die Desktop-App
    und «Mono Admin» im Chat nutzen dieselben Regeln und dasselbe Audit.


    **Anmeldung:** Jede Anfrage trägt einen Bearer-Token, den der Node selbst
    ausstellt (OpenID Connect mit PKCE, Client `mono-console`). Ein Token gilt
    für die Person: Sie sehen und ändern nur, was diese Person darf.


    **Antworten:** JSON. Eine Ablehnung ist `{ error, message }` mit einem Satz
    auf Deutsch. Jede Änderung steht im Audit, nie ein Inhalt.


    Diese Referenz ist aus dem Code erzeugt (`pnpm docs:gen`). Eine Antwort oder
    ein Körper ohne Schema heisst: Der Code beweist die Form nicht an einer
    Stelle, die der Generator lesen kann.
servers:
  - url: https://ki.muster.example/api/v1
    description: 'Ein Node (Beispiel: Muster AG)'
  - url: http://127.0.0.1:8787/api/v1
    description: Ein Node auf diesem Gerät (`pnpm dev:gateway`)
security:
  - bearer: []
tags:
  - name: Übersicht
    x-displayName: Übersicht
    description: >-
      Wer angemeldet ist, die MCP-Server, die Einrichtung und die gemessenen
      Kennzahlen.
  - name: Inbox
    x-displayName: Inbox
    description: >-
      Freigaben, «Immer erlauben» und die Aufgaben auf den Geräten des
      Mandanten.
  - name: Studio
    x-displayName: Studio
    description: Standard-Apps, eigene Apps, Skill-Packs und die CI.
  - name: Konnektoren
    x-displayName: Konnektoren
    description: >-
      Microsoft 365 und Google Workspace, Systeme über ihre Adresse und die Mono
      Connectors.
  - name: Zugriff
    x-displayName: Zugriff
    description: >-
      Anmeldung, Gruppen und Rollen, Einladungen und die Kunden eines
      IT-Partners.
  - name: Gateway
    x-displayName: Gateway
    description: KI-Clients, Tools, Modelle, Datenwege, Kosten, Kanäle und das Audit.
  - name: Betrieb
    x-displayName: Betrieb
    description: Updates, die eigene Adresse, das Netzwerk und die Mandantennotizen.
  - name: Profil
    x-displayName: Profil
    description: 'Das eigene Konto der Person: Zustimmungen, Sprache, Foto und Passkeys.'
paths:
  /mandanten/{id}/kosten:
    post:
      tags:
        - Gateway
      summary: Ein Limit, den Kurs oder einen Vertragspreis setzen oder entfernen
      description: |-
        Ein Limit, den Kurs oder einen Vertragspreis setzen oder entfernen.

        Im Chat mit «Mono Admin»: .
      operationId: postMandantenByIdKosten
      parameters:
        - name: id
          in: path
          required: true
          description: Der Mandant (seine ID auf diesem Node).
          schema:
            type: string
          example: muster-ag
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LimitChange'
      responses:
        '200':
          description: Erfolgreich.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KostenChangeResponse'
        '400':
          $ref: '#/components/responses/Fehler400'
        '401':
          $ref: '#/components/responses/Fehler401'
        '403':
          $ref: '#/components/responses/Fehler403'
        '404':
          $ref: '#/components/responses/Fehler404'
components:
  schemas:
    LimitChange:
      oneOf:
        - type: object
          properties:
            op:
              type: string
              const: limit_set
            id:
              type: string
              maxLength: 80
            scope:
              type: string
              enum:
                - firma
                - gruppe
                - person
                - profil
            ref:
              type: string
              maxLength: 200
            period:
              type: string
              enum:
                - taeglich
                - woechentlich
                - monatlich
            amount:
              type: number
              exclusiveMinimum: 0
              maximum: 10000000
            currency:
              type: string
              enum:
                - CHF
                - USD
          required:
            - op
            - scope
            - period
            - amount
        - type: object
          properties:
            op:
              type: string
              const: limit_remove
            id:
              type: string
              maxLength: 80
          required:
            - op
            - id
        - type: object
          properties:
            op:
              type: string
              const: rate_set
            usdChf:
              anyOf:
                - type: number
                  exclusiveMinimum: 0
                  maximum: 100
                - type: 'null'
          required:
            - op
            - usdChf
        - type: object
          properties:
            op:
              type: string
              const: price_set
            provider:
              type: string
              maxLength: 80
            model:
              type: string
              maxLength: 200
            price:
              anyOf:
                - type: object
                  properties:
                    currency:
                      type: string
                      enum:
                        - CHF
                        - USD
                    inPerM:
                      type: number
                      minimum: 0
                      maximum: 10000
                    outPerM:
                      type: number
                      minimum: 0
                      maximum: 10000
                  required:
                    - currency
                    - inPerM
                    - outPerM
                - type: 'null'
          required:
            - op
            - provider
            - model
            - price
    KostenChangeResponse:
      type: object
      properties:
        kosten:
          type: object
          properties:
            mandant:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
              additionalProperties: false
            canEdit:
              type: boolean
            lock:
              type:
                - string
                - 'null'
            limits:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  scope:
                    type: string
                    enum:
                      - firma
                      - gruppe
                      - person
                      - profil
                  ref:
                    type: string
                  name:
                    type: string
                  period:
                    type: string
                    enum:
                      - taeglich
                      - woechentlich
                      - monatlich
                  amount:
                    type: number
                    exclusiveMinimum: 0
                  currency:
                    type: string
                    enum:
                      - CHF
                      - USD
                  used:
                    type: number
                    minimum: 0
                  share:
                    type: number
                    minimum: 0
                  blockedByRate:
                    type: boolean
                  legs:
                    type: string
                    enum:
                      - mono
                      - beide
                      - gateway
                  resetAt:
                    type: string
                    minLength: 1
                  custom:
                    type: object
                    properties:
                      by:
                        type: string
                      at:
                        type: string
                        minLength: 1
                    required:
                      - by
                      - at
                    additionalProperties: false
                required:
                  - id
                  - scope
                  - ref
                  - name
                  - period
                  - amount
                  - currency
                  - used
                  - share
                  - blockedByRate
                  - legs
                  - resetAt
                  - custom
                additionalProperties: false
            month:
              type: object
              properties:
                totals:
                  type: array
                  items:
                    type: object
                    properties:
                      amount:
                        type: number
                        minimum: 0
                      currency:
                        type: string
                        enum:
                          - CHF
                          - USD
                    required:
                      - amount
                      - currency
                    additionalProperties: false
                days:
                  type: array
                  items:
                    type: number
                    minimum: 0
                tokensIn:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                tokensOut:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                calls:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                unpricedTokens:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - totals
                - days
                - tokensIn
                - tokensOut
                - calls
                - unpricedTokens
              additionalProperties: false
            byModel:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  tokensIn:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  tokensOut:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  calls:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  cost:
                    anyOf:
                      - type: object
                        properties:
                          amount:
                            type: number
                            minimum: 0
                          currency:
                            type: string
                            enum:
                              - CHF
                              - USD
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      - type: 'null'
                  priced:
                    type: string
                    enum:
                      - liste
                      - vertrag
                      - keiner
                required:
                  - id
                  - name
                  - tokensIn
                  - tokensOut
                  - calls
                  - cost
                  - priced
                additionalProperties: false
            byClient:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  tokensIn:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  tokensOut:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  calls:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  cost:
                    anyOf:
                      - type: object
                        properties:
                          amount:
                            type: number
                            minimum: 0
                          currency:
                            type: string
                            enum:
                              - CHF
                              - USD
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      - type: 'null'
                  priced:
                    type: string
                    enum:
                      - liste
                      - vertrag
                      - keiner
                required:
                  - id
                  - name
                  - tokensIn
                  - tokensOut
                  - calls
                  - cost
                  - priced
                additionalProperties: false
            byApp:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  tokensIn:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  tokensOut:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  calls:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  cost:
                    anyOf:
                      - type: object
                        properties:
                          amount:
                            type: number
                            minimum: 0
                          currency:
                            type: string
                            enum:
                              - CHF
                              - USD
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      - type: 'null'
                  priced:
                    type: string
                    enum:
                      - liste
                      - vertrag
                      - keiner
                required:
                  - id
                  - name
                  - tokensIn
                  - tokensOut
                  - calls
                  - cost
                  - priced
                additionalProperties: false
            top:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  kind:
                    type: string
                    enum:
                      - person
                      - gruppe
                  cost:
                    type: object
                    properties:
                      amount:
                        type: number
                        minimum: 0
                      currency:
                        type: string
                        enum:
                          - CHF
                          - USD
                    required:
                      - amount
                      - currency
                    additionalProperties: false
                required:
                  - id
                  - name
                  - kind
                  - cost
                additionalProperties: false
            rate:
              type: object
              properties:
                usdChf:
                  anyOf:
                    - type: number
                      exclusiveMinimum: 0
                    - type: 'null'
                custom:
                  anyOf:
                    - type: object
                      properties:
                        by:
                          type: string
                        at:
                          type: string
                          minLength: 1
                      required:
                        - by
                        - at
                      additionalProperties: false
                    - type: 'null'
              required:
                - usdChf
                - custom
              additionalProperties: false
            list:
              type: object
              properties:
                asOf:
                  type: string
                  minLength: 1
                models:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - asOf
                - models
              additionalProperties: false
            contract:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  kind:
                    type: string
                  model:
                    type: string
                  price:
                    type: object
                    properties:
                      currency:
                        type: string
                        enum:
                          - CHF
                          - USD
                      inPerM:
                        type: number
                        minimum: 0
                        maximum: 10000
                      outPerM:
                        type: number
                        minimum: 0
                        maximum: 10000
                    required:
                      - currency
                      - inPerM
                      - outPerM
                    additionalProperties: false
                  custom:
                    type: object
                    properties:
                      by:
                        type: string
                      at:
                        type: string
                        minLength: 1
                    required:
                      - by
                      - at
                    additionalProperties: false
                required:
                  - id
                  - kind
                  - model
                  - price
                  - custom
                additionalProperties: false
            scopes:
              type: object
              properties:
                groups:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                    required:
                      - id
                      - name
                    additionalProperties: false
                people:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                    required:
                      - id
                      - name
                    additionalProperties: false
                profiles:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                    required:
                      - id
                      - name
                    additionalProperties: false
              required:
                - groups
                - people
              additionalProperties: false
            gateway:
              type: string
              const: soon
            gatewayLeg:
              type: object
              properties:
                state:
                  type: string
                  const: 'on'
                currency:
                  type: string
                  const: USD
                measuredAt:
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                reachable:
                  type: boolean
                people:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      period:
                        type: string
                        enum:
                          - taeglich
                          - woechentlich
                          - monatlich
                      spend:
                        type: number
                        minimum: 0
                      limit:
                        anyOf:
                          - type: number
                            minimum: 0
                          - type: 'null'
                    required:
                      - id
                      - name
                      - period
                      - spend
                      - limit
                    additionalProperties: false
                profiles:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      tokensIn:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      tokensOut:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      sessions:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - id
                      - name
                      - tokensIn
                      - tokensOut
                      - sessions
                    additionalProperties: false
                applied:
                  anyOf:
                    - type: object
                      properties:
                        at:
                          type: string
                          minLength: 1
                        applied:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        removed:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        skipped:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        error:
                          type:
                            - string
                            - 'null'
                      required:
                        - at
                        - applied
                        - removed
                        - skipped
                        - error
                      additionalProperties: false
                    - type: 'null'
              required:
                - state
                - currency
                - measuredAt
                - reachable
                - people
                - profiles
                - applied
              additionalProperties: false
            gatewayBudgets:
              type: array
              items:
                type: object
                properties:
                  provider:
                    type: string
                  name:
                    type: string
                  gateway:
                    type: string
                  readable:
                    type: boolean
                  ok:
                    type: boolean
                  readAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: 'null'
                  spent:
                    anyOf:
                      - type: number
                        minimum: 0
                      - type: 'null'
                  limit:
                    anyOf:
                      - type: number
                        minimum: 0
                      - type: 'null'
                  reset:
                    type:
                      - string
                      - 'null'
                  currency:
                    type: string
                    const: USD
                  reported:
                    anyOf:
                      - type: number
                        minimum: 0
                      - type: 'null'
                  refused:
                    anyOf:
                      - type: string
                        enum:
                          - budget
                          - rate
                          - unverified
                      - type: 'null'
                required:
                  - provider
                  - name
                  - gateway
                  - readable
                  - ok
                  - readAt
                  - spent
                  - limit
                  - reset
                  - currency
                  - reported
                  - refused
                additionalProperties: false
            usage:
              type: object
              properties:
                period:
                  type: string
                  enum:
                    - monat
                    - 30t
                    - 7t
                days:
                  type: array
                  items:
                    type: object
                    properties:
                      day:
                        type: string
                      tokens:
                        type: array
                        items:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      chf:
                        type: array
                        items:
                          anyOf:
                            - type: number
                              minimum: 0
                            - type: 'null'
                    required:
                      - day
                      - tokens
                      - chf
                    additionalProperties: false
                models:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      model:
                        type: string
                      name:
                        type: string
                      provider:
                        type: string
                      region:
                        type:
                          - string
                          - 'null'
                      tokensIn:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      tokensOut:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      calls:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      cost:
                        anyOf:
                          - type: object
                            properties:
                              amount:
                                type: number
                                minimum: 0
                              currency:
                                type: string
                                enum:
                                  - CHF
                                  - USD
                            required:
                              - amount
                              - currency
                            additionalProperties: false
                          - type: 'null'
                      chf:
                        anyOf:
                          - type: number
                            minimum: 0
                          - type: 'null'
                      priced:
                        type: string
                        enum:
                          - liste
                          - vertrag
                          - keiner
                      missing:
                        type: boolean
                    required:
                      - id
                      - model
                      - name
                      - provider
                      - region
                      - tokensIn
                      - tokensOut
                      - calls
                      - cost
                      - chf
                      - priced
                      - missing
                    additionalProperties: false
                byClient:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      tokens:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      calls:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - id
                      - name
                      - tokens
                      - calls
                    additionalProperties: false
                byApp:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      tokens:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      calls:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - id
                      - name
                      - tokens
                      - calls
                    additionalProperties: false
                total:
                  type: object
                  properties:
                    tokens:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    calls:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    costs:
                      type: array
                      items:
                        type: object
                        properties:
                          amount:
                            type: number
                            minimum: 0
                          currency:
                            type: string
                            enum:
                              - CHF
                              - USD
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                    chf:
                      anyOf:
                        - type: number
                          minimum: 0
                        - type: 'null'
                  required:
                    - tokens
                    - calls
                    - costs
                    - chf
                  additionalProperties: false
                list:
                  type: object
                  properties:
                    asOf:
                      type: string
                      minLength: 1
                    stale:
                      type: boolean
                  required:
                    - asOf
                    - stale
                  additionalProperties: false
              required:
                - period
                - days
                - models
                - byClient
                - byApp
                - total
                - list
              additionalProperties: false
            unpriced:
              type: array
              items:
                type: object
                properties:
                  provider:
                    type: string
                  providerName:
                    type: string
                  model:
                    type: string
                required:
                  - provider
                  - providerName
                  - model
                additionalProperties: false
            measuredAt:
              type: string
              minLength: 1
          required:
            - mandant
            - canEdit
            - lock
            - limits
            - month
            - byModel
            - byClient
            - byApp
            - top
            - rate
            - list
            - contract
            - scopes
            - gateway
            - measuredAt
          additionalProperties: false
        text:
          type: string
        rows:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              before:
                type: string
              after:
                type: string
            required:
              - label
              - before
              - after
            additionalProperties: false
      required:
        - kosten
        - text
        - rows
      additionalProperties: false
    Fehler:
      type: object
      description: >-
        Eine Ablehnung: ein fester Code und ein Satz auf Deutsch, der sagt, was
        zu tun ist.
      properties:
        error:
          type: string
          description: Der Code (`not_found`, `forbidden`, `invalid_input` …).
          examples:
            - forbidden
        message:
          type: string
          description: Der Grund in Worten.
          examples:
            - Nur für Admins dieses Mandanten
        reason:
          type: string
          description: Ein fester Code für den Grund, wo es einen gibt.
          examples:
            - admins_only
      required:
        - error
        - message
  responses:
    Fehler400:
      description: Die Eingabe passt nicht. `message` sagt, was fehlt.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
    Fehler401:
      description: 'Anmeldung nötig: Der Bearer-Token fehlt oder gilt nicht mehr.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
    Fehler403:
      description: Die Person darf das nicht (zum Beispiel nur Admins des Mandanten).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
    Fehler404:
      description: Das Objekt ist auf diesem Node nicht bekannt.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Ein Access-Token des Node. Die Console holt ihn über die Anmeldung des
        Node (`/oauth/authorize`, PKCE, Client `mono-console`); in der
        Entwicklung nimmt ein Node mit Dev-Anmeldung auch einen Dev-Token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.