Skip to navigation

Resolve a model price

View as Markdown
Which price applies to a model in this workspace, and what a span with the given usage would cost

Request

This endpoint expects an object.
modelstringRequired>=1 character
providerstringOptional
usagemap from strings to integersOptional

A span’s usage, with the keys an SDK sends; empty prices nothing

Response

The price that applies
modelstringOptional
providerstringOptional
coststringOptional
What a span with this usage costs, in USD
cost_sourceenumOptional
Allowed values:
list_versionlongOptional

The organization’s list version it was priced with; 0 for the built-in list only

matchobjectOptional
Absent when no row prices the model
lineslist of objectsOptional
The rates that went into the cost

Errors

503
Service Unavailable Error