
Skill
together-batch-inference
run asynchronous batch inference jobs
Description
High-volume, asynchronous offline inference at up to 50% lower cost via Together AI's Batch API. Prepare JSONL inputs, upload files, create jobs, poll status, and download outputs. Reach for it whenever the user needs non-interactive bulk inference rather than real-time chat or evaluation jobs.
SKILL.md
Together Batch Inference
Overview
Use Together AI's Batch API for large offline workloads where latency is not the primary concern.
Typical fits:
- bulk classification
- synthetic data generation
- dataset transformations
- large summarization or enrichment jobs
- low-cost asynchronous inference
When This Skill Wins
- The user has many independent requests to run
- A JSONL request file is acceptable
- Turnaround time can be minutes or hours instead of seconds
- Lower cost matters more than immediate interactivity
Hand Off To Another Skill
- Use
together-chat-completionsfor real-time requests or tool-calling apps - Use
together-evaluationsfor managed LLM-as-a-judge workflows - Use
together-embeddingsfor retrieval-specific vector generation
Quick Routing
- End-to-end batch workflow
- Start with scripts/batch_workflow.py or scripts/batch_workflow.ts
- Request format, status model, and result downloads
- Operational guidance and batch sizing
Workflow
- Build a JSONL file where each line contains
custom_idandbody. - Upload the file with
purpose="batch-api". - Create the batch with
input_file_id=...and the target endpoint. - Poll until the job is terminal.
- Download output and error files, then reconcile by
custom_id.
High-Signal Rules
- Python scripts require the Together v2 SDK (
together>=2.0.0). If the user is on an older version, they must upgrade first:uv pip install --upgrade "together>=2.0.0". - Use
input_file_id, not legacy file parameters. - Keep
custom_idstable and meaningful so result reconciliation is easy. - Batch is for independent requests. If the workload depends on shared conversation state, it is probably the wrong tool.
- Always inspect the error file in addition to the success output.
client.batches.create()returns a wrapper; access the batch object viaresponse.job(e.g.,response.job.id).client.batches.retrieve()returns the batch object directly.- For classification or labeling workloads, set
max_tokenslow (e.g., 4), usetemperature: 0, and constrain the system prompt to return only the label. This minimizes output tokens and cost. - Small batches (under 1K requests) typically complete in minutes. The 24-hour completion window is a maximum, not typical.
Resource Map
- API reference and operational guidance: references/api-reference.md
- Python workflow: scripts/batch_workflow.py
- TypeScript workflow: scripts/batch_workflow.ts
Official Docs
More skills from the skills repository
View all 14 skillstogether-audio
process audio with Together AI
Jul 26AudioSpeechText-to-SpeechTranscriptiontogether-chat-completions
generate text with Together AI
Jul 26AIAPI DevelopmentLLMtogether-dedicated-containers
deploy custom inference containers on Together AI
Jul 26AI InfrastructureDeploymentDockerMachine Learningtogether-dedicated-model-inference
deploy and operate Together AI models
Jul 26AI InfrastructureDeploymentLLMtogether-embeddings
generate embeddings and build RAG pipelines
Jul 26AILLMRAGSearchtogether-evaluations
evaluate LLM outputs with Together AI
Jul 26BenchmarkingEvalsLLM
More from Together AI
View publisherblog-post
write structured blog posts
together-cookbook
Jul 17Content CreationMarketingSEOWritingsocial-media
create social media content
together-cookbook
Jul 17Content CreationMarketingSocial MediaWritingtogether-fine-tuning
fine-tune and adapt models on Together AI
skills
Jul 26AILLMMachine Learningtogether-gpu-clusters
orchestrate GPU clusters on Together AI
skills
Jul 26AI InfrastructureCloudKubernetesMachine Learningtogether-images
generate and edit images with Together AI
skills
Jul 17CreativeDesignImage GenerationMultimodal