API Documentation
Introduction
Routstr API Reference Documentation
Routstr API Reference
Welcome to the Routstr API documentation. Our API enables you to access AI models through a proxy service to OpenRouter.ai, with integrated wallet functionality for payments using Cashu tokens.
Authentication
All API requests require authentication using bearer tokens. These tokens are Cashu tokens which contain pre-paid credits.
API Compatibility
Our API is a 1:1 proxy to OpenRouter.ai, which itself is compatible with OpenAI’s API format, making it easy to switch between providers.
API Endpoints
The Routstr API consists of several core endpoints:
Core Endpoints
- Proxy Endpoints (
/{path}
): All HTTP methods (GET, POST, PUT, DELETE, etc.) are supported for proxying requests to the underlying OpenRouter.ai API.
Wallet Endpoints
- Account Info (
/v1/wallet/
): Get information about your account and remaining balance. - Topup Balance (
/v1/wallet/topup
): Add funds to your account using Cashu tokens. - Refund Balance (
/v1/wallet/refund
): Withdraw your remaining balance as a Cashu token.
Example: Account Information
Example: Adding Funds to Your Account
OpenAPI Specification
For developers who prefer to use the OpenAPI specification, you can access our OpenAPI document here.