Neura AI
  • What is Neura?
    • Releases
      • Neura Artifacto UI v0.2.0 - Revolutionizing User Experience with Image Previews, Image Analysis, and
      • Neura AI v0.5.98 - Artifacto UI Updates, FLUX Pro Ultra & Telegram Formatting and Major System Up
      • Neura AI v0.5.97 - Llama 3.3 70b Versatile and Llama 3.3 70b SpecDec Integrations and Azure Blob
      • Neura AI v0.5.96 Dash Tracking, Telegram Hyperlinks and Get User Ids Improvements
      • Neura AI v0.5.95 - Core System Stability & Integration Improvements
      • Neura AI v0.5.9 - ReDeAct Agents' Action Handling and Decision-Making Optimization
      • Neura AI v0.5.8 - Faster, Smoother, More Reliable
      • Neura AI v0.5.7 Core Request-Response Handling Architecture Optimization
      • Neura AI v0.5.6 - Security Update and Bugs Fix
      • Neura AI v0.5.5 - Security Optimizations, Bugs Patches and Multi-Language Support, Flux 1.1 Pro
      • Neura AI v0.5.4 Optimized Relevant Context Retrieval, Eleven Labs Speech to Text and Enhanced Trello
      • Neura AI v0.5.3 - Telegram Text, Code and Image Format Enhancement - TTS and Upload Fallback Added
      • Neura AI v0.5.2 - Trello Integration, Llama3.1 Improvements, and Parallel API Call Strategy
      • Neura AI v0.5.1 - React Agents Bug Fix, Introducing Top Context To Fetch and Context Optimizations
      • Neura AI v0.5.0: Introducing Lexicon. Our Enhanced NLP Engine For Analysis and Classification
      • Neura AI v0.4.9 Bug Fixes, Sales Bot Optimizations and Context Improvements
      • Neura AI v0.4.8 - Improved User Interface and History Handling
      • Neura AI v0.4.7 - Context Management and Environment Optimizations
      • Neura AI v0.4.6 - Context Optimization and Chat History Metadata to Analysis
      • Neura AI v0.4.5: Enhanced RAG System and Improved Content Retrieval
      • Neura AI v0.4.4 - New Features: Docker Alerts and Sales Bot
      • Neura AI v0.4.3 - Slack Integration
      • Neura AI v0.4.2 - Enhanced Context Management and Group Collaboration
      • Neura AI v0.4.1 - Document Handling, Logging, and System Reliability
      • Neura AI v0.4.0: Introducing Reason-Act Agents, Multi Module Retry Logic and Real-Time Error Alerts
      • Neura AI v0.3.9: Voice Interaction Revolution
      • Neura AI v0.3.8 - Llama 3.1 Integration, Rust Migration, Speech-to-Text, 781 commits and more!
      • Neura AI v0.3.7 - Telegram Integration Features: Track Negative Feedback, and Intelligent Alerts
      • Neura AI v0.3.6 - Image-to-Video and Remove Background Feature
      • Neura AI v0.3.5 - In-painting and Search and Replace Image Processing
      • Neura AI v0.3.4 - Advanced RAG Context Management and Multi-Model Image Generation
      • Neura AI v0.3.3 - Store Data to Database | Optimized Entry Point Response and Discord New Triggers
      • Neura AI v0.3.2 - Improved Context Management and NLP Integration to Purge Context
      • Neura AI v0.3.1 - Enhanced Context and Response Time, Task Determination, Groq and Claude 3.5 Sonnet
      • Neura AI v0.3.0 Update: Chat History RAG, NLP Enhancements, and Multi-Language Image Processing
      • Neura AI v0.2.9 - Feedback and Sentiment Mechanism for Telegram Groups
      • Neura AI v0.2.8 - Telegram Integration - Text Formatting Enhancements
      • Neura AI v0.2.7 - Enhanced Analysis Process, 16_ID, Image Upload Processing, Token Usage Tracking
      • Neura AI v0.2.6 - GPT4o Integration, Enhanced API, URL Sanitizer, Additional Logging and Bugs Fixed
      • Neura AI v0.2.5 - Advanced API Rate Limiting and Exponential Backoff Integration
      • Neura AI v0.2.4 - Image Upload Handling, Generation Module and LLM Interaction Enhanced
      • Neura AI v0.2.3 - Bug Fix: Azure Blob Upload Bug Resolved
      • Neura AI - Enhanced AI-Driven Interaction Capabilities
      • Neura AI v0.2.1 - Updating Asynchronous Architecture, RAG Cosine
      • Neura AI v0.2.0 - Modularization of the API Endpoint, Bug fixes, and Azure Blob Migration
      • Neura AI v0.1.92 Improved Database Retrieval and Response Performance
      • Neura AI v0.1.91 - API v1.1 - Interact Endpoint Enhanced - Support For Multipart/Form-Data
      • Neura AI v0.1.9 - RAG Similarity | Initial Query Triggers Added | FE Improvements
      • Neura AI v0.1.8 - Image Generation Enhanced, New NLP Triggers, Additional Modularization
      • Neura AI v0.1.7 Image Analysis Improvement, Mint NFT Button Improvement, and Additional Triggers Ad
      • Neura AI 0.1.6 - Frontend Update, Integration of Additional NLP Triggers and STT
      • Neura AI v0.1.5 | NLP for image generation, dynamic styling for dark or light mode and more
      • Neura v0.1.4 | Img previews, API CORS+OPTIONS, user-icon added, generate images with user query+URL
      • Neura AI v0.1.3 | Successful Resolution of Socket.IO Issues and Frontend Modularization
      • Neura AI v0.1.2 | Integration of Multiple Endpoints with FastAPI and Httpx
      • Neura AI v0.1.1 | BE Architecture and FastAPI Migration
      • WIP -> Upload Button Integration
    • Scope and Goals
    • Modular Architecture
    • Context and Database (RAG)
    • Integrations
      • Telegram Oracle v0.1.0
        • Fana Telegram Oracle Agent v0.2.0 - Revamped Doc Update
        • Fana Telegram Oracle Agent v0.3.0
      • Trello
      • Discord
      • Slack
    • Applications
      • Neura Artifacto User Interface v0.3.0
      • Neura Autonomous Agents
      • Neura Transcribe (TSB)
      • Neura AI Insight Forge - Your WebGenius Scraper and FAQ Engine v0.2.0
      • Neura Email Sales Agent (ESA)
        • Neura Email Oracle Agent v0.1.1 - Enhancements to Self-Loop Email Handling and OOF Filters
    • API
    • Software Development Kits (SDK)
      • Rust
      • Typescript
    • Security and Authentication
    • Upcoming Features and Product Roadmap
    • Getting Started - Read.me
    • Project Diagram and Structure
