doubleword-batches
БесплатноЗапускает вложенные скриптыНе проверенCreate and manage batch inference jobs using the Doubleword API (api.doubleword.ai). Use when users want to: (1) Process multiple AI requests in batch mode…
от lxyeternal★ 68 звёзд на GitHubОб этом скилле
Doubleword Batch Inference
Process multiple AI inference requests asynchronously using the Doubleword batch API with high throughput and low cost.
Prerequisites
Before submitting batches, you need:
- Doubleword Account - Sign up at https://app.doubleword.ai/
- API Key - Create one in the API Keys section of your dashboard
- Account Credits - Add credits to process requests (see pricing below)
When to Use Batches
Batches are ideal for:
- Multiple independent requests that can run simultaneously
- Workloads that don't require immediate responses
- Large volumes that would exceed rate limits if sent individually
- Cost-sensitive workloads (24h window = 50-60% cheaper than realtime)
- Tool calling and structured output generation at scale
Available Models & Pricing
Pricing is per 1 million tokens (input / output):
Qwen3-VL-30B-A3B-Instruct-FP8 (mid-size):
- Realtime SLA: $0.16 / $0.80
- 1-hour SLA: $0.07 / $0.30 (56% cheaper)
- 24-hour SLA: $0.05 / $0.20 (69% cheaper)
Qwen3-VL-235B-A22B-Instruct-FP8 (flagship):
- Realtime SLA: $0.60 / $1.20
- 1-hour SLA: $0.15 / $0.55 (75% cheaper)
- 24-hour SLA: $0.10 / $0.40 (83% cheaper)
- Supports up to 262K total tokens, 16K new tokens per request
Cost estimation: Upload files to the Doubleword Console to preview expenses before submitting.
Quick Start
Two ways to submit batches:
Via API:
- Create JSONL file with requests
- Upload file to get file ID
- Create batch using file ID
- Poll status until complete
- Download results from output_file_id
Via Web Console:
- Navigate to Batches section at https://app.doubleword.ai/
- Upload JSONL file
- Configure batch settings (model, completion window)
- Monitor progress in real-time dashboard
- Download results when ready
Workflow
Step 1: Create Batch Request File
Create a .jsonl file where each line contains a complete, valid JSON object with no line breaks within the object:
{"custom_id": "req-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "anthropic/claude-3-5-sonnet", "messages": [{"role": "user", "content": "What is 2+2?"}]}}
{"custom_id": "req-2", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "anthropic/claude-3-5-sonnet", "messages": [{"role": "user", "content": "What is the capital of France?"}]}}
Required fields per line:
custom_id: Unique identifier (max 64 chars) - use descriptive IDs like"user-123-question-5"for easier result mappingmethod: Always"POST"url: API endpoint -"/v1/chat/completions"or"/v1/embeddings"body: Standard API request withmodelandmessages
Optional body parameters:
temperature: 0-2 (default: 1.0)max_tokens: Maximum response tokenstop_p: Nucleus sampling parameterstop: Stop sequencestools: Tool definitions for tool calling (see Tool Calling section)response_format: JSON schema for structured outputs (see Structured Outputs section)
File requirements:
- Max size: 200MB
- Format: JSONL only (JSON Lines - newline-delimited JSON)
- Each line must be valid JSON with no internal line breaks
- No duplicate
custom_idvalues - Split large batches into multiple files if needed
Common pitfalls:
- Line breaks within JSON objects (will cause parsing errors)
- Invalid JSON syntax
- Duplicate
custom_idvalues
Helper script:
Use scripts/create_batch_file.py to generate JSONL files programmatically:
python scripts/create_batch_file.py output.jsonl
Modify the script's requests list to generate your specific batch requests.
Step 2: Upload File
Via API:
curl https://api.doubleword.ai/v1/files \
-H "Authorization: Bearer $DOUBLEWORD_API_KEY" \
-F purpose="batch" \
-F file="@batch_requests.jsonl"
Via Console: Upload through the Batches section at https://app.doubleword.ai/
Response contains id field - save this file ID for next step.
Step 3: Create Batch
Via API:
curl https://api.doubleword.ai/v1/batches \
-H "Authorization: Bearer $DOUBLEWORD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_file_id": "file-abc123",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}'
Via Console: Configure batch settings in the web interface.
Parameters:
input_file_id: File ID from upload stependpoint: API endpoint ("/v1/chat/completions"or"/v1/embeddings")completion_window: Choose based on urgency and budget:"24h": Best pricing, results within 24 hours (typically faster)"1h": 50% price premium, results within 1 hour (typically faster)- Realtime: Limited capacity, highest cost (batch service optimized for async)
Response contains batch id - save this for status polling.
Before submitting, verify:
- You have access to the specified model
- Your API key is active
- You have sufficient account credits
Step 4: Poll Status
**Via
Установить doubleword-batches в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл doubleword-batches?
Create and manage batch inference jobs using the Doubleword API (api.doubleword.ai). Use when users want to: (1) Process multiple AI requests in batch mode, (2) Submit JSONL batch files for async inference, (3) Monitor batch job progress and retrieve results, (4) Work with OpenAI-compatible batch endpoints, (5) Handle large-scale inference workloads that don't require immediate responses, (6) Use tool calling or structured outputs in batches, (7) Automatically batch API calls with autobatcher.
Как установить скилл doubleword-batches?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл doubleword-batches запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic