POST
/
cost
/
purge
Cost Purge
curl --request POST \
  --url https://trace.wandb.ai/cost/purge \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "project_id": "entity/project",
  "query": {
    "$expr": {
      "$and": [
        {
          "$literal": "<string>"
        }
      ]
    }
  }
}'
{}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
project_id
string
required
Examples:

"entity/project"

query
object
required

The top-level object for querying traced calls.

The Query wraps a single $expr, which uses Mongo-style aggregation operators to filter calls. This expression can combine logical conditions, comparisons, type conversions, and string matching.

Examples: ``` # Filter calls where op_name == "predict" { "$expr": { "$eq": [ {"$getField": "op_name"}, {"$literal": "predict"} ] } }

# Filter where a call's display name contains "llm"
{
"$expr": {
"$contains": {
"input": {"$getField": "display_name"},
"substr": {"$literal": "llm"},
"case_insensitive": true
}
}
}
```

Response

Successful Response

The response is of type object.