Zukko Blog

Guides to Claude Code, Cursor, Codex and the Claude and GPT APIs: setup, token savings and troubleshooting.

A model vanished from the model list — why, and what to do

3 min · · диагностика

The model list isn't a year-long catalogue — it's a snapshot of what works right now. Here's why it changes.

Saving on repeated requests: caching via X-Zukko-Cache and temperature:0

4 min · · API

The same request twice should not cost twice. Here is how response caching works and which scenarios actually benefit from it.

API vs ChatGPT Plus subscription — which is cheaper for a developer

4 min · · сравнение

A subscription and an API solve different problems. Here is what each option actually costs and when it makes sense to keep both.

Pulling billing history via GET /v1/usage for your own reports

5 min · · API

When you need to know exactly what each client or project cost, clicking through a dashboard does not scale. Here is how to pull the full history through the API.

Balance via API: building your own spend dashboard

4 min · · API

The dashboard shows a balance, but it will not aggregate spend by model and day the way you actually need. Here is how to build one from three API data sources.

Getting strictly structured JSON out of the model

3 min · · API

Asking the model to "reply in JSON" in the system prompt works about half the time. Here is a more reliable approach using tools with a strict schema.

Estimating request cost upfront with count_tokens

4 min · · API

Before burning balance on a long prompt, you can check its token count for free. Here is how, in one request.

The X-Zukko-Cache response cache: when a request is free

5 min · · API

The same request from the same user shouldn't be billed twice. Here is how the cache turns on and how to check whether it actually fired.

Idempotency-Key: retrying requests without paying twice

4 min · · API

A client-side timeout doesn't mean the request never ran on the server. The Idempotency-Key header solves that without manually checking usage history.

How to verify your API billing yourself

5 min · · API

No need to take billing on faith — the cost of every request is right there in the response headers, and the full spend history is one paginated call away.

Real-time spend monitoring from response headers

4 min · · API

You don't need to wait for a daily report to know what a request cost — the price and the remaining balance arrive in the headers of every non-streaming response. Here's how to use that.