API Documentation
Comprehensive API reference for AINexLayer, including authentication, endpoints, request/response formats, and integration examples.
Overview
Base URL
Production: https://api.ainexlayer.com/api/v1
Development: http://localhost:3001/api/v1Authentication
API Key Authentication
# Include API key in header
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.ainexlayer.com/api/v1/workspacesJWT Token Authentication
# Login to get JWT token
curl -X POST https://api.ainexlayer.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "password"}'
# Use JWT token in subsequent requests
curl -H "Authorization: Bearer JWT_TOKEN" \
https://api.ainexlayer.com/api/v1/workspacesCommon Response Formats
Success Response
Error Response
Paginated Response
Authentication Endpoints
Login
Register
Refresh Token
Logout
Workspace Endpoints
List Workspaces
Get Workspace
Create Workspace
Update Workspace
Delete Workspace
Document Endpoints
List Documents
Upload Document
Get Document
Delete Document
Chat Endpoints
Send Message
Get Conversation History
List Conversations
Search Endpoints
Search Documents
User Management Endpoints
List Users
Create User
Update User
System Endpoints
Health Check
System Information
Error Codes
Common Error Codes
Error Response Format
Rate Limiting
Rate Limits
Rate Limit Headers
SDKs and Libraries
JavaScript/Node.js
Python
Webhooks
Webhook Configuration
Webhook Payload
Last updated