Powered by GitBook
On this page
  • Table of Contents
  • 1. JSON Endpoint
  • 2. Omni Multi-Part Endpoint
  • 3. Research and Discovery Endpoint
  • 4. Endpoints for History and Logging
  • 5. NLP Specific Endpoint
  • 6. Proxy Interaction Endpoint
  • 7. Error Handling
  1. What is Neura?

API

Welcome to the Neura AI API documentation! This guide provides detailed information about how to interact with the Neura AI endpoints to integrate AI-powered capabilities into your applications.


Table of Contents

  1. JSON Endpoint

  2. Omni Multi-Part Endpoint

  3. Research and Discovery Endpoint

  4. Endpoints for History and Logging

  5. NLP Specific Endpoint

  6. Proxy Interaction Endpoint

  7. Error Handling

  8. Common Error Codes


1. JSON Endpoint

Overview

The JSON Endpoint offers a comprehensive way to interact with the Neura AI capabilities. It accepts a JSON payload containing parameters for authentication, messages, file data, user ID, and session ID, allowing for versatile and context-aware interactions.

HTTP Method & Path

  • HTTP Method: POST

  • Path: /v1/chat/completions

Request Body Format

The request body should be in JSON format, containing the following parameters:

{
  "auth": {
    "token": "Bearer YOUR_TOKEN"
  },
  "messages": "string",
  "file_data": "optional_byte_array_or_file_reference",
  "user_id": "optional_string",
  "session_id": "optional_string",
  "stream": "optional_string",
  "reasoning_format": "optional_string"
}

Parameters

Parameter
Type
Required
Description

auth.token

String

Yes

Bearer token for authentication.

messages

String

Yes

The message array or prompt for the AI.

file_data

Vec

<u8>

No

Byte array representing file data in various formats (e.g., PDF, DOCX, JPG).

user_id

String

No

User ID for personalization or tracking.

session_id

String

No

UUIDv4 - Session ID for maintaining context across multiple interactions.

stream

String

No

To stream response in real time.

reasoning_format

String

No

This optional parameter is available for O3 and DeepSeek R1 models.

Example Request

curl -X POST "https://api.meetneura.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "messages": "What is the sentiment of this text?",
  "file_data": "optional_byte_array_data_here",
  "user_id": "user123",
  "session_id": "8939e6af-a041-4d6b-a847-b366fb5ed828",
  "stream": "true",
  "reasoning_format": "raw"
}'

Example Response

The response will depend on the request and the AI model's processing. Here’s a general structure of the response:

{
  "request_id": "uuid-v4-string",
  "response": "The sentiment of the text is positive.",
  "context": "optional_context_or_state_for_future_interactions",
  "error": "optional_error_message",
  "processing_time_ms": 1234
}

Authentication

All requests must include a valid Bearer token in the auth.token field. The token should be provided in the JSON payload as shown in the example above.

Additional Considerations

  • File Formats: Supported file formats include PDF, DOCX, TXT, JPG, and others. Ensure that file_data is provided as a byte array or file reference.

  • Session Management: Use session_id to maintain context across multiple interactions, enhancing the conversational experience.

  • User ID: Include user_id for personalization or tracking purposes.


2. Omni Multi-Part Endpoint

Overview

