> For the complete documentation index, see [llms.txt](https://docs.otari.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otari.ai/otari/for-integrators/api-reference/pricing.md).

# Pricing

## List Pricing

> List every stored price version, of every kind.\
> \
> A row's \`\`kind\`\` says whether it prices a model or a search or fetch\
> instance. A hosted provider restricted to another organization than the\
> caller's is left out, as it is from the catalog.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"PricingResponse":{"description":"Response model for model pricing.","properties":{"cache_read_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"created_at":{"title":"Created At","type":"string"},"effective_at":{"title":"Effective At","type":"string"},"input_price_per_million":{"title":"Input Price Per Million","type":"number"},"kind":{"description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","title":"Kind","type":"string"},"model_key":{"title":"Model Key","type":"string"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which writer set this row: config, api, or migration. Null when recorded before origins were.","title":"Origin"},"output_price_per_million":{"title":"Output Price Per Million","type":"number"},"price_per_request":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"USD for each request, for a rate in requests; null for any other unit.","title":"Price Per Request"},"pricing_tiers":{"items":{"$ref":"#/components/schemas/PricingTier"},"title":"Pricing Tiers","type":"array"},"unit":{"description":"What the rates are per: tokens, requests, or images.","title":"Unit","type":"string"},"updated_at":{"title":"Updated At","type":"string"}},"required":["kind","model_key","effective_at","input_price_per_million","output_price_per_million","cache_read_price_per_million","cache_write_price_per_million","pricing_tiers","unit","origin","created_at","updated_at"],"title":"PricingResponse","type":"object"},"PricingTier":{"description":"Whole-request price cliff selected by total billable input tokens.","properties":{"cache_read_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"input_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Input Price Per Million"},"min_input_tokens":{"exclusiveMinimum":0,"title":"Min Input Tokens","type":"integer"},"output_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Output Price Per Million"}},"required":["min_input_tokens"],"title":"PricingTier","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/pricing":{"get":{"description":"List every stored price version, of every kind.\n\nA row's ``kind`` says whether it prices a model or a search or fetch\ninstance. A hosted provider restricted to another organization than the\ncaller's is left out, as it is from the catalog.","operationId":"pricing-list_pricing","parameters":[{"in":"query","name":"skip","required":false,"schema":{"default":0,"minimum":0,"title":"Skip","type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PricingResponse"},"title":"Response Pricing-List Pricing","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Pricing","tags":["pricing"]}}}}
```

## Set Pricing

> Set or update pricing for a model.\
> \
> Rejects an alias or a routing policy: pricing, budgets, and usage all key on\
> the model a request resolves to, so a row stored under either name would\
> never be read.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"SetPricingRequest":{"description":"Create a versioned per-model price, with optional cache and context tiers.","properties":{"cache_read_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"description":"Price per 1M cached-input tokens","title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"description":"Price per 1M cache-write (creation) tokens","title":"Cache Write Price Per Million"},"effective_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"ISO 8601 datetime from which this price applies. Defaults to now if omitted.","title":"Effective At"},"input_price_per_million":{"description":"Price per 1M of the rate's unit: input tokens, requests or images","minimum":0,"title":"Input Price Per Million","type":"number"},"kind":{"anyOf":[{"enum":["model","search","fetch"],"type":"string"},{"type":"null"}],"description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","title":"Kind"},"model_key":{"description":"Model identifier in format 'provider:model', or a search or fetch instance's name for those kinds","title":"Model Key","type":"string"},"output_price_per_million":{"description":"Price per 1M output tokens; unused by a rate in requests or images","minimum":0,"title":"Output Price Per Million","type":"number"},"price_per_request":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"description":"USD for each request, whatever it uses: a completion model billed per call, such as Exa's or Liner's answers. Shorthand for unit 'requests' with input_price_per_million at a million times this; not combined with token prices.","title":"Price Per Request"},"pricing_tiers":{"anyOf":[{"items":{"$ref":"#/components/schemas/PricingTier"},"type":"array"},{"type":"null"}],"description":"Whole-request context thresholds. Fields omitted by a tier inherit the base rate.","title":"Pricing Tiers"},"unit":{"default":"tokens","description":"What the rates are per: 'tokens' for a model, 'requests' for a gateway-run tool, a moderation call, or a completion model billed per call (USD per million requests), 'images' for image generation (USD per million images).","enum":["tokens","requests","images"],"title":"Unit","type":"string"}},"required":["model_key"],"title":"SetPricingRequest","type":"object"},"PricingTier":{"description":"Whole-request price cliff selected by total billable input tokens.","properties":{"cache_read_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"input_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Input Price Per Million"},"min_input_tokens":{"exclusiveMinimum":0,"title":"Min Input Tokens","type":"integer"},"output_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Output Price Per Million"}},"required":["min_input_tokens"],"title":"PricingTier","type":"object"},"PricingResponse":{"description":"Response model for model pricing.","properties":{"cache_read_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"created_at":{"title":"Created At","type":"string"},"effective_at":{"title":"Effective At","type":"string"},"input_price_per_million":{"title":"Input Price Per Million","type":"number"},"kind":{"description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","title":"Kind","type":"string"},"model_key":{"title":"Model Key","type":"string"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which writer set this row: config, api, or migration. Null when recorded before origins were.","title":"Origin"},"output_price_per_million":{"title":"Output Price Per Million","type":"number"},"price_per_request":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"USD for each request, for a rate in requests; null for any other unit.","title":"Price Per Request"},"pricing_tiers":{"items":{"$ref":"#/components/schemas/PricingTier"},"title":"Pricing Tiers","type":"array"},"unit":{"description":"What the rates are per: tokens, requests, or images.","title":"Unit","type":"string"},"updated_at":{"title":"Updated At","type":"string"}},"required":["kind","model_key","effective_at","input_price_per_million","output_price_per_million","cache_read_price_per_million","cache_write_price_per_million","pricing_tiers","unit","origin","created_at","updated_at"],"title":"PricingResponse","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/pricing":{"post":{"description":"Set or update pricing for a model.\n\nRejects an alias or a routing policy: pricing, budgets, and usage all key on\nthe model a request resolves to, so a row stored under either name would\nnever be read.","operationId":"pricing-set_pricing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPricingRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Set Pricing","tags":["pricing"]}}}}
```

## List Current Pricing

> List the rate each priced key is metered at, one row per kind and key.\
> \
> Listing prices answers the stored history, one row per \`\`effective\_at\`\`, so a\
> page of that is a page of revisions rather than a page of keys. This\
> answers one row per key: the newest rate that has taken effect, or the\
> earliest scheduled rate for a key that has none yet. Every kind is returned,\
> a row's \`\`kind\`\` telling a model's price from a search or fetch instance's,\
> and \`\`count\`\` is the number of priced keys of any kind, so a caller can page\
> without reading the collection to learn how long it is. A hosted provider\
> restricted to another organization than the caller's is left out of both.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"CurrentPricingPage":{"description":"One page of current prices, with the total number of priced keys of any kind.","properties":{"count":{"title":"Count","type":"integer"},"data":{"items":{"$ref":"#/components/schemas/PricingResponse"},"title":"Data","type":"array"}},"required":["data","count"],"title":"CurrentPricingPage","type":"object"},"PricingResponse":{"description":"Response model for model pricing.","properties":{"cache_read_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"created_at":{"title":"Created At","type":"string"},"effective_at":{"title":"Effective At","type":"string"},"input_price_per_million":{"title":"Input Price Per Million","type":"number"},"kind":{"description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","title":"Kind","type":"string"},"model_key":{"title":"Model Key","type":"string"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which writer set this row: config, api, or migration. Null when recorded before origins were.","title":"Origin"},"output_price_per_million":{"title":"Output Price Per Million","type":"number"},"price_per_request":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"USD for each request, for a rate in requests; null for any other unit.","title":"Price Per Request"},"pricing_tiers":{"items":{"$ref":"#/components/schemas/PricingTier"},"title":"Pricing Tiers","type":"array"},"unit":{"description":"What the rates are per: tokens, requests, or images.","title":"Unit","type":"string"},"updated_at":{"title":"Updated At","type":"string"}},"required":["kind","model_key","effective_at","input_price_per_million","output_price_per_million","cache_read_price_per_million","cache_write_price_per_million","pricing_tiers","unit","origin","created_at","updated_at"],"title":"PricingResponse","type":"object"},"PricingTier":{"description":"Whole-request price cliff selected by total billable input tokens.","properties":{"cache_read_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"input_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Input Price Per Million"},"min_input_tokens":{"exclusiveMinimum":0,"title":"Min Input Tokens","type":"integer"},"output_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Output Price Per Million"}},"required":["min_input_tokens"],"title":"PricingTier","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/pricing/current":{"get":{"description":"List the rate each priced key is metered at, one row per kind and key.\n\nListing prices answers the stored history, one row per ``effective_at``, so a\npage of that is a page of revisions rather than a page of keys. This\nanswers one row per key: the newest rate that has taken effect, or the\nearliest scheduled rate for a key that has none yet. Every kind is returned,\na row's ``kind`` telling a model's price from a search or fetch instance's,\nand ``count`` is the number of priced keys of any kind, so a caller can page\nwithout reading the collection to learn how long it is. A hosted provider\nrestricted to another organization than the caller's is left out of both.","operationId":"pricing-list_current_pricing","parameters":[{"in":"query","name":"skip","required":false,"schema":{"default":0,"minimum":0,"title":"Skip","type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentPricingPage"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Current Pricing","tags":["pricing"]}}}}
```

## List Pricing Drift

> Every stored deployment rate in force today, beside today's default for it.\
> \
> A stored row shadows the models.dev default silently and forever, whether\
> it was a deliberate override or a copy of a then-current default. This is\
> what makes the difference visible: a row that matches the default is a row\
> that could be deleted, and a row far from it is one worth a second look.\
> Tool rows (\`\`otari:\`\`) are per request and have no default to drift from,\
> so they are left out.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"PricingDriftRow":{"description":"A stored deployment rate beside the default it shadows.","properties":{"default_input_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"What models.dev would meter this key at today. Null when the dataset does not know it.","title":"Default Input Price Per Million"},"default_output_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Output Price Per Million"},"default_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The models.dev entry the default came from.","title":"Default Reference"},"effective_at":{"title":"Effective At","type":"string"},"input_delta_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"(stored - default) / default, as a percentage.","title":"Input Delta Percent"},"input_price_per_million":{"title":"Input Price Per Million","type":"number"},"model_key":{"title":"Model Key","type":"string"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"output_delta_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Delta Percent"},"output_price_per_million":{"title":"Output Price Per Million","type":"number"},"unit":{"title":"Unit","type":"string"}},"required":["model_key","unit","origin","effective_at","input_price_per_million","output_price_per_million","default_input_price_per_million","default_output_price_per_million","default_reference","input_delta_percent","output_delta_percent"],"title":"PricingDriftRow","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/pricing/drift":{"get":{"description":"Every stored deployment rate in force today, beside today's default for it.\n\nA stored row shadows the models.dev default silently and forever, whether\nit was a deliberate override or a copy of a then-current default. This is\nwhat makes the difference visible: a row that matches the default is a row\nthat could be deleted, and a row far from it is one worth a second look.\nTool rows (``otari:``) are per request and have no default to drift from,\nso they are left out.","operationId":"pricing-list_pricing_drift","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":200,"maximum":500,"minimum":1,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PricingDriftRow"},"title":"Response Pricing-List Pricing Drift","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Pricing Drift","tags":["pricing"]}}}}
```

## Get Pending Pricing Refresh

> The update the scheduled refresh has left waiting for review, if any.\
> \
> What the dashboard's notice reads. 404 when nothing is pending, so a page can\
> ask on load without treating the common case as an error banner.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"PricingRefreshPreviewResponse":{"description":"Reviewable summary of a pending models.dev refresh.","properties":{"added_count":{"title":"Added Count","type":"integer"},"changed_count":{"title":"Changed Count","type":"integer"},"changes":{"items":{"$ref":"#/components/schemas/PricingRefreshChangeResponse"},"title":"Changes","type":"array"},"changes_truncated":{"title":"Changes Truncated","type":"boolean"},"digest":{"default":"","description":"Identity of the pending snapshot, to act on exactly this one: send it as `digest` to `POST /hosted-providers/catalog-update` to apply it, or to `POST /pricing/refresh/reject` to discard it.","title":"Digest","type":"string"},"fetched_at":{"format":"date-time","title":"Fetched At","type":"string"},"needs_review":{"default":false,"description":"True when the update is implausibly large; the scheduled `auto` policy leaves it pending.","title":"Needs Review","type":"boolean"},"protected_model_count":{"title":"Protected Model Count","type":"integer"},"removed_count":{"title":"Removed Count","type":"integer"},"review_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the update needs review.","title":"Review Reason"}},"required":["fetched_at","added_count","changed_count","removed_count","protected_model_count","changes","changes_truncated"],"title":"PricingRefreshPreviewResponse","type":"object"},"PricingRefreshChangeResponse":{"description":"One default model price changed by a pending refresh.","properties":{"change":{"title":"Change","type":"string"},"model_key":{"title":"Model Key","type":"string"}},"required":["model_key","change"],"title":"PricingRefreshChangeResponse","type":"object"}}},"paths":{"/api/v1/pricing/refresh/pending":{"get":{"description":"The update the scheduled refresh has left waiting for review, if any.\n\nWhat the dashboard's notice reads. 404 when nothing is pending, so a page can\nask on load without treating the common case as an error banner.","operationId":"pricing-get_pending_pricing_refresh","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingRefreshPreviewResponse"}}},"description":"Successful Response"}},"summary":"Get Pending Pricing Refresh","tags":["pricing"]}}}}
```

