Last updated: 2026-11-02 · Written by the editor · Rates from provider listings

Jev State Design: Cut Input Tokens (and Your Bill) by 60%+

With Jev, the state is the bill. Input is the only thing charged ($0.042 per 1M tokens, output free), so every token you ship in a decision request is a token you pay for — millions of times over. This guide shows how a typical padded state shrinks by ~65% without losing decision signal, and the one trap that makes over-stripping dangerous.

1. Why state is the whole bill

A Jev request has two parts: the state (the text to judge) and the questions (typed: choice / score / noul). Questions ride along in the same request and are nearly free — adding a second or third question barely moves the bill. The state is different: it is charged, and it is usually 10–50x longer than the questions.

State lengthCost per decision1M decisions/month
850 tokens (padded)$0.0000357$35.70
290 tokens (lean)$0.0000122$12.18

At $0.042/1M input tokens, cutting state from ~850 to ~290 tokens saves ~$23.5 per million decisions — a 66% cut that requires zero infrastructure work. (Community reports run leaner still: the 1,018-paper classification that cost $0.08 total averaged far below these figures.)

2. The padded state (before)

Here's what a naively constructed state looks like when you pipe a raw support ticket straight in — HTML markup, signatures, ticket metadata and all:

From: [email protected]
To: [email protected]
Subject: [Ticket #48213] Re: Re: Re: Cannot connect Stripe
X-Mailer: Microsoft Outlook 16.0
---
<html><body><p>Hi, I've been trying to connect my Stripe account
for 3 days and it keeps failing. I am losing sales because checkout
is broken. Please help ASAP.</p>
<p>--<br>Maria K<br>Head of Ops, Goldline Ltd<br>
This email and any attachments are confidential...</p>
</body></html>

Roughly 180–220 words, ~850–1,100 tokens with markup. The actual decision signal — the customer's sentence — is about 30 words.

3. The lean state (after)

Customer (Head of Ops): cannot connect Stripe account for 3 days,
checkout broken, losing sales. Third follow-up.

~30 words, ~40–60 tokens. Same routing decision, same urgency call, same sentiment read. The signature, the mail headers, the confidentiality footer and the HTML carried zero decision information — they were pure cost.

4. Five stripping techniques

a. Strip transport, keep facts

Convert HTML to text before it reaches the state; drop signatures, legal footers and reply chains. If you control ingestion, extract the message body at the webhook, not at the model call.

b. Replace history with deltas

Don't ship a six-message thread. Ship the latest message plus one line of context: "Prior turns: billing dispute; agent offered refund; customer declined." The delta carries what the decision needs; the transcript carries tokens.

c. Normalize values

"3 days ago" beats a full ISO timestamp with timezone for most judgment questions; short ids beat long UUIDs. Normalize before the request, deterministically, in code.

d. Compose state per question-set

If one workflow asks spam-check and another asks routing, they rarely need the same state. Build the state in the handler that knows which questions are coming — spam checks can drop even more.

e. Budget, don't guess

Count tokens (rough: 1 token ≈ 4 chars English / ≈ 1–1.5 chars Chinese) and alert when a state crosses your budget. A state that quietly grows from 300 to 900 tokens after a "minor" upstream change is a 3x cost regression nobody notices on a dashboard of decision counts.

5. The accuracy trap

Stripping is not free. Context you remove was sometimes load-bearing: "third follow-up" changes urgency; the product line changes routing. The failure mode is subtle — the model returns a valid, confident answer that is simply worse, because Jev can't hallucinate text but can absolutely be wrong with high confidence.

The fix is a replay set, not intuition: take 100–500 historical cases with known outcomes (the same calibration we recommend in the production checklist), run them against both the padded and the lean state, and compare accuracy. If lean matches padded within noise, ship lean. If not, you've found which stripped field was doing work — put that one back.

6. Test it free before writing code

You can iterate on state design without any code: open the Playground, paste your padded state, run the decision, then paste the lean version and compare answers and confidence. The playground shows full probability distributions, which is exactly what you want to watch while trimming — confidence should stay stable as tokens fall.

7. Keep states lean by default — then earn the extra tokens

Treat the lean state as the default and require justification for every addition — the inverse of how most integrations evolve. The official guidance agrees: "Keep states lean — strip HTML and metadata. Fewer tokens, better accuracy." It's one of the rare optimizations that improves cost, latency and often accuracy at once.

Next steps: see the real per-decision math on the pricing page, or build something with the state you just designed — the ticket-triage tutorial is a 50-line starting point.