SDK Overview
What is SDK
Section titled “What is SDK”R9S SDK is a comprehensive client library for interacting with R9S APIs, supporting multiple programming languages.
Supported Languages
Section titled “Supported Languages”Currently supports the following programming languages:
- Python - Complete async and sync support with type hints
- JavaScript/TypeScript - Node.js and browser environment support
- Go - High-performance Go client with concurrency support
- Java - Enterprise-level Java client with Spring integration
Features
Section titled “Features”- ✅ Automatic authentication and error handling
- ✅ Async and streaming response support
- ✅ Type-safe API calls with full IntelliSense
- ✅ Complete documentation and examples
- ✅ Smart retry and fallback strategies
- ✅ Built-in logging and monitoring
- ✅ Request/response interceptors
- ✅ File upload/download management
Installation
Section titled “Installation”Python
Section titled “Python”pip install r9sJavaScript
Section titled “JavaScript”npm install r9sgo get github.com/edgefn/r9s-go<dependency> <groupId>com.edgefn</groupId> <artifactId>r9s-sdk</artifactId> <version>1.0.0</version></dependency>Quick Start
Section titled “Quick Start”Check the example usage in each module below to get started quickly:
Available SDK Modules
Section titled “Available SDK Modules”- Audio - SDK operations for audio
- Chat - SDK operations for chat
- Completions - SDK operations for completions
- Edits - SDK operations for edits
- Embeddings - SDK operations for embeddings
- EngineEmbeddings - SDK operations for engineembeddings
- Images - SDK operations for images
- Messages - SDK operations for messages
- Models - SDK operations for models
- Moderations - SDK operations for moderations
- Proxy - SDK operations for proxy
- Responses - SDK operations for responses
- Search - SDK operations for search
Basic Usage Pattern
Section titled “Basic Usage Pattern”All SDK modules follow a consistent pattern:
Python
Section titled “Python”from r9s import R9S
# Initialize clientwith R9S(api_key="your-api-key") as client: # Use any SDK module result = client.chat.create( model="gpt-4o-mini", messages=[{"role": "user", "content": "Hello!"}] )JavaScript
Section titled “JavaScript”import { R9S } from 'r9s';
// Initialize clientconst client = new R9S({ apiKey: 'your-api-key' });
// Use any SDK moduleconst result = await client.chat.create({ model: 'gpt-4o-mini', messages: [{ role: 'user', content: 'Hello!' }]});API Reference
Section titled “API Reference”For detailed API reference documentation, see:
- API Overview - Learn API basics and authentication
- Chat APIs - Chat completion and message APIs
- Model APIs - Model listing and details
- Audio APIs - Text-to-speech and transcription
- Images APIs - Image generation
Example Code
Section titled “Example Code”See complete example code for each language:
Contributing
Section titled “Contributing”Issues and Pull Requests are welcome to improve the SDK!
Contact Us
Section titled “Contact Us”For questions or suggestions, please contact our technical support team.