# Upsert per-provider price overrides

> Upserts price overrides for this AI provider instance, keyed on (model, effective_from). The provider slug is taken from the AI provider itself, so only the model, rates, and effective_from are supplied. Authorized by the caller's access to the provider's project. `effective_from` must be in the future once the (model, component) has a price row — past prices are immutable, so corrections ship as new future-dated rows. A first price for a (model, component) nothing prices yet may be dated now or earlier, so a new provider is never live and unpriced.

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Upsert per-provider price overrides"}
>
</Heading>

<MethodEndpoint
  method={"put"}
  path={"/api/v1/ai-providers/{ai_provider_id}/prices"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Upserts price overrides for this AI provider instance, keyed on (model, effective_from). The provider slug is taken from the AI provider itself, so only the model, rates, and effective_from are supplied. Authorized by the caller's access to the provider's project. `effective_from` must be in the future once the (model, component) has a price row — past prices are immutable, so corrections ship as new future-dated rows. A first price for a (model, component) nothing prices yet may be dated now or earlier, so a new provider is never live and unpriced.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
>
  <Translate id="theme.openapi.request.title">Request</Translate>
</Heading>

<ParamsDetails
  {...require("./update-ai-provider-prices.ParamsDetails.json")}
>
  
</ParamsDetails>

<RequestSchema
  {...require("./update-ai-provider-prices.RequestSchema.json")}
>
  
</RequestSchema>

<StatusCodes
  {...require("./update-ai-provider-prices.StatusCodes.json")}
>
  
</StatusCodes>
