Python SDK — Usage
Python SDK — Usage
Construction
Client lifecycle
Construct the client once and reuse it for the lifetime of your process — it holds an underlying httpx connection pool. The generated client is not a context manager (no with / async with); just build it and use it.
Note the async pager pattern: list() on the async client is a coroutine that returns an AsyncPager, so await the call first, then async for over the result.
Workflows
Voices
Templates
Uploads
Uploads use a three-step presigned URL flow: create → PUT bytes to S3 → confirm.
Categories: category must be "script" (.txt, .docx) or "dictionary" (.csv). Audio file upload uses a separate endpoint not available via API key.
Pagination
Every list() call returns a pager that you iterate directly. Pages are fetched automatically as you consume them — there is no separate page object, no offset cursor to track manually, and no helper method needed.
Use the offset and limit parameters to start from a known position:
Single-object responses (from get(), runs.get(), runs.status(), voices.get(), etc.) are envelopes with a .data attribute holding the object and a .meta attribute with request metadata.
Error handling
See Errors for the full exception hierarchy and retry patterns.

