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

# Replace an agent rate card

> Whole-card replacement, never a row merge. Editing a card spends nothing, refunds nothing and resets no window — it changes what the NEXT call costs. `denomination` and `currency` cannot be changed.



## OpenAPI

````yaml put /v1/agents/rate-cards/{rate_card_id}
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/agents/rate-cards/{rate_card_id}:
    put:
      tags:
        - Agents
      summary: Replace an agent rate card
      description: >-
        Whole-card replacement, never a row merge. Editing a card spends
        nothing, refunds nothing and resets no window — it changes what the NEXT
        call costs. `denomination` and `currency` cannot be changed.
      operationId: replaceAgentRateCard
      parameters:
        - schema:
            type: string
          required: true
          name: rate_card_id
          in: path
      requestBody:
        description: Replace rate card payload
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                description:
                  type:
                    - string
                    - 'null'
                  maxLength: 280
                fallback_per_usd:
                  type:
                    - string
                    - 'null'
                  pattern: ^\d+(\.\d+)?$
                rows:
                  type: array
                  items:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - llm
                          - item
                      provider:
                        type:
                          - string
                          - 'null'
                        minLength: 1
                        maxLength: 64
                      model:
                        type:
                          - string
                          - 'null'
                        minLength: 1
                        maxLength: 128
                      rate_per_m_input:
                        type:
                          - string
                          - 'null'
                        pattern: ^\d+(\.\d+)?$
                      rate_per_m_output:
                        type:
                          - string
                          - 'null'
                        pattern: ^\d+(\.\d+)?$
                      rate_unit:
                        type:
                          - string
                          - 'null'
                        pattern: ^\d+(\.\d+)?$
                      rate_per_m_cached_input:
                        type:
                          - string
                          - 'null'
                        pattern: ^\d+(\.\d+)?$
                      rate_per_m_cache_write:
                        type:
                          - string
                          - 'null'
                        pattern: ^\d+(\.\d+)?$
                      dimensions:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              pattern: ^[a-z0-9_.]{1,64}$
                            rate:
                              type: string
                              maxLength: 40
                              pattern: ^\d+(\.\d+)?$
                            per:
                              type: string
                              enum:
                                - 1m
                                - 1k
                                - unit
                          required:
                            - key
                            - rate
                            - per
                        maxItems: 20
                    required:
                      - kind
                  maxItems: 1000
              required:
                - name
                - rows
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  denomination:
                    type: string
                    enum:
                      - credits
                      - units
                      - currency
                  currency:
                    type:
                      - string
                      - 'null'
                  description:
                    type:
                      - string
                      - 'null'
                  fallback_per_usd:
                    type:
                      - string
                      - 'null'
                  rows:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        kind:
                          type: string
                          enum:
                            - llm
                            - item
                        provider:
                          type:
                            - string
                            - 'null'
                        model:
                          type:
                            - string
                            - 'null'
                        rate_per_m_input:
                          type:
                            - string
                            - 'null'
                        rate_per_m_output:
                          type:
                            - string
                            - 'null'
                        rate_unit:
                          type:
                            - string
                            - 'null'
                        rate_per_m_cached_input:
                          type:
                            - string
                            - 'null'
                        rate_per_m_cache_write:
                          type:
                            - string
                            - 'null'
                        dimensions:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                pattern: ^[a-z0-9_.]{1,64}$
                              rate:
                                type: string
                                maxLength: 40
                                pattern: ^\d+(\.\d+)?$
                              per:
                                type: string
                                enum:
                                  - 1m
                                  - 1k
                                  - unit
                            required:
                              - key
                              - rate
                              - per
                      required:
                        - id
                        - kind
                        - provider
                        - model
                        - rate_per_m_input
                        - rate_per_m_output
                        - rate_unit
                        - rate_per_m_cached_input
                        - rate_per_m_cache_write
                        - dimensions
                  attached_product_id:
                    type:
                      - string
                      - 'null'
                  using_policy_count:
                    type: number
                  using_policies:
                    type: array
                    items:
                      type: object
                      properties:
                        customer_id:
                          type: string
                        customer_name:
                          type: string
                        agent_slug:
                          type: string
                      required:
                        - customer_id
                        - customer_name
                        - agent_slug
                  using_plan_count:
                    type: number
                required:
                  - id
                  - name
                  - denomination
                  - currency
                  - description
                  - fallback_per_usd
                  - rows
                  - attached_product_id
                  - using_policy_count
                  - using_policies
                  - using_plan_count
        '404':
          description: Rate card not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````