API Reference
Complete reference for the Super Agent Stack API endpoints.
Base URL
text
https://superagentstack.orionixtech.com/api/v1All API requests should be made to this base URL.
Authentication
Super Agent Stack uses two API keys for authentication:
- OpenRouter API Key - Passed in the Authorization header
- Super Agent Key - Passed in the superAgentKey header
typescript
const client = new OpenAI({
baseURL: 'https://superagentstack.orionixtech.com/api/v1',
apiKey: process.env.OPENROUTER_KEY, // OpenRouter key
defaultHeaders: {
'superAgentKey': process.env.SUPER_AGENT_KEY, // Super Agent key
},
});Chat Completions
Create a chat completion with RAG-enhanced responses.
Endpoint
text
POST /chat/completionsRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model to use (e.g., anthropic/claude-3-sonnet) |
messages | array | Yes | Array of message objects |
stream | boolean | No | Enable streaming responses |
temperature | number | No | Sampling temperature (0-2) |
max_tokens | number | No | Maximum tokens to generate |
Example Request
example.ts
const completion = await client.chat.completions.create({
model: 'anthropic/claude-3-sonnet',
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'What is RAG?' }
],
temperature: 0.7,
max_tokens: 1000
});Example Response
json
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"model": "anthropic/claude-3-sonnet",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "RAG stands for Retrieval Augmented Generation..."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 20,
"completion_tokens": 100,
"total_tokens": 120
}
}Available Models
Super Agent Stack supports 100+ models through OpenRouter:
openai/gpt-5- GPT-5openai/gpt-5-mini- GPT-5 Miniopenai/gpt-5-nano- GPT-5 Nanoanthropic/claude-sonnet-4.5- Claude Sonnet 4.5anthropic/claude-opus-4-1- Claude Opus 4.1anthropic/claude-3.5-haiku- Claude 3.5 Haikugoogle/gemini-2.5-flash- Gemini 2.5 Flashgoogle/gemini-2.5-pro- Gemini 2.5 Prometa-llama/llama-4-scout- Llama 4 Scoutmeta-llama/llama-4-maverick- Llama 4 Maverick =
Visit OpenRouter Models for the complete list of available models.
Error Codes
| Code | Description |
|---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid API keys |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Rate Limits
Rate limits vary by plan:
- Free: 10 requests/min
- Pro: 100 requests/min
- Premium: 500 requests/min
- Enterprise: 1000 requests/min