Overview
Retell provides official SDKs for Node.js and Python to simplify integration with our platform. While you can use our REST API directly, our SDKs offer:- Type safety: Full TypeScript support with autocomplete
- Simplified authentication: Built-in API key handling
- Error handling: Structured error responses with detailed messages
- Reduced boilerplate: Cleaner, more maintainable code
Available SDKs & Requirements
Node.js TypeScript SDK
- Package: retell-sdk on NPM
- Requirements: Node.js version 18.10.0 or higher
- Features: Full TypeScript support, async/await, promise-based API
Python SDK
- Package: retell-sdk on PyPI
- Requirements: Python 3.9 or higher
- Features: Type hints, async support, comprehensive error handling
SDK vs REST API Comparison
To illustrate the benefits of using our SDK, here’s a comparison of creating an agent using both methods:Using REST API (More Verbose)
Using SDK (More Concise)
Best Practices
1. Error Handling
Always wrap SDK calls in try-catch blocks to handle potential errors gracefully:2. Environment Variables
Store your API key securely using environment variables:3. Type Safety
Leverage TypeScript types for better developer experience:Rate Limits
Limits apply per organization + route, enforced at the HTTP layer.| Endpoint group | Limit |
|---|---|
| Call creation | 1000 / 10s, plus 60 4xx errors / min |
List endpoints (list-*, batch-get-*) | 15 / 10s |
| All other SDK endpoints (get / create / update / delete) | 100 / 10s |
| LLM / agent playground completions | 8 / 2s |
429 Response
X-RateLimit-Limiter identifies which limiter fired: general, list, call, call-error, or llm-playground.
Handling 429s
- Use
RateLimit-Reset(seconds) for backoff; retry with jittered exponential backoff. - Don’t parallelize
list-*calls — the per-route budget is small. - For high call volume, design around CPS rather than HTTP throughput.
