v1

latestOpenAPI 3.1.02026-08-042453938.9 KB
Contracts

Add a price override

Add or update a per-unit-type price override on a contract.

Price overrides replace the default pricing plan rate for a specific usage type. For example, if your default api_call plan charges $0.001/call, a contract override of $0.0008/call gives this customer a negotiated enterprise rate.

If an override for the given unitType already exists, it is updated (upsert behavior). Only ACTIVE contracts accept new overrides.

Requires a secret key (sk_*) with the ADMIN role.

post/v1/contracts/{id}/overrides

Path parameters

idstring required

Contract ID

Request body

unitTypestring required

The usage type to override pricing for. Must match a unitType in your pricing plans (e.g., "api_call", "token").

unitPriceUsdstring required

Custom price per unit in USD. Must be a non-negative number as a string (for decimal precision). Use "0" for free-tier overrides.

Example request

{
  "unitType": "api_call",
  "unitPriceUsd": "0.000800"
}

Response

Price override created or updated

idstring required

Unique identifier for the price override

unitTypestring required

The usage type this override applies to (must match a pricing plan unitType)

unitPriceUsdstring required

Custom price per unit in USD (string for decimal precision, up to 6 decimal places)

Example response

{
  "id": "cpo_abc123def456",
  "unitType": "api_call",
  "unitPriceUsd": "0.000800"
}