Skip to main content

Python SDK

Official Python SDK for the Truedy API.

Installation

Quick Start

Authentication

Agents

Calls

Error Handling

Handle 402 Payment Required (trial not started, trial expired, insufficient credits) and 429 Rate limit exceeded explicitly:
All API errors use the same envelope: error.code, error.message, error.details, and meta.request_id (for support).

Rate limits and retries

The API uses per-minute rate limits. Responses do not include X-RateLimit-* headers; on 429 the body includes error.details.limit and error.details.reset_at (ISO timestamp). The SDK should retry after reset_at or use exponential backoff. See Rate Limits.

Minimal client (requests only)

If you prefer not to use the SDK, use requests with the same error handling:

Examples

See the GitHub repository for more examples.