## Reject Pricing Refresh

> Discard a reviewed default-price snapshot without applying it.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/pricing/refresh/reject":{"post":{"description":"Discard a reviewed default-price snapshot without applying it.","operationId":"pricing-reject_pricing_refresh","parameters":[{"description":"The `digest` of the previewed snapshot; 409 when the pending one differs.","in":"query","name":"digest","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `digest` of the previewed snapshot; 409 when the pending one differs.","title":"Digest"}}],"responses":{"204":{"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Reject Pricing Refresh","tags":["pricing"]}}}}
```

## List Pricing Snapshots

> The accepted default-price snapshots, newest first.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"AcceptedSnapshotResponse":{"description":"One accepted models.dev snapshot in the history.","properties":{"accepted_at":{"format":"date-time","title":"Accepted At","type":"string"},"accepted_by":{"description":"`operator` for a catalog update an operator ran, `schedule` for the auto policy.","title":"Accepted By","type":"string"},"id":{"title":"Id","type":"string"},"model_count":{"title":"Model Count","type":"integer"}},"required":["id","accepted_at","accepted_by","model_count"],"title":"AcceptedSnapshotResponse","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/pricing/snapshots":{"get":{"description":"The accepted default-price snapshots, newest first.","operationId":"pricing-list_pricing_snapshots","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AcceptedSnapshotResponse"},"title":"Response Pricing-List Pricing Snapshots","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Pricing Snapshots","tags":["pricing"]}}}}
```

