AI Providers

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.

put/v1/projects/{project_id}/ai-providers/{ai_provider_id}/prices

Request

  • Base URL: https://api.naturali.ai
  • URL: https://api.naturali.ai/v1/projects/{project_id}/ai-providers/{ai_provider_id}/prices
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)

Path parameters

ai_provider_idstring required
Example:aip_V1StGXR8Z5jdHi6B

AI Provider ID

Request body

Example request

{
  "prices": [
    {
      "model": "gpt-4o"
    }
  ]
}

Response

The upserted price overrides

Example response

{
  "prices": [
    {
      "id": "price_V1StGXR8Z5jdHi6B",
      "ai_provider_id": "aip_V1StGXR8Z5jdHi6B",
      "provider": "openai",
      "model": "gpt-4o"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.