The library

128 ways to spend fewer tokens

The 22 Beginner tips are free to read. The 106 advanced tactics unlock with Pro — plus a fresh tip in your inbox every morning.

⚙️Batching & Automation ~50% on input + output tokens

Move Every Non-Urgent Job to the Batch API and Pay Half Price

If a job doesn't need an answer in the next few seconds, send it through the Batch API instead of the live endpoint. The exact same request costs half as much.

Beginner 1 min Read →
⚙️Batching & Automation Often 40-70% fewer input tokens on bulk classification, varies with prompt size

Classify a Whole List in One Call, Not One Row at a Time

Send 20-50 items as a numbered list and get back a JSON array of labels, instead of paying for the same instruction prompt on every single row.

Beginner 1 min Read →
⚙️Batching & Automation Varies; commonly 20-60% on duplicate-heavy workloads

Deduplicate and Cache Identical Requests Before They Ever Hit the API

Real-world batches are full of repeats. Hash each request, send each unique prompt once, and fan the answer back out to every duplicate.

Beginner 1 min Read →
⚙️Batching & Automation 🔒 Pro

Fetch the Data the Agent Always Needs Before the Loop Starts

When an agent will always need the same data, making it fetch that data through a tool call costs tokens for the decision, the tool schema, and the round-trip. Gather it with a plain script before the agent starts and hand it the file.

Intermediate 3 min Unlock →
⚙️Batching & Automation 🔒 Pro

Add a Relevance Gate: The Cheapest LLM Call Is the One You Don't Make

A cheaper model and a tighter prompt still pay for a call that never needed to happen. Put a deterministic, non-LLM precheck in front of the agent and skip the whole invocation when the input plainly doesn't need reasoning.

Intermediate 2 min Unlock →
⚙️Batching & Automation 🔒 Pro

Use Targeted Retries with Backoff Instead of Blindly Re-Sending

Distinguish retryable errors from real failures, back off on rate limits, and resend only the failed items so you stop paying for accidental duplicate generations.

Intermediate 2 min Unlock →
⚙️Batching & Automation 🔒 Pro

Stack Prompt Caching on Top of Your Batch Jobs for Compounding Savings

Batch requests support prompt caching. When every request shares a big instruction block or document, cache it once and the per-request cost collapses.

Intermediate 1 min Unlock →
⚙️Batching & Automation 🔒 Pro

Run an Async Queue with a Concurrency Cap Instead of Firing All at Once

Push jobs through a bounded worker pool so you saturate your rate limit without tripping it, eliminating the retry storms and tier upgrades that quietly inflate cost.

Advanced 2 min Unlock →
⚙️Batching & Automation 🔒 Pro

Compile a Repeated Skill's Stable Steps Into Code, Keep the Model Only for Judgment

Take a working natural-language agent skill, collect its execution traces, and permanently move the steps that have stabilized into a fixed procedure (search, filter, dedupe, format) into plain code, reserving model calls only for the genuinely semantic steps.

Advanced 2 min Unlock →
⚙️Batching & Automation 🔒 Pro

Collapse Many Tiny Calls into One Structured Request

Ten one-item calls re-send your instructions ten times. Batch the items into a single request with a structured-output schema and pay the overhead once.

Advanced 2 min Unlock →
⚙️Batching & Automation 🔒 Pro

Record a Successful Agent Run Once, Then Replay the Tool Trace With Zero Inference

A scheduled agent re-plans the same fixed workflow every run, paying the model to re-decide a tool sequence it already decided. Record the trace of one successful run, template the params that vary, and replay the steps deterministically without calling the LLM.

Advanced 2 min Unlock →
⚙️Batching & Automation 🔒 Pro

Run the open-ended search phase last, over a frozen list of claims

Putting the unbounded research step first lets agents fan out over open questions and mint work faster than the pipeline can retire it — one team burned a full monthly allowance in 30 minutes and shipped nothing. Move it last, after a bounded step has produced a finite claim list, so your agent count is known before you spend rather than discovered when the budget dies.

Advanced 5 min Unlock →
⚙️Batching & Automation 🔒 Pro

Make "Nothing To Do" Cost Zero Tokens: Terminal Dispositions and Idempotent Wake IDs

A cron-woken agent that loads its whole context before discovering there is no work pays full price to conclude nothing happened — and if the run never records a terminal outcome, the scheduler wakes it again. Answer both questions deterministically, before any model call.

Advanced 6 min Unlock →
⚙️Batching & Automation 🔒 Pro

Wake the Agent on a File Cursor, Not on a Heartbeat

Anything that isn't a directly pushed message — cron output, log lines, inbox changes, external feeds — is only noticed at heartbeat granularity, and every heartbeat burns a full LLM turn even when nothing happened. Hold byte-offset cursors on the plaintext files those sources already write, wake the agent only on an actual append, and coalesce bursts into one turn. A polling loop's cost scales with wall-clock time; an event loop's cost scales with real events.

Advanced 7 min Unlock →

Like what you see?

Get a fresh one in your inbox — weekly free, daily on Pro.