Caching

Ask twice, pay once

Real traffic repeats itself. When the same prompt arrives again inside the cache window, we return the stored answer at once and bill nothing for it. No configuration needed.

Instant repeats

served straight from cache

Not billed

cached responses are free

On by default

nothing to configure

The problem

What is slowing you down today

Paying for the same answer again

FAQ bots, retries and popular prompts generate identical calls all day.

Latency on easy questions

Users wait for a fresh generation of an answer you already have.

Cache layers to build and run

Rolling your own cache means keys, eviction and invalidation to maintain.

Capabilities

Everything you need, nothing you don't

Automatic matching

Prompts are matched after trimming, lowercasing and collapsing whitespace, together with the model and temperature.

Per-account isolation

Cache entries are scoped to your account. Nobody else's traffic can hit your cache.

Zero price on hits

Cached responses report cache_hit true and a price of zero.

Clear status

The response status field reads cached, so your code always knows.

Bounded freshness

Entries expire after the cache window, so answers do not linger indefinitely.

Visible in history

Cache hits appear in request history, so you can see how much traffic repeats.

Use cases

What teams run on it

01

FAQ and help bots

Common questions answered instantly.

02

Client retries

A repeated request returns the stored answer instead of a new bill.

03

Popular content

Trending prompts served at cache speed.

04

Development loops

Re-running the same test prompt costs nothing.

How it works

From sign-up to production

  1. 1

    Send a request

    The first call is generated and stored for your account.

  2. 2

    Repeat it

    The same prompt, model and temperature inside the window is a cache hit.

  3. 3

    Check cache_hit

    The response tells you it was cached and priced at zero.

Control

Built so you stay in charge

Keys you control

API keys are shown once at creation and stored only as a hash. Revoke any key instantly from Settings.

Spend you can see

Every request carries its own receipt: tokens in, tokens out, latency and price. Nothing is billed that you cannot trace.

Limits you set

Per-account rate limits and a free monthly allowance keep experiments safe before they become production.

Data you decide on

You choose exactly what you send. Repeat prompts can be served from your cache, and cache hits are never billed.

For developers

One endpoint. Every model.

Send a prompt and a capability, or name a model. One bearer key, one small JSON body, and a full receipt on every response.

curl https://YOUR-DOMAIN/api/ainf/inference \
  -H "Authorization: Bearer $AI_INFERENCE_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1042" \
  -d '{"prompt":"Summarise this ticket in one line","capability":"chat"}'

Questions, answered

What counts as the same prompt?

The prompt after trimming, lowercasing and collapsing whitespace, plus the same model and temperature.

How long are responses cached?

For the account's cache window. After it expires the next call is generated fresh.

Can I avoid the cache for one request?

Change the prompt or the temperature and it becomes a different cache entry.

Do cached calls count against my allowance?

Cached calls are priced at zero. They still appear in history so you can see them.

Let repeat traffic pay for itself

Caching is on from your first request. Start free.