Buying tokens
Route Claude Code, Codex or Gemini CLI through Asale, choose exactly which models you will pay for, and keep your own subscription first in line.
Buying is per tool. Each installed AI CLI gets its own switch, its own model list, and its own config backup.
Turning a tool on
Buy → flip the switch. Asale rewrites that tool's config so its base_url points at a proxy on 127.0.0.1 and its key becomes your Asale key — after backing up the original file byte for byte. Switching off restores it exactly.
These tools read their config once, at startup. Restart the app or terminal window; sessions already running keep their old settings.
Choosing models
Each tool has a multi-select model list. A request for a model that is not on it is refused locally, before anything leaves your machine — no network call, no charge.
Codex picks its model from its own built-in list rather than from the request. With nothing selected it stays on models the market cannot serve. Select one and it is written into ~/.codex/config.toml.
What the switch routes
While a tool's Buy switch is on, all of that tool's traffic goes through Asale. It does not fall back to a local subscription.
Because the switch is per tool, that is the control you use to split your work: leave the tool you run against your own subscription switched off, and turn on the one you reach for after you have hit your limit. Switching off restores the original config, and requests go straight to the vendor again.
What a request costs
Before dispatch, the gateway freezes an estimate — your declared max_tokens at the model's output price. When the response ends, the real usage is priced and the difference is returned to your available balance immediately.
You are not charged when:
- the request errors,
- usage comes back as zero,
- you disconnect mid-stream.
Watching it work
Records lists every request: model, four token counts, price, latency. The same rows appear on the website. If a seller and a buyer compare records for the same request, the token counts match — the settlement figure is the server's, and it is the same number on both sides.