@saturn-pay/sdk package provides a type-safe interface to the Saturn API.
Installation
Quick Start
Configuration
Environment Variables
Capabilities
All capabilities return{ data, metadata }:
Available Methods
| Method | Description |
|---|---|
saturn.reason() | LLM inference |
saturn.search() | Web search |
saturn.read() | URL to clean text |
saturn.scrape() | URL to structured HTML |
saturn.execute() | Sandboxed code execution |
saturn.imagine() | Image generation |
saturn.speak() | Text to speech |
saturn.transcribe() | Speech to text |
saturn.email() | Send email |
saturn.sms() | Send SMS |
Direct Service Calls
For services not mapped to a capability:Resource Management
Wallet
Agents
Policies
Services Catalog
TypeScript Types
The SDK is fully typed. Import types as needed:Error Handling
See Error Handling for detailed error handling patterns.Best Practices
Use environment variables for keys
Use environment variables for keys
Never hardcode API keys in source code.
Handle errors gracefully
Handle errors gracefully
Always catch and handle Saturn-specific errors.
Check balance before operations
Check balance before operations
For critical workflows, verify balance first.
Use typed responses
Use typed responses
Leverage TypeScript for type safety.