API Reference

Complete reference for the Super Agent Stack API endpoints.

Base URL

text
https://superagentstack.orionixtech.com/api/v1

All 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/completions

Request Body

ParameterTypeRequiredDescription
modelstringYesModel to use (e.g., anthropic/claude-3-sonnet)
messagesarrayYesArray of message objects
streambooleanNoEnable streaming responses
temperaturenumberNoSampling temperature (0-2)
max_tokensnumberNoMaximum 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-5
  • openai/gpt-5-mini - GPT-5 Mini
  • openai/gpt-5-nano - GPT-5 Nano
  • anthropic/claude-sonnet-4.5 - Claude Sonnet 4.5
  • anthropic/claude-opus-4-1 - Claude Opus 4.1
  • anthropic/claude-3.5-haiku - Claude 3.5 Haiku
  • google/gemini-2.5-flash - Gemini 2.5 Flash
  • google/gemini-2.5-pro - Gemini 2.5 Pro
  • meta-llama/llama-4-scout - Llama 4 Scout
  • meta-llama/llama-4-maverick - Llama 4 Maverick
  • =
Visit OpenRouter Models for the complete list of available models.

Error Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid API keys
429Too Many Requests - Rate limit exceeded
500Internal 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