/v1/decisions, with the same API key, rate limits,
wallet, and spend caps as every other route. Behind it sit Cloudflare’s open-weight
Clef models: you send a state
(text, JSON, or images) and a schema of typed questions, and get back a probability for every
allowed answer of every question in one forward pass. There is no free-form text to parse, no
reasoning tokens to wait for, and no prompt engineering to coax out valid JSON — the model can
only answer in the shape you declared.
Use it for the parts of an agent that are classification, routing, triage, moderation, or scoring
rather than writing: “is this ticket urgent”, “which team owns it”, “how severe is the impact”,
“does this reply follow the policy”. A decision is a few hundred milliseconds and a fraction of a
cent, so you can ask it on every turn.
You never create a Cloudflare account or hold a Cloudflare token. AI Reserve holds one account,
each decision is billed to your wallet at the published per-token rate, and every decision appears
in your usage analytics under the model clef or clef-flash.
Jev / System One compatible. The request and response bodies are the System One decision
API, so an existing Jev integration moves over by pointing at
https://api.aireserve.com/v1/decisions with your AI Reserve key and setting model to clef
or clef-flash.Quickstart
aireserve envelope with the request id to quote to support and the
model the decision billed under.
Request
Question types
Every question takes
instructions — the question itself, plus any policy the model should apply.
Questions are answered independently against the same state; the model cannot see one answer while
producing another, so put shared context in state or in each question’s instructions.
Use it as a gate
The common shape is a cheap decision in front of an expensive model: decide whether the turn needs the large model, a tool call, or a human, and only then spend on it.Billing
Rates match Cloudflare’s published Workers AI list prices. Decisions have no output tokens, so a
request costs its input alone: the serialized
state and questions, plus images, which are
tokenized at one token per 32×32 pixel block and capped at 1,024 tokens each. The wallet holds an
in-process estimate before the call and settles on the token count Cloudflare reports; a decision
that fails — at the provider, on a timeout, or because the surface is not configured — is never
charged. Current rates are always on the pricing page.