API
Neura AI provides a unified API interface that handles multiple capabilities through a single omni-endpoint, with support for long-running operations through a polling mechanism.
Overview
Neura AI provides a unified API interface that handles multiple capabilities through a single omni-endpoint. The API utilizes Bearer token authentication and includes comprehensive NLP capabilities, image processing, and conversational features.
Core Information
Base URL: https://bo.meetneura.ai/api/prediction
Authentication: Bearer Token required for all endpoints
Default Content-Type: multipart/form-data
Endpoints
1. Omni Endpoint (Primary Interaction Point)
Endpoint: POST /prediction/interact
Status Check: GET /prediction/interact
Capabilities
Conversational RAG with context management
AI-driven RDA decision-making
Image generation and similar image generation
Image analysis with computer vision
Document analysis and URL summarization
Natural Language Processing features:
Sentiment analysis
Intent detection
Keyword extraction
Lexicon processing
Request Format
Parameters:
text
(optional): String - Input text, URL, or commandfile
(optional): File - Image or document for processingchat_history
(optional): Array - Previous conversation context
Example Requests
Text Conversation:
Image Upload with Analysis:
URL Analysis:
2. History and Logging Endpoints
Fetch Chat History
Endpoint: GET /history/fetch
Description: Retrieves conversation history for the authenticated user
Get User IDs
Endpoint: GET /history/users/ids
Description: Returns list of user IDs with chat history
Fetch Logs
Endpoint: GET /logs/fetch
Description: Retrieves system logs for debugging
Clear Logs
Endpoint: POST /logs/clear
Description: Clears system logs
3. NLP Specific Endpoint
Lexicon Access
Endpoint: GET /nlp/lexicon
Description: Accesses the proprietary lexicon engine
Features
Sentiment Analysis (
sentiment_analysis.rs
)Intent Detection (
detect_intent.rs
)Important Terms Extraction (
important_terms.rs
)Custom Lexicon Processing (
lexicon.rs
)
4. Proxy Interaction
Endpoint: POST /prediction/proxy/interact
Description: Proxy endpoint for client requests
Response Format
2. Status Check Endpoint
GET /prediction/interact
Used to poll for results of long-running operations.
Required Header
Response States
Processing Complete:
Processing Error:
Request Not Found:
3. History and Logging Endpoints
Get Chat History
GET /history/fetch
Retrieves conversation history for authenticated user
Requires Bearer token authentication
Get User IDs
GET /history/users/ids
Returns list of user IDs with chat history
Admin access required
Get Logs
GET /logs/fetch
Retrieves system logs
Admin access required
Clear Logs
POST /logs/clear
Clears system logs
Admin access required
4. Proxy Interaction
POST /prediction/proxy/interact
Load-balanced request handling
Same format as main interaction endpoint
NLP Capabilities
Integrated NLP Features
All text interactions automatically include:
Sentiment analysis
Intent detection
Keyword extraction
Lexicon processing
Specialized NLP Endpoints
GET /nlp/lexicon
Access to proprietary lexicon engine
Advanced language processing features
Implementation Guide
Basic Request Flow
Submit initial request to
/prediction/interact
Receive request_id
Poll status endpoint until completion
Process final response
Example Implementation
Example Requests
Text Conversation
Image Upload
URL Analysis
System Limitations and Considerations
Request Processing
Maximum processing time: 300 seconds
Concurrent request management via semaphore
Response caching for completed requests
UUID v4 for request tracking
Rate Limits
Standard requests: 60 per minute
Image processing: 30 per minute
NLP processing: 100 per minute
Best Practices
Implement exponential backoff for polling
Monitor processing_time_ms
Handle timeouts appropriately
Cache frequent requests
Include proper error handling
Security
Bearer token authentication required
Cloudflare protection enabled
Containerized client data
Request validation through dependency injection
Rate limiting on all endpoints
Error Handling
All errors follow this format:
Common error codes:
PROCESSING_ERROR
: General processing failureTIMEOUT_ERROR
: Request exceeded time limitVALIDATION_ERROR
: Invalid inputAUTH_ERROR
: Authentication failure
Notes
The omni endpoint automatically detects the type of processing needed based on input
Image generation triggers are processed automatically through NLP
Document analysis supports multiple formats (PDF, DOC, DOCX, TXT)
URL summarization works with any valid web URL
NLP processing is included by default in all text responses
Last updated