Quick start
Getting Started with the Parasail Batch Helper Library
pip install openai-batch#test_batch.py
import random
from openai_batch import Batch
# Create a batch with random prompts
with Batch() as batch:
objects = ["cat", "robot", "coffee mug", "spaceship", "banana"]
for i in range(100):
batch.add_to_batch(
model="NousResearch/DeepHermes-3-Mistral-24B-Preview",
messages=[{"role": "user", "content": f"Tell me a joke about a {random.choice(objects)}"}]
)
# Submit, wait for completion, and download results
result, output_path, error_path = batch.submit_wait_download()
print(f"Batch completed with status {result.status} and stored in {output_path}")Batch Submission Limitations
Resuming Batch Jobs
Broad Model and Parameter Support
Embedding Models
Parasail Batch UI



Last updated
