Usage and logs
What PortModels records for every request, and how to read it back.
Every metered request writes a call log. It is the same record that charges the user, pays your markup, and populates the dashboards — there is no separate estimate anywhere.
What is recorded#
- The model and provider used.
- Token counts, or images generated.
- Provider cost.
- Markup applied and the total charged.
- Outcome: success, error, or empty completion.
- The app the call came from, when it came through a Connect token.
Reading cost per request#
The cheapest place to see cost is the response itself:
json
"usage": { "prompt_tokens": 42, "completion_tokens": 128, "total_tokens": 170, "cost": 0.00031 }Streaming responses emit the same figure as a usage event just before
[DONE]. See Chat completions.
Where to see aggregates#
- Users see per-charge history on their balance page, labelled with the app that made the call.
- Developers see per-app request counts, spend, cost, earnings, and error rates in the developer dashboard. See Earnings and payouts.
Empty completions#
A request where the model returns nothing usable is recorded as an empty completion rather than billed as a successful run. Watch this number: a rising empty rate almost always means a prompt, parameter, or model change went wrong, and it costs earnings before it costs ratings.
Practical monitoring#
Track three numbers per app and alert on changes:
| Metric | What a spike means |
|---|---|
| Error rate | A provider problem, a bad parameter, or an expired credential |
| Empty completion rate | A prompt or model regression |
| Cost per successful run | Context growth — usually resending history you don't need |