A valid request URL is required to generate request examples{
"id": "<string>",
"status": "pending",
"total": 123,
"processed": 123,
"updated": 123,
"skipped": 123,
"unpriceable": 123,
"message": "<string>",
"last_error": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"event_id": "<string>",
"type": "<string>",
"is_bifrost_error": true,
"status_code": 123,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"event_id": "<string>"
},
"extra_fields": {
"provider": "anthropic",
"model_requested": "<string>",
"request_type": "<string>"
}
}{
"id": "<string>",
"status": "pending",
"total": 123,
"processed": 123,
"updated": 123,
"skipped": 123,
"unpriceable": 123,
"message": "<string>",
"last_error": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"event_id": "<string>",
"type": "<string>",
"is_bifrost_error": true,
"status_code": 123,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"event_id": "<string>"
},
"extra_fields": {
"provider": "anthropic",
"model_requested": "<string>",
"request_type": "<string>"
}
}{
"event_id": "<string>",
"type": "<string>",
"is_bifrost_error": true,
"status_code": 123,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"event_id": "<string>"
},
"extra_fields": {
"provider": "anthropic",
"model_requested": "<string>",
"request_type": "<string>"
}
}Recalculate log costs
Starts an asynchronous background job that recalculates log costs in batches. The returned payload is a job status object that can be polled via the status endpoint.
Recalculation updates the cost fields on matching log records only. It does not retroactively debit, credit, or otherwise adjust governance budget usage. Governance budgets retain the usage recorded when each request was originally processed.
A valid request URL is required to generate request examples{
"id": "<string>",
"status": "pending",
"total": 123,
"processed": 123,
"updated": 123,
"skipped": 123,
"unpriceable": 123,
"message": "<string>",
"last_error": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"event_id": "<string>",
"type": "<string>",
"is_bifrost_error": true,
"status_code": 123,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"event_id": "<string>"
},
"extra_fields": {
"provider": "anthropic",
"model_requested": "<string>",
"request_type": "<string>"
}
}{
"id": "<string>",
"status": "pending",
"total": 123,
"processed": 123,
"updated": 123,
"skipped": 123,
"unpriceable": 123,
"message": "<string>",
"last_error": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"event_id": "<string>",
"type": "<string>",
"is_bifrost_error": true,
"status_code": 123,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"event_id": "<string>"
},
"extra_fields": {
"provider": "anthropic",
"model_requested": "<string>",
"request_type": "<string>"
}
}{
"event_id": "<string>",
"type": "<string>",
"is_bifrost_error": true,
"status_code": 123,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"event_id": "<string>"
},
"extra_fields": {
"provider": "anthropic",
"model_requested": "<string>",
"request_type": "<string>"
}
}Authorizations
Management API authentication for /api/* endpoints. Use the Authorization header
with Bearer <token>, where <token> is one of:
- a Bifrost management API key,
- a dashboard session token issued by
POST /api/session/login, - base64 of
<admin-username>:<admin-password>(legacy equivalent ofBasicAuth).
Virtual keys (sk-bf-*) and the x-api-key header are not accepted on management APIs -
the sole exception is GET /api/governance/virtual-keys/quota, which is virtual-key-only.
Body
Recalculate cost request
Log search filters
Show child attributes
Show child attributes
Response
Cost recalculation job accepted
Recalculate cost job status
Background job ID
Current job status
pending, running, completed, failed, cancelled, idle Total matching logs queued for recalculation
Logs processed so far
Logs updated with new costs
Logs skipped during processing
Subset of skipped logs whose pricing inputs could not be recovered, so their existing cost was left unchanged.
Optional progress message
Last error encountered by the job
Job start time
Last status update time
Was this page helpful?