## Get Pricing

> Get pricing for a specific model, or a search or fetch instance, as of a timestamp.\
> \
> A 404 for a model of a hosted provider restricted to another organization\
> than the caller's.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"PricingResponse":{"description":"Response model for model pricing.","properties":{"cache_read_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"created_at":{"title":"Created At","type":"string"},"effective_at":{"title":"Effective At","type":"string"},"input_price_per_million":{"title":"Input Price Per Million","type":"number"},"kind":{"description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","title":"Kind","type":"string"},"model_key":{"title":"Model Key","type":"string"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which writer set this row: config, api, or migration. Null when recorded before origins were.","title":"Origin"},"output_price_per_million":{"title":"Output Price Per Million","type":"number"},"price_per_request":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"USD for each request, for a rate in requests; null for any other unit.","title":"Price Per Request"},"pricing_tiers":{"items":{"$ref":"#/components/schemas/PricingTier"},"title":"Pricing Tiers","type":"array"},"unit":{"description":"What the rates are per: tokens, requests, or images.","title":"Unit","type":"string"},"updated_at":{"title":"Updated At","type":"string"}},"required":["kind","model_key","effective_at","input_price_per_million","output_price_per_million","cache_read_price_per_million","cache_write_price_per_million","pricing_tiers","unit","origin","created_at","updated_at"],"title":"PricingResponse","type":"object"},"PricingTier":{"description":"Whole-request price cliff selected by total billable input tokens.","properties":{"cache_read_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"input_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Input Price Per Million"},"min_input_tokens":{"exclusiveMinimum":0,"title":"Min Input Tokens","type":"integer"},"output_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Output Price Per Million"}},"required":["min_input_tokens"],"title":"PricingTier","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/pricing/{model_key}":{"get":{"description":"Get pricing for a specific model, or a search or fetch instance, as of a timestamp.\n\nA 404 for a model of a hosted provider restricted to another organization\nthan the caller's.","operationId":"pricing-get_pricing","parameters":[{"in":"path","name":"model_key","required":true,"schema":{"title":"Model Key","type":"string"}},{"description":"ISO datetime for effective lookup","in":"query","name":"as_of","required":false,"schema":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"ISO datetime for effective lookup","title":"as_of"}},{"description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","in":"query","name":"kind","required":false,"schema":{"default":"model","description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","enum":["model","search","fetch"],"title":"Kind","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResponse"}}},"description":"Successful Response"},"404":{"description":"Nothing prices the model, or its hosted provider is restricted to another organization."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Get Pricing","tags":["pricing"]}}}}
```

## Delete Pricing

> Delete pricing entries for a model, or for a search or fetch instance.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/pricing/{model_key}":{"delete":{"description":"Delete pricing entries for a model, or for a search or fetch instance.","operationId":"pricing-delete_pricing","parameters":[{"in":"path","name":"model_key","required":true,"schema":{"title":"Model Key","type":"string"}},{"description":"ISO datetime identifying a specific pricing row to delete","in":"query","name":"effective_at","required":false,"schema":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"ISO datetime identifying a specific pricing row to delete","title":"Effective At"}},{"description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","in":"query","name":"kind","required":false,"schema":{"default":"model","description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","enum":["model","search","fetch"],"title":"Kind","type":"string"}}],"responses":{"204":{"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Delete Pricing","tags":["pricing"]}}}}
```

