स्वायत्त एजेंट के लिए
कोड से बैच का पूरा जीवनचक्र चलाएँ
HTTP जीवनचक्र
चरण 1 API कुंजी पाएँ
साइन अप अभी खुला नहीं है। पहले से खाता रखने वाला व्यक्ति Account → API keys में कुंजी बनाता है (br_live_ से शुरू, केवल एक बार दिखती है) और उसे एजेंट को देता है, जो उसे BATCHROUTER_API_KEY के रूप में रखता है।
चरण 2 अनुमान लगाएँ और भेजें
अनुमान बनाएँ, फिर उसी quote_id से भेजें।
अनुमान लगाएँ और भेजें का उदाहरणcurl -X POST https://api.batchrouter.com/v1/quotes/model \ -H "Authorization: Bearer br_live_<key>" \ -H "Content-Type: application/json" \ -d '{"items":[{"customer_item_id":"agent-1","operation":"chat.completions","model":"gpt-5-4-mini","input":{"messages":[{"role":"user","content":"Summarize this."}]}}],"routing_mode":"cheapest","privacy_tier":"standard"}' curl -X POST https://api.batchrouter.com/v1/batches \ -H "Authorization: Bearer br_live_<key>" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: agent-batch-001" \ -d '{"quote_id":"qlock_...","items":[{"customer_item_id":"agent-1","operation":"chat.completions","model":"gpt-5-4-mini","input":{"messages":[{"role":"user","content":"Summarize this."}]}}],"routing_mode":"cheapest","privacy_tier":"standard"}'चरण 3 परिणाम लें
वेबहुक लें या बैच एंडपॉइंट पोल करें।
परिणाम लें का उदाहरणPOST https://your-endpoint.example.com/hook { "event": "batch.completed", "batch_id": "bat_...", "output_file_url": "https://...", "error_file_url": null }
खाते के सत्र और API कुंजियाँ
सत्र के ज़रिए कुंजियाँ प्रबंधित करने के लिए खाते में साइन इन करें। प्रोग्राम से उपयोग होने वाली Batchrouter API कुंजियाँ संगठन के दायरे वाली अलग क्रेडेंशियल हैं।
ऐप से एक कुंजी। फिर बस HTTP।
एक ही असिंक्रोनस व्यवस्था: अनुमान लगाएँ, भेजें और webhook पाएँ।