Orchestrator — POST /neuralaiOrchestrator

The main endpoint. Send any prompt: the AI automatically decides which function to use.

Parameters

promptstringrequiredThe request text
api_keystringrequiredYour API key (or use x-api-key header)
file_urlsarrayArray of file URLs uploaded via /apiUploadFile
conversation_historyarrayArray of previous messages [{role: 'user'|'assistant', content: 'text'}] for intelligent context (manual mode, localStorage)
session_idstringSession ID to store history in DB (automatic mode, zero client code)
resetbooleantrue together with session_id clears the session (DB + received history) and returns a clean new session_id
conversation_idstringConversation ID to maintain context
force_intentstringForce the intent skipping automatic classification: seek_speed, seek_normal, seek_large, deep_research, image, video, music, code, pdf, pdf_presentation (chat = automatic)
widget_idstringWidget ID for chat with specific widget

🔍 AUTOMATIC SELECTION CRITERIA — WEB SEARCH (SEEK)

  • seek_speed (20 tokens) — simple factual questions with a brief answer: definitions, "who is", prices, dates, current facts. Never large for these.
  • seek_normal (40 tokens) — organized multi-source search: "X vs Y" comparisons, best/top rankings, reviews, guides, tutorials.
  • seek_large (70 tokens) — comprehensive multi-source research when depth is explicit: "in-depth research", "complete analysis", deep dive, whitepaper, market study.
  • deep_research (70 tokens) — structured multi-section report only on an explicit deep research request.
  • When torn between speed and normal the orchestrator picks normal; simple factual questions never use large. Use force_intent to skip the automatic choice.

🧠 ACTIVE CONCATENATION AND MEMORY

  • With session_id or conversation_history present, concatenation is ALWAYS active: the prompt includes condensed summary, topic register and the last 3 messages (no decisional LLM call).
  • Cost: +1 flat token per request with active memory. The first request without memory pays no surcharge.
  • reset: true together with session_id clears the session and returns a clean new session_id in the response.
curl
curl -X POST https://app.neuralaiweb.com/functions/neuralaiPublicApi \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "LA_TUA_CHIAVE_API",
    "prompt": "Search for the latest AI developments in 2025",
curl
# Oppure usa conversation_history (modalità manuale)
curl -X POST https://app.neuralaiweb.com/functions/neuralaiPublicApi \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "LA_TUA_CHIAVE_API",
javascript (Node.js)
const response = await fetch("https://app.neuralaiweb.com/functions/neuralaiPublicApi", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api_key: "LA_TUA_CHIAVE_API",
python
import requests

response = requests.post("https://app.neuralaiweb.com/functions/neuralaiPublicApi", json={
    "api_key": "LA_TUA_CHIAVE_API",
    "prompt": "Compose a relaxing ambient song",