// API_REFERENCE
Build powerful applications with Parallax Dominion's AI services
// BASE_URL
Base URL for all API endpoints
https://parallaxdominion.vercel.app/api
// AUTHENTICATION
Include your API key in the Authorization header
Authorization: Bearer YOUR_API_KEY
// REQUEST_FORMAT
const response = await fetch('/api/services', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
service: 'cogi',
message: 'Create a REST API',
language: 'javascript',
mode: 'code'
})
});
POST
/api/services - AI Code Generation
// PARAMETERS
service
string
Must be "cogi"
message
string
Your code request or existing code
language
string
javascript, python, typescript, go, rust, java, cpp, php
mode
string
code, explain, debug, optimize, review
model
string
fast, balanced (default), power
REQUEST
cURL
curl -X POST https://parallaxdominion.vercel.app/api/services \
-H "Content-Type: application/json" \
-d '{
"service": "cogi",
"message": "Create a React login form with validation",
"language": "typescript",
"mode": "code"
}'
RESPONSE
JSON
{
"success": true,
"response": "import React, { useState } from 'react';\n\nexport const LoginForm = () => {\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n // ... full implementation",
"model": "llama-3.3-70b-versatile",
"language": "typescript",
"mode": "code",
"usage": { "total_tokens": 856 }
}
POST
/api/services - Security Analysis
// PARAMETERS
service
string
Must be "guardian"
code
string
Code to analyze for security issues
RESPONSE
JSON
{
"success": true,
"score": 85,
"grade": "B",
"vulnerabilities": [
{ "severity": "high", "type": "XSS Risk", "match": "innerHTML", "fix": "Use textContent" }
],
"severityCounts": { "critical": 0, "high": 1, "medium": 0, "low": 2, "info": 1 },
"aiAnalysis": "Deep analysis from AI...",
"recommendations": [...]
}
POST
/api/services - Multi-Agent Collaboration
// PARAMETERS
service
string
Must be "agentswarm"
task
string
The task for agents to collaborate on
agents
array
Array of agent types to deploy
AVAILABLE_AGENTS
architect ๐๏ธ - System architecture design
coder โก - Code implementation
reviewer ๐ - Code review and quality
tester ๐งช - Test generation
documenter ๐ - Documentation
optimizer ๐ - Performance optimization
security ๐ก๏ธ - Security analysis
analyst ๐ - Data analysis
REQUEST
{
"service": "agentswarm",
"task": "Build a scalable e-commerce API",
"agents": ["architect", "coder", "reviewer", "tester"]
}
RESPONSE
{
"success": true,
"swarm": [...],
"results": [
{ "agentName": "Architect", "status": "completed", "response": "..." },
{ "agentName": "Coder", "status": "completed", "response": "..." },
...
],
"synthesis": "Final synthesized solution...",
"stats": { "agentsActive": 4, "totalTokens": 2500 }
}
POST
/api/services - Pipeline Orchestration
// PARAMETERS
service
string
Must be "orchestrate"
task
string
Task description
services
array
Pipeline: ["cogi", "guardian", "testpilot"]
Pipeline: Generate Code โ Check Security โ Generate Tests
{
"service": "orchestrate",
"task": "Create a user authentication module",
"services": ["cogi", "guardian", "testpilot"]
}
// AI_MODELS
โก Fast
llama-3.1-8b-instant
- Fastest response time
- Good for simple tasks
- Lower token usage
- Best for prototyping
โ๏ธ Balanced
llama-3.3-70b-versatile
- Best quality/speed balance
- Great for most tasks
- Recommended default
- Handles complex tasks
๐ Power
mixtral-8x7b-32768
- Highest capability
- Longest context window
- Complex reasoning
- Large codebases