API Reference

NEURO AGENTS REST API

Integrate NEURO AGENTS into any application. Send a prompt, get an intelligent response routed through specialized AI agents.

Authentication

All requests require authentication via one of:

AuthorizationBearer YOUR_NEURO_API_KEY
X-API-KeyYOUR_NEURO_API_KEY

Endpoint

POST/api/neuro

Request Body

ParameterTypeDescription
promptrequiredstringYour query, instruction, or question for NEURO AGENTS.
context_dataobjectKey-value pairs to enrich the query with domain-specific context.
agentstringForce a specific agent: "researcher", "coder", "analyst", "dispatch", "supervisor", "sales", "vendor", "estimating", "finance", "client", or "compliance". If omitted, the neural router auto-selects.
conversation_historyarrayPrevious messages for multi-turn context. Format: [{"role": "user"|"assistant", "content": "..."}]

Response Format

Response · JSON
{
  "status": "success",
  "response": "Neural networks learn through a process called...",
  "agent": "researcher",
  "routing": {
    "primary_agent": "researcher",
    "secondary_agents": [],
    "reasoning": "Educational query about ML concepts",
    "confidence": 0.95
  },
  "metadata": {
    "model": "llama-3.3-70b-versatile",
    "provider": "groq",
    "response_time_ms": 847,
    "agents_available": ["researcher", "coder", "analyst", "dispatch", "supervisor", "sales", "vendor", "estimating", "finance", "client", "compliance"]
  }
}

Examples

cURL · Bash
curl -X POST https://neuroai.abacusai.app/api/neuro \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_NEURO_API_KEY" \
  -d '{
    "prompt": "Explain how neural networks learn",
    "context_data": {
      "domain": "machine-learning",
      "depth": "intermediate"
    }
  }'
Python · Python
import requests

response = requests.post(
    "https://neuroai.abacusai.app/api/neuro",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_NEURO_API_KEY"
    },
    json={
        "prompt": "Write a Python function to sort a linked list",
        "agent": "coder",  # Optional: force a specific agent
        "context_data": {
            "language": "python",
            "style": "clean, well-documented"
        }
    }
)

data = response.json()
print(data["response"])
print(f"Agent: {data['agent']}")
print(f"Confidence: {data['routing']['confidence']}")
JavaScript · JavaScript
const response = await fetch("https://neuroai.abacusai.app/api/neuro", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_NEURO_API_KEY"
  },
  body: JSON.stringify({
    prompt: "Analyze the trends in AI chip investment for 2025",
    context_data: {
      sector: "semiconductors",
      timeframe: "2024-2025"
    },
    conversation_history: [
      { role: "user", content: "What is the current state of AI hardware?" },
      { role: "assistant", content: "The AI hardware market is rapidly evolving..." }
    ]
  })
});

const data = await response.json();
console.log(data.response);

Agent Routing

By default, NEURO AGENTS' neural router automatically analyzes your prompt and selects the best agent. You can also force a specific agent using the agent parameter.

Core Agents

"researcher"

Questions, research, explanations, summaries

"coder"

Code generation, debugging, architecture, refactoring

"analyst"

Data analysis, trends, business insights, reports

Enterprise Agents

"dispatch"

Work order triage, priority classification, vendor routing

"supervisor"

Job monitoring, missed ETAs, NTE overruns, escalations

"sales"

Lead sourcing, outreach, prospect scoring, pipeline

"vendor"

Onboarding, COI verification, performance scoring

"estimating"

Cost estimates, markups, proposals, bid analysis

"finance"

Job costing, invoices, overruns, financial reports

"client"

Tenant comms, status updates, maintenance requests

"compliance"

OSHA/EPA monitoring, certifications, audit prep

Error Codes

CodeMeaning
200Success — response generated
400Bad request — missing or invalid prompt
401Unauthorized — invalid or missing API key
500Server error — internal failure