Quick Start
Get started with Super Agent Stack in less than 5 minutes.
Prerequisites
Before you begin, make sure you have:
- Node.js 18+ or Python 3.8+ installed
- An OpenRouter API key
- A Super Agent Stack account
Step 1: Get Your API Keys
OpenRouter API Key
- Visit openrouter.ai
- Sign up or log in to your account
- Navigate to API Keys section
- Create a new API key
Super Agent Stack Key
- Sign up at Super Agent Stack
- Go to your dashboard
- Navigate to API Keys
- Generate a new key
Step 2: Installation
TypeScript/JavaScript
bash
npm install openaiPython
bash
pip install openaiStep 3: Make Your First Request
TypeScript/JavaScript
index.ts
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://superagentstack.orionixtech.com/api/v1',
apiKey: process.env.OPENROUTER_KEY,
defaultHeaders: {
'superAgentKey': process.env.SUPER_AGENT_KEY,
},
});
async function main() {
const completion = await client.chat.completions.create({
model: 'anthropic/claude-3-sonnet',
messages: [
{
role: 'user',
content: 'Hello! Can you remember my name is John?'
}
],
});
console.log(completion.choices[0].message.content);
}
main();Python
main.py
from openai import OpenAI
import os
client = OpenAI(
base_url="https://superagentstack.orionixtech.com/api/v1",
api_key=os.environ.get("OPENROUTER_KEY"),
default_headers={
"superAgentKey": os.environ.get("SUPER_AGENT_KEY"),
}
)
completion = client.chat.completions.create(
model="anthropic/claude-3-sonnet",
messages=[
{
"role": "user",
"content": "Hello! Can you remember my name is John?"
}
]
)
print(completion.choices[0].message.content)Success!
You've made your first request! The AI will now remember that your name is John in future conversations.
Environment Variables
Create a .env file in your project root:
.env
OPENROUTER_KEY=your_openrouter_api_key_here
SUPER_AGENT_KEY=your_super_agent_key_hereKeep Your Keys Secret
Never commit your API keys to version control. Add
.env to your .gitignore file.