← ClaudeAtlas

claude-batchlisted

Processing large volumes of prompts (10 or more), non-time-sensitive workloads, or when the user wants to reduce API costs for bulk operations like document processing, evaluations, or dataset annotat
Claudient/Claudient · ★ 4 · AI & Automation · score 65
Install: claude install-skill Claudient/Claudient
# Claude Batch ## When to activate Processing large volumes of prompts (10 or more), non-time-sensitive workloads, or when the user wants to reduce API costs for bulk operations like document processing, evaluations, or dataset annotation. ## When NOT to use - Real-time or latency-sensitive applications — batch processing takes up to 24 hours - Workflows where each result must feed the next request — use synchronous streaming instead - Fewer than 10 requests — synchronous API overhead is negligible at that scale ## Instructions ### Batch API Overview - Submit up to 10,000 requests per batch - 50% cost discount vs synchronous Messages API - Processing completes within 24 hours (usually much faster for small batches) - Results delivered as a JSONL stream when processing completes - Failed individual requests do not fail the batch ### Request Format Each item in the batch has: - `custom_id`: your identifier — used to match results back to inputs - `params`: standard Messages API parameters (model, max_tokens, messages, system, tools, etc.) ```python import anthropic client = anthropic.Anthropic() requests = [ { "custom_id": f"doc-{i}", "params": { "model": "claude-opus-4-5", "max_tokens": 1024, "messages": [ {"role": "user", "content": f"Summarize this document: {doc}"} ], }, } for i, doc in enumerate(documents) ] ``` ### Submitting a Batch ```python batch = client.messag