Replace a model price
Replace every field of a custom model price in this workspace.
The request body is the full entry, not a partial update: omitted optional fields are reset to their defaults. Only the workspace’s own entries can be updated; LangSmith default entries cannot. Costs already recorded on existing runs are not recomputed.
Returns 404 if the workspace has no entry with this ID, including LangSmith default entries. Returns 409 if the change would duplicate another entry’s match conditions.
Authorizations
Path Parameters
Body
The full replacement for a custom model price entry.
Display name for the entry, usually the model name.
Regular expression matched against the run's model name, for example ^gpt-4o-mini$.
Cost in US dollars per input (prompt) token.
Cost in US dollars per output (completion) token.
Only price runs that started at or after this time. Null applies to runs from any time.
Invocation parameter keys checked, in order, for the model name when the run does not report ls_model_name metadata.
Cost in US dollars per input token for specific token types, keyed by the token detail name the run reports, for example cache_read. Input tokens not covered here are priced at prompt_cost.
Cost in US dollars per output token for specific token types, keyed by the token detail name the run reports, for example audio. Output tokens not covered here are priced at completion_cost.
Only price runs from this provider (the ls_provider metadata, case-insensitive), for example openai or anthropic. Null matches any provider.
Only price requests with more input tokens than this, for long-context pricing tiers. Null applies to every request.
0 <= x <= 9007199254740991Response
Successful Response

