Python client library for the Portkey API - Control Panel for AI Apps with unified API signature, automated fallbacks, retries, load balancing, semantic caching, virtual keys, and comprehensive observability features.
—
Batch API for processing large volumes of requests efficiently with cost optimization and result management.
class Batches:
def create(self, **kwargs): ...
def list(self, **kwargs): ...
def retrieve(self, **kwargs): ...
def cancel(self, **kwargs): ...# Create batch job
batch = portkey.batches.create(
input_file_id="file-123",
endpoint="/v1/chat/completions",
completion_window="24h"
)
# Check batch status
batch_status = portkey.batches.retrieve(batch.id)Install with Tessl CLI
npx tessl i tessl/pypi-portkey-aidocs