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.
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.
| Environment | Base URL | Usage |
|---|---|---|
Production | https://api.nexusai.dev/v3 | Live traffic, billing enabled |
Sandbox | https://api-sandbox.nexusai.dev/v3 | Testing, zero cost, rate limited |
Endpoints #
Returns a paginated list of supported foundation models, including vision, language, and multimodal variants.
| Parameter | Type | Description |
|---|---|---|
| categoryoptional | string | Filter by type: language, vision, audio |
| limitoptional | integer | Max items per page (default: 20) |
GET /v3/models?category=language&limit=5
Core endpoint for running AI inference. Supports streaming via Transfer-Encoding: chunked.
| Parameter | Type | Description |
|---|---|---|
| modelrequired | string | Model ID (e.g., nexus-v3-turbo) |
| promptrequired | string | Input text or system+user message array |
| temperatureoptional | float | 0.0–1.0 (default: 0.7) |
Returns token consumption, request counts, and billing estimates for the current billing cycle.
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.
| Code | Meaning | Action |
|---|---|---|
400 | Bad Request | Check syntax, required fields, and payload format |
401 | Unauthorized | Verify API key validity and scope permissions |
429 | Rate Limited | Implement exponential backoff; check X-RateLimit-Reset |
500 | Server Error | Internal 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 windowX-RateLimit-Remaining– Requests left in current windowX-RateLimit-Reset– Unix timestamp when quota resets