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

# POST /admin/api/price-rates/batch



## OpenAPI

````yaml /generated/openapi.json post /admin/api/price-rates/batch
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.2.1
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /admin/api/price-rates/batch:
    post:
      tags:
        - Management
      summary: POST /admin/api/price-rates/batch
      parameters:
        - description: Administrative scope selected by the caller.
          in: header
          name: x-gproxy-admin-scope
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/Input_BatchItem22'
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  anyOf:
                    - $ref: '#/components/schemas/Output_PriceRateDto'
                    - type: 'null'
                type: array
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Input_BatchItem22:
      description: |-
        One step of a batch write. Every item of one batch lands in a single
        revision commit: either all of them are durable or none is.
      oneOf:
        - additionalProperties: false
          properties:
            create:
              $ref: '#/components/schemas/Input_PriceRateWrite'
          required:
            - create
          type: object
        - additionalProperties: false
          properties:
            update:
              $ref: '#/components/schemas/Input_BatchPatch22'
          required:
            - update
          type: object
        - additionalProperties: false
          properties:
            delete:
              type: string
          required:
            - delete
          type: object
    Output_PriceRateDto:
      description: |-
        One billable quantity's price. `value` buys `unit_quantity` units, so a
        per-million token price is `unit_quantity = 1000000`.
      properties:
        conditions:
          description: >-
            None is the fallback rate; otherwise a nonempty object of
            dimensions.
        id:
          type: string
        metric:
          description: A `gproxy_store::entity::pricing::metric` key, or a custom one.
          type: string
        priceRuleId:
          type: string
        priority:
          format: int32
          type: integer
        unit:
          description: '`token`, `count`, `second` or `character`.'
          type: string
        unitQuantity:
          type: string
        value:
          type: string
      required:
        - id
        - priceRuleId
        - metric
        - unit
        - unitQuantity
        - value
        - conditions
        - priority
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Input_PriceRateWrite:
      properties:
        conditions:
          default: null
        id:
          default: null
          type:
            - string
            - 'null'
        metric:
          type: string
        priceRuleId:
          type: string
        priority:
          default: null
          format: int32
          type:
            - integer
            - 'null'
        unit:
          type: string
        unitQuantity:
          type: string
        value:
          type: string
      required:
        - priceRuleId
        - metric
        - unit
        - unitQuantity
        - value
      type: object
    Input_BatchPatch22:
      properties:
        id:
          type: string
        patch:
          $ref: '#/components/schemas/Input_PriceRatePatch'
      required:
        - id
        - patch
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    Input_PriceRatePatch:
      properties:
        conditions:
          default: null
        metric:
          default: null
          type:
            - string
            - 'null'
        priority:
          default: null
          format: int32
          type:
            - integer
            - 'null'
        unit:
          default: null
          type:
            - string
            - 'null'
        unitQuantity:
          default: null
          type:
            - string
            - 'null'
        value:
          default: null
          type:
            - string
            - 'null'
      type: object
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey
    consoleSession:
      in: cookie
      name: gproxy_session
      type: apiKey

````

## Related topics

- [POST /admin/api/price-rates](https://gproxy.leenhawk.com/api-reference/management/post-adminapiprice-rates.md)
- [POST /admin/api/price-rules/batch](https://gproxy.leenhawk.com/api-reference/management/post-adminapiprice-rulesbatch.md)
- [POST /admin/api/price-tiers/batch](https://gproxy.leenhawk.com/api-reference/management/post-adminapiprice-tiersbatch.md)
- [POST /admin/api/rate-limits/batch](https://gproxy.leenhawk.com/api-reference/management/post-adminapirate-limitsbatch.md)
- [POST /admin/api/models/batch](https://gproxy.leenhawk.com/api-reference/management/post-adminapimodelsbatch.md)


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