Installation
The Sudo SDK is available for both Python and TypeScript/JavaScript. Choose your preferred language and package manager below.Python: Requires Python 3.9 or later
TypeScript/JavaScript: Requires Node.js 14+ and supports both CommonJS and ES Modules
TypeScript/JavaScript: Requires Node.js 14+ and supports both CommonJS and ES Modules
Authentication
The SDK uses API key authentication. You can obtain your API key from the Sudo Developer Portal.Environment Variable (Recommended)
Set your API key as an environment variable:TypeScript
Direct Configuration
Alternatively, you can pass the API key directly:TypeScript
Basic Configuration
Server URL
By default, the SDK points to the production Sudo API. You can customize this:TypeScript
Retry Configuration
Configure retry behavior for failed requests:TypeScript
Custom HTTP Client
For advanced use cases, you can provide a custom HTTP client:TypeScript
Async Support
Both SDKs support asynchronous operations:Async/Await
TypeScript
Synchronous Usage (Python Only)
Error Handling
Both SDKs provide comprehensive error handling:TypeScript
Debugging
Enable debug logging to troubleshoot issues:Using Environment Variable
Language-Specific Debug Configuration
TypeScript
IDE Support
VS Code
Both SDKs work well with VS Code out of the box. For enhanced type checking: TypeScript:Other IDEs
PyCharm (Python):- Install the PyCharm Pydantic Plugin
- Enable Pydantic support in project settings
- TypeScript support is built-in
- Enable TypeScript language service
Next Steps
Now that you have the SDK installed and configured:- Try System Endpoints - Test your setup with health checks
- Create AI Responses - Start building AI-powered features
- Explore Streaming - Add real-time capabilities
Both SDKs follow semantic versioning. Pin to a specific version in production to ensure stability:Python:TypeScript: