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>"
    ],
    "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
}
'
{
  "processed": 123,
  "updated": 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

processed
integer
updated
integer
remaining
integer