API Reference

The NexusAI API provides programmatic access to our machine learning models, real-time analytics engine, and autonomous agent platform. All endpoints return JSON and follow RESTful conventions.

Base URL

https://api.nexusai.dev/v1

All requests must include a valid API key in the `Authorization` header. Use HTTPS for all connections.

Authentication

Authenticate using Bearer tokens. Include your API key in every request:

curl -X GET https://api.nexusai.dev/v1/models \ -H "Authorization: Bearer nx_live_sk_8x72...
const response = await fetch('https://api.nexusai.dev/v1/models', { headers: { 'Authorization': 'Bearer nx_live_sk_8x72...' } });

Endpoints

POST /v1/analyze

Submit data for real-time ML analysis. Supports text, structured JSON, and image payloads.

Parameters

ParameterTypeDescription
modelstringModel identifier (e.g., nexus-v3-ultra)
input requiredobject|stringInput data payload
streambooleanEnable SSE streaming (default: false)

Example Request

curl -X POST https://api.nexusai.dev/v1/analyze \ -H "Authorization: Bearer nx_live_sk_..." \ -H "Content-Type: application/json" \ -d '{ "model": "nexus-v3-ultra", "input": {"text": "Predict market trend for Q4"} }'
import requests response = requests.post( 'https://api.nexusai.dev/v1/analyze', headers={'Authorization': 'Bearer nx_live_sk_...'}, json={"model": "nexus-v3-ultra", "input": {"text": "Predict market trend for Q4"}} ) print(response.json())
GET /v1/models

List all available pre-trained models with metadata and pricing tiers.

Response Example

{
  "data": [
    {
      "id": "nexus-v3-ultra",
      "name": "Nexus Ultra",
      "type": "text-analysis",
      "status": "active"
    }
  ],
  "count": 1 }
POST /v1/agents

Deploy a persistent AI agent with custom tools, memory, and trigger conditions.

Parameters

ParameterTypeDescription
name requiredstringAgent identifier
toolsarrayAvailable function bindings
system_prompt requiredstringBehavior instructions

Error Codes & Rate Limits

HTTP Status Codes

  • 400 Bad Request
  • 401 Unauthorized / Invalid Key
  • 403 Forbidden / Insufficient Tier
  • 429 Rate Limited
  • 500 Internal Model Error

Rate Limits

  • Starter 60 req/min
  • Professional 1,200 req/min
  • Enterprise Custom / Burst
  • Reset Sliding window