v3.2.1 • Stable

REST API Reference

Comprehensive documentation for integrating NexusAI's machine learning models, inference engines, and automation pipelines into your applications.

Authentication #

All API requests require authentication via Bearer tokens. Generate your API keys from the /dashboard/settings/keys panel.

⚠️ Security Notice Never expose API keys in client-side code or public repositories. Use environment variables for storage.
curl https://api.nexusai.dev/v3/models \
  -H "Authorization: Bearer nx_live_sk_8f7g6h5j4k3l"

Base URL & Environments #

NexusAI provides separate endpoints for sandbox testing and production workloads.

EnvironmentBase URLUsage
Productionhttps://api.nexusai.dev/v3Live traffic, billing enabled
Sandboxhttps://api-sandbox.nexusai.dev/v3Testing, zero cost, rate limited

Endpoints #

GET /models List all available AI models

Returns a paginated list of supported foundation models, including vision, language, and multimodal variants.

ParameterTypeDescription
categoryoptionalstringFilter by type: language, vision, audio
limitoptionalintegerMax items per page (default: 20)
GET /v3/models?category=language&limit=5
POST /inference Generate predictions / completions

Core endpoint for running AI inference. Supports streaming via Transfer-Encoding: chunked.

ParameterTypeDescription
modelrequiredstringModel ID (e.g., nexus-v3-turbo)
promptrequiredstringInput text or system+user message array
temperatureoptionalfloat0.0–1.0 (default: 0.7)
GET /usage Retrieve account metrics & quotas

Returns token consumption, request counts, and billing estimates for the current billing cycle.

DELETE /webhooks/{id} Remove a configured webhook

Permanently deletes the webhook subscription. Returns 204 No Content on success.

Error Handling #

The API uses standard HTTP status codes and returns detailed JSON error objects.

CodeMeaningAction
400Bad RequestCheck syntax, required fields, and payload format
401UnauthorizedVerify API key validity and scope permissions
429Rate LimitedImplement exponential backoff; check X-RateLimit-Reset
500Server ErrorInternal failure; retry or contact support

Rate Limits #

Rate limits are applied per API key and vary by tier. Limits are returned in response headers.

  • X-RateLimit-Limit – Max requests per window
  • X-RateLimit-Remaining – Requests left in current window
  • X-RateLimit-Reset – Unix timestamp when quota resets
💡 Tip Enterprise plans receive dedicated throughput allocation and custom rate limit negotiation.