client.costs.
client.costs.by_project
List spend per month, vendor and project for costs that ended in the [start, end) window.
A date is a UTC day, and a datetime must carry a timezone. runs lists every run alive during the window or holding a cost in it, with its project.
Signature
required · date | datetime
required · date | datetime
CostsByProjectResponse
For examples, see the Python SDK guide.
client.costs.project_model
Return one project’s model spend per UTC month for its runs placed in the [start, end) window.
A run counts in the month it finished, or started if it has not finished. unattributed_usd is the project key’s all-time spend outside any run or on runs in no project, and through is when the usage data ends.
Signature
required · str
required · date | datetime
required · date | datetime
ProjectModelCosts
For examples, see the Python SDK guide.
client.costs.run
Return one run’s spend in total, per cost type and per provider, resource and unit.
Model spend from the Gateway appears as the model cost type. When the Gateway is unavailable it is left out and model_spend_available is false.
Signature
required · UUID | str

