DEVSAIO

Read your AI usage logs to find where the money goes

How to use per-request logs to spot expensive features, runaway loops, leaked keys and optimisation opportunities.

DEVSAIO team · 2 min read
Share on X

Every request through DEVSAIO appears in Usage Logs with its model, key, input tokens, output tokens, status and exact cost. A few minutes a week there pays for itself.

Questions to ask

Which model costs the most?

Sort by cost. If an expensive model handles simple requests, that's your first saving (routing).

Are input tokens growing?

Rising input tokens per request usually means conversation history or retrieved context is growing unchecked (memory).

Are outputs longer than needed?

High output tokens on short-answer features means you should ask for brevity and set max_tokens.

Any unusual spikes?

A burst of requests at 3 a.m. from one key may be a bug in a cron job, or a leaked key. Revoke first, investigate second (security checklist).

How many requests fail?

Failed requests aren't charged, but they hurt users. Check the error reasons (error codes).

Tag your traffic with keys

Use one key per app or feature. That turns the logs into a per-feature cost report without any extra code.

Make it a habit

  • Weekly: glance at total spend and the top model.
  • Monthly: review cost per feature and adjust models or limits.
  • After every release: check that cost per request didn't jump.
Try it with one API key

Claude, GPT, Gemini, DeepSeek, image and video models through one OpenAI- and Anthropic-compatible endpoint. Prepaid, pay only for what you use.

Keep reading