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

> ## Agent Instructions
> These docs moved from docs.flintai.dev to docs.switchagents.ai. Use docs.switchagents.ai for every link and request.
> To search these docs from an AI tool, connect the MCP server at https://docs.switchagents.ai/mcp. The page index is at https://docs.switchagents.ai/llms.txt.

# Create or update a model pricing override

> Upsert a custom per-token price override for a model fingerprint. If all prices equal the model's list prices, the override is removed and the model reverts to platform pricing.



## OpenAPI

````yaml /switch-trust/api-reference/openapi.json put /cost/model-pricing/tenants/{tenant_id}/workspaces/{workspace_id}/{model_fingerprint}
openapi: 3.0.3
info:
  contact: {}
  description: Switch Trust API
  license:
    name: Switch AI
    url: https://www.sandboxaq.com/legal/eula
  title: Switch Trust API
  version: 1.0.0
servers:
  - description: Flint AI Platform (per-tenant instance)
    url: https://{instance}.flintai.dev/api/v1
    variables:
      instance:
        default: your-instance
        description: Your Flint AI instance subdomain
security: []
paths:
  /cost/model-pricing/tenants/{tenant_id}/workspaces/{workspace_id}/{model_fingerprint}:
    put:
      tags:
        - cost
      summary: Create or update a model pricing override
      description: >-
        Upsert a custom per-token price override for a model fingerprint. If all
        prices equal the model's list prices, the override is removed and the
        model reverts to platform pricing.
      operationId: UpsertModelPricing
      parameters:
        - description: Tenant ID
          in: path
          name: tenant_id
          required: true
          schema:
            type: string
        - description: Workspace ID
          in: path
          name: workspace_id
          required: true
          schema:
            type: string
        - description: Model fingerprint
          in: path
          name: model_fingerprint
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/cost.UpsertModelPricingRequest'
        description: Pricing override
        required: true
        x-originalParamName: body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cost.ModelPricing'
          description: Saved model pricing
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    cost.UpsertModelPricingRequest:
      properties:
        cache_read_cost_per_1m_tok:
          type: number
        cache_write_cost_per_1m_tok:
          type: number
        input_cost_per_1m_tok:
          type: number
        output_cost_per_1m_tok:
          type: number
        price_as_of:
          type: string
      type: object
    cost.ModelPricing:
      properties:
        cache_read_cost_per_1m_tok:
          type: number
        cache_write_cost_per_1m_tok:
          type: number
        default_cache_read_cost_per_1m_tok:
          type: number
        default_cache_write_cost_per_1m_tok:
          type: number
        default_input_cost_per_1m_tok:
          type: number
        default_output_cost_per_1m_tok:
          type: number
        input_cost_per_1m_tok:
          type: number
        model_fingerprint:
          type: string
        model_name:
          type: string
        model_supplier:
          type: string
        output_cost_per_1m_tok:
          type: number
        price_as_of:
          type: string
        source:
          description: '"platform" or "custom"'
          type: string
      type: object
    common.RequestError:
      description: Error responses returned by the API
      properties:
        code:
          example: 400
          type: integer
        message:
          example: Invalid request
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    BearerAuth:
      description: Use this header with a Bearer token to authenticate requests.
      in: header
      name: Authorization
      type: apiKey

````