Authentication
All API requests require authentication using an API key.
Getting an API Key
Section titled “Getting an API Key”- Sign up at console.solidrust.ai
- Navigate to API Keys in the dashboard
- Click Create New Key
- Copy and securely store your API key
Using Your API Key
Section titled “Using Your API Key”Include your API key in request headers. Two formats are supported:
X-API-Key Header (Recommended)
Section titled “X-API-Key Header (Recommended)”X-API-Key: YOUR_API_KEYcurl https://api.solidrust.ai/v1/chat/completions \ -H "X-API-Key: sk_live_abc123..." \ -H "Content-Type: application/json" \ -d '{"model": "vllm-primary", "messages": [{"role": "user", "content": "Hi"}]}'Authorization Bearer (OpenAI SDK Compatible)
Section titled “Authorization Bearer (OpenAI SDK Compatible)”For compatibility with OpenAI SDKs:
Authorization: Bearer YOUR_API_KEYcurl https://api.solidrust.ai/v1/chat/completions \ -H "Authorization: Bearer sk_live_abc123..." \ -H "Content-Type: application/json" \ -d '{"model": "vllm-primary", "messages": [{"role": "user", "content": "Hi"}]}'API Key Security
Section titled “API Key Security”Environment Variables
Section titled “Environment Variables”Python:
import osfrom openai import OpenAI
client = OpenAI( api_key=os.environ.get("SOLIDRUST_API_KEY"), base_url="https://api.solidrust.ai/v1")Node.js:
const client = new OpenAI({ apiKey: process.env.SOLIDRUST_API_KEY, baseURL: 'https://api.solidrust.ai/v1',});Rate Limits
Section titled “Rate Limits”API keys have rate limits based on your subscription tier. See Rate Limits for details.
Next Steps
Section titled “Next Steps”- API Overview - Explore available endpoints
- Python SDK - Use our official SDK