/batch-inference:anthropic-batchfrom batch-inference
Run a bulk job through the Anthropic Message Batches API — Claude Haiku 5.5 by default, half price, usually done in minutes — from a JSONL file of prompts, with structured JSON output, a cached system prompt, resume-by-batch-id and cost logging. The default lane for batch work. Use when the user says "Anthropic batch", "Haiku batch", "batch this with Haiku", "run it on the Batches API", or batch-defaults routes here.
Ships in batch-inference. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Script: scripts/anthropic_batch.py (see batch-defaults § Scripts for the path when
${CLAUDE_PLUGIN_ROOT} is unset). Needs the anthropic SDK, so run it with uv run --with anthropic.
uv run -q --with anthropic python anthropic_batch.py in.jsonl out.jsonl \
--usage-log data/llm-usage.jsonl
# through an Anthropic-compatible proxy with a per-project key
uv run -q --with anthropic python anthropic_batch.py in.jsonl out.jsonl \
--base-url https://proxy.example/anthropic --api-key-env MY_PROJECT_KEY
Options: --model claude-sonnet-5-5 (escalate only on visible Haiku failure), --effort low|medium|high
(default low), --max-tokens (default 4000; thinking tokens count against it),
--resume msgbatch_… (collect without resubmitting; the id prints on submit), --poll seconds.
Input and output formats are in batch-defaults. Rows that fail come back as
{"id", "error"}, e.g. errored, expired, or stop_reason=max_tokens. Resubmit only those
rows.
ANTHROPIC_API_KEY for direct calls. A project that runs repeatedly can use a proxy with its own
budgeted key (--base-url, --api-key-env) so spend is attributed to it.
{proxy}/v1/messages/batches/{id}/results. The SDK's batches.results() follows an absolute
api.anthropic.com URL and 401s through a proxy, so the script fetches results itself on both routes.cache_control goes on the system block. Top-level automatic caching marks the per-item
user message, so every request writes a cache entry and none reads one. That mistake cost a
4.3M-token cache-write run on 2026-10-20.output_tokens.anthropic/claude-haiku-5.5 on the OpenRouter Batch API costs the same (0.05/0.25) and works.
A 5,104-request run on 2026-10-17 cost US$0.50. Prefer the direct API: it supports
output_config structured outputs and prompt caching natively, and the bill lands on the
Anthropic account. Use OpenRouter only if the Anthropic key or credit is unavailable.
What SKILL.md sets; muted values are Claude Code's defaults
batch-inference@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin batch-inference16 skills in this plugin
/batch-defaultsPick the model, provider and lane for any bulk or batch LLM job (labelling, classification, extraction, synthetic data, summarising hundreds or thousands of items). Defaults: Claude Haiku 5.5 on the Anthropic Batches API for judgement work, Hy4 Flash on parallel sync for short generation, DeepSeek V4.1 Flash for other cheap volume (batch or sync, whichever costs less today), OpenRouter Batch API for other named models; the user's own defaults file overrides these. Use first whenever the user says "batch this", "run it as a batch job", "bulk job", "use Haiku", "cheapest batch possible", "do it with DeepSeek", or a task needs one LLM call per item over many items./batch-research-checkRead the research notebook before choosing a provider, model or lane for a bulk/batch LLM job, or before quoting a batch price — per-task screening tables (which model was picked for a task type and why), dated verdicts (use / avoid / watch), the latest price per provider and model, provider gotchas, and records of past runs with their measured cost. Use when planning any batch job, when the user asks "what's the cheapest/best way to batch this", "which batch provider", "what did that cost last time", or before estimating spend for a bulk run.Other plugins' skills for the same job