The Omni Multi-Part Endpoint is designed to handle multi-modal interactions, supporting both text and file inputs through a single endpoint. It provides a flexible way to integrate AI capabilities into your applications, allowing for a combination of text prompts and file uploads.

HTTP Method & Path

  • HTTP Method: POST

  • Path: /v1/chat/completions/multipart

Request Format

The request should be sent as multipart/form-data, allowing for both text fields and file uploads. The supported fields are:

Field Name
Description

messages

The text input or prompt for the AI.

session_id

UUIDv4 for maintaining context across multiple interactions.

user_id

User ID for personalization or tracking.

file

File data for processing (e.g., PDF, DOCX, JPG).

stream

Boolean indicating whether to stream the response in real-time.

reasoning_format

Optional parameter for models that support different reasoning formats.

Example Request

curl -X POST "https://api.meetneura.ai/v1/chat/completions/multipart" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: multipart/form-data" \
  -F "messages=What is the sentiment of this text?" \
  -F "session_id=8939e6af-a041-4d6b-a847-b366fb5ed828" \
  -F "user_id=user123" \
  -F "[email protected]" \
  -F "stream=true" \
  -F "reasoning_format=raw"

Example Response

The response will depend on the request and the AI model's processing. Here’s a general structure of the response:

{
  "request_id": "uuid-v4-string",
  "response": "The sentiment of the text is positive.",
  "processing_time_ms": 1234
}

Streamed Response Format

If streaming is enabled, the response will be sent in chunks:

data: {"chunk": "First part of the response...", "request_id": "uuid-v4-string"}
data: {"chunk": "Next part of the response...", "request_id": "uuid-v4-string"}
...

Parameters

Parameter
Type
Required
Description

messages

String

Yes

The message array or prompt for the AI.

session_id

String

No

UUIDv4 - Session ID for maintaining context across multiple interactions.

user_id

String

No

User ID for personalization or tracking.

file

File

No

File data for processing (e.g., PDF, DOCX, JPG).

stream

Boolean

No

To stream the response in real time.

reasoning_format

String

No

This optional parameter is available for models that support different reasoning formats.


3. Research and Discovery Endpoint

Overview

The Research and Discovery Endpoint is designed to fetch relevant information from the web based on user queries. It utilizes the Gemini API to provide accurate and up-to-date results.

HTTP Method & Path

  • HTTP Method: POST

  • Path: /v1/research/web

Request Format

The request body should be in JSON format, containing the following parameters:

{
  "query": "string",
  "num_results": "optional_number",
  "session_id": "optional_string",
  "user_id": "optional_string"
}

Parameters

Parameter
Type
Required
Description

query

String

Yes

The search query to be processed.

num_results

Number

No

The number of results to return.

session_id

String

No

UUIDv4 - Session ID for maintaining context across multiple interactions.

user_id

String

No

User ID for personalization or tracking.

Example Request

curl -X POST "https://api.meetneura.ai/v1/research/web" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "query": "latest advancements in quantum computing",
  "num_results": 10,
  "session_id": "8939e6af-a041-4d6b-a847-b366fb5ed828",
  "user_id": "user123"
}'

Example Response

{
  "request_id": "uuid-v4-string",
  "results": [
    {
      "source": "Source Name",
      "url": "https://example.com/article",
      "content": "Content of the article.",
      "published_date": "2023-10-01"
    },
    // ... more results
  ],
  "processing_time_ms": 1234
}

4. Endpoints for History and Logging

These endpoints allow you to fetch chat history, user IDs, logs, and clear logs.

Fetch Chat History

  • HTTP Method: GET

  • Path: /v1/history/fetch

Get User IDs

  • HTTP Method: GET

  • Path: /v1/history/users/ids

Fetch Logs

  • HTTP Method: GET

  • Path: /v1/logs/fetch

Clear Logs

  • HTTP Method: POST

  • Path: /v1/logs/clear


5. NLP Specific Endpoint

Lexicon Access

  • HTTP Method: POST

  • Path: /v1/lexicon

This endpoint provides access to the Lexicon NLP capabilities for advanced text processing.


6. Proxy Interaction Endpoint

Overview

This endpoint is used for load-balanced request handling and follows the same format as the main interaction endpoint.

  • HTTP Method: POST

  • Path: /v1/proxy/chat/completions


7. Error Handling

All errors follow this format:

{
  "error": "detailed error message",
  "request_id": "associated-request-id",
  "code": "ERROR_CODE",
  "processing_time_ms": 1234
}

Common Error Codes

  • PROCESSING_ERROR: General processing failure.

  • TIMEOUT_ERROR: Request exceeded the time limit.

  • VALIDATION_ERROR: Invalid input.

  • AUTH_ERROR: Authentication failure.


This documentation is regularly updated to reflect new features and improvements. For any questions or feedback, please get in touch with us at [email protected].

PreviousNeura Email Oracle Agent v0.1.1 - Enhancements to Self-Loop Email Handling and OOF FiltersNextSoftware Development Kits (SDK)

Last updated 2 months ago