## Get Pricing History

> Return the full pricing history for a model, or for a search or fetch instance.\
> \
> A 404 for a model of a hosted provider restricted to another organization\
> than the caller's.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"PricingResponse":{"description":"Response model for model pricing.","properties":{"cache_read_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"created_at":{"title":"Created At","type":"string"},"effective_at":{"title":"Effective At","type":"string"},"input_price_per_million":{"title":"Input Price Per Million","type":"number"},"kind":{"description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","title":"Kind","type":"string"},"model_key":{"title":"Model Key","type":"string"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which writer set this row: config, api, or migration. Null when recorded before origins were.","title":"Origin"},"output_price_per_million":{"title":"Output Price Per Million","type":"number"},"price_per_request":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"USD for each request, for a rate in requests; null for any other unit.","title":"Price Per Request"},"pricing_tiers":{"items":{"$ref":"#/components/schemas/PricingTier"},"title":"Pricing Tiers","type":"array"},"unit":{"description":"What the rates are per: tokens, requests, or images.","title":"Unit","type":"string"},"updated_at":{"title":"Updated At","type":"string"}},"required":["kind","model_key","effective_at","input_price_per_million","output_price_per_million","cache_read_price_per_million","cache_write_price_per_million","pricing_tiers","unit","origin","created_at","updated_at"],"title":"PricingResponse","type":"object"},"PricingTier":{"description":"Whole-request price cliff selected by total billable input tokens.","properties":{"cache_read_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million"},"cache_write_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million"},"input_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Input Price Per Million"},"min_input_tokens":{"exclusiveMinimum":0,"title":"Min Input Tokens","type":"integer"},"output_price_per_million":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"title":"Output Price Per Million"}},"required":["min_input_tokens"],"title":"PricingTier","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/pricing/{model_key}/history":{"get":{"description":"Return the full pricing history for a model, or for a search or fetch instance.\n\nA 404 for a model of a hosted provider restricted to another organization\nthan the caller's.","operationId":"pricing-get_pricing_history","parameters":[{"in":"path","name":"model_key","required":true,"schema":{"title":"Model Key","type":"string"}},{"description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","in":"query","name":"kind","required":false,"schema":{"default":"model","description":"What the row prices: 'model' (the default), or 'search' or 'fetch' for a search or fetch instance, keyed by the instance's name and priced per call. Only the deployment operator sets a search or fetch rate.","enum":["model","search","fetch"],"title":"Kind","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PricingResponse"},"title":"Response Pricing-Get Pricing History","type":"array"}}},"description":"Successful Response"},"404":{"description":"Nothing prices the model, or its hosted provider is restricted to another organization."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Get Pricing History","tags":["pricing"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.otari.ai/otari/for-integrators/api-reference/pricing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
