Looking for your API key? Get it from the YouRouter Dashboard.
Using the OpenAI SDK
The easiest way to get started is with the official OpenAI SDKs. Simply set the base URL to the YouRouter API endpoint.- Python
- Node.js
Generate text with responses
(OpenAI only)
The responses
endpoint lets you request a single text completion. This method
is currently available only via the OpenAI SDK.
Using the YouRouter API directly
You can also make direct HTTP requests to the YouRouter API using any HTTP client.- cURL
- Python (requests)
- JavaScript (fetch)
Environment Setup
For production applications, we recommend storing your API key as an environment variable:- macOS/Linux
- Windows
- Python (.env)
Billing and Our Refund Promise
YouRouter operates on a prepaid balance model, giving you full control over your spending.Our Commitment to Your Flexibility
We understand that plans can change. That’s why we offer a straightforward and hassle-free refund policy. Your unused balance is always yours. If you decide to stop using our service for any reason, you can request a full refund of your remaining balance directly through the platform. We’ll process it back to your original payment method, no questions asked. Our goal is to give you the confidence and peace of mind to innovate without risk. For more details, see the Rate Limits & Refunds guide and our Zero Completion Insurance policy.Next Steps
Chat Completions
Learn how to build conversational AI applications.
Embeddings
Create vector representations of text for search and analysis.
API Reference
Explore the complete API documentation.
Authentication
Learn about API key management and security best practices.
Need help? Check out our API Reference for detailed documentation.