SDKs
PolarGrid provides official SDKs to make integration easy.JavaScript
For Node.js and browser applications
Python
Async and sync clients with full type hints
CLI
Command-line interface for scripting and CI/CD
Installation
Features
All SDKs include:| Feature | JS | Python | CLI |
|---|---|---|---|
| Chat completions | ✅ | ✅ | ✅ |
| Text completions | ✅ | ✅ | — |
| Streaming | ✅ | ✅ | — |
| Text-to-Speech | ✅ | ✅ | — |
| Speech-to-Text | ✅ | ✅ | — |
| Model management | ✅ | ✅ | — |
| GPU management | ✅ | ✅ | — |
| Auto-routing | ✅ | ✅ | ✅ |
| Mock mode | ✅ | ✅ | — |
| Full TypeScript/Pydantic types | ✅ | ✅ | — |
| Async | ✅ | ✅ | — |
| Sync | — | ✅ | ✅ |
Quick Example
Authentication
All SDKs support these authentication methods:- Constructor parameter: Pass
apiKey/api_keydirectly - Environment variable: Set
POLARGRID_API_KEY
