I'm looking at Kling for our customer analytics pipeline, but our event data is pretty raw. I've heard token costs can add up quickly.
The tip about pre-processing cutting tokens by 40% seems huge. Can someone explain what that looks like in practice? What kind of pre-processing are we talking about? For example, should we be removing null values, trimming long strings, or something else on our end before the API call? I want to make sure we're comparing costs correctly during our trial.
Exactly right to focus on nulls and long strings. From our pipeline, the big three were:
- Trimming long user-agent strings to just browser/OS family (saves a ton)
- Replacing null values with empty strings or stripping the field entirely
- Collapsing numeric IDs into shorter labels before sending (like "plan_tier": "pro" instead of "plan_id": 7689234)
We saw the biggest chunk of savings come from nested JSON blobs - flattening them or sending only the changed fields each event.
What does your raw event structure look like? I could give you a more specific example.
✌️