Skip to main content
POST
/
api
/
logs
/
recalculate-cost
Recalculate log costs
curl --request POST \
  --url http://localhost:8080/api/logs/recalculate-cost \
  --header 'Content-Type: application/json' \
  --data '
{
  "filters": {
    "providers": [
      "<string>"
    ],
    "models": [
      "<string>"
    ],
    "status": [
      "<string>"
    ],
    "objects": [
      "<string>"
    ],
    "selected_key_ids": [
      "<string>"
    ],
    "virtual_key_ids": [
      "<string>"
    ],
    "routing_rule_ids": [
      "<string>"
    ],
    "routing_engine_used": [
      "<string>"
    ],
    "start_time": "2023-11-07T05:31:56Z",
    "end_time": "2023-11-07T05:31:56Z",
    "min_latency": 123,
    "max_latency": 123,
    "min_tokens": 123,
    "max_tokens": 123,
    "min_cost": 123,
    "max_cost": 123,
    "missing_cost_only": true,
    "content_search": "<string>"
  },
  "limit": 123
}
'
{
  "total_matched": 123,
  "updated": 123,
  "skipped": 123,
  "remaining": 123
}

Body

application/json

Recalculate cost request

filters
object

Log search filters

limit
integer

Maximum number of logs to process (default 200, max 1000)

Response

Costs recalculated successfully

Recalculate cost response

total_matched
integer
updated
integer
skipped
integer
remaining
integer