Neuralai Extreme via API key
Extended reasoning and deep analysis with the same NeuralAI API key: a dedicated endpoint, the extreme scope and the same content archive as the rest of the app.
How it works
Key with extreme scope
The key must have the extreme scope enabled; KYC-limited keys are excluded.
Asynchronous start
The request starts the job on the worker and returns immediately with extreme_pending and extreme_job_id.
Free polling
Repeat the same call with poll_job_id every 5-10 seconds: no extra cost, up to 10 minutes.
Automatic archive
Every answer becomes an archived Extreme turn (up to 60,000 characters): same content management as the app.
The two levels
extreme_highExtended reasoning: compares sources, makes the logical steps explicit, closes with key points.
extreme_extremeDeep analysis: hypotheses, verification, comparison tables, risks and edge cases, operational conclusions.
The extreme scope is enabled when creating a key (or editing an existing one) on the API Keys page.
Request
One endpoint: POST /functions/neuralaiExtreme. The same call starts the job and retrieves the result.
POST https://app.neuralaiweb.com/functions/neuralaiExtremeapi_keynai_... key with extreme scope (x-api-key header or body).
promptThe question or task to analyse.
level"high" (default) or "extreme".
poll_job_idOnly to retrieve: the extreme_job_id returned at start.
callback_urlOptional: public https URL that receives the full answer via POST, without polling.
Response
result.extreme_pendingtrue while the turn is running: call again with poll_job_id.
result.answerThe full answer text (markdown).
result.sourcesWeb sources: [{ title, url }].
result.extreme_level / model"high" or "extreme" and the model used (gemini-4-argon / gemini-4-carbon).
balanceToken balance updated after the charge.
curl — start the turn
curl -X POST https://app.neuralaiweb.com/functions/neuralaiExtreme \
-H "Content-Type: application/json" \
-H "x-api-key: nai_xxx" \
-d '{
"prompt": "Valuta i rischi di ingresso in un nuovo mercato EU per un'azienda SaaS B2B",curl — fetch the result
curl -X POST https://app.neuralaiweb.com/functions/neuralaiExtreme \
-H "Content-Type: application/json" \
-H "x-api-key: nai_xxx" \
-d '{ "poll_job_id": "EXTREME_JOB_ID" }'JavaScript — full loop
const ENDPOINT = "https://app.neuralaiweb.com/functions/neuralaiExtreme";
const API_KEY = process.env.NEURALAI_API_KEY; // server-side only
async function extremeSearch(prompt, level = "high") {
const post = (body) => fetch(ENDPOINT, {Python — full loop
import os, time, requests
ENDPOINT = "https://app.neuralaiweb.com/functions/neuralaiExtreme"
HEADERS = {"x-api-key": os.environ["NEURALAI_API_KEY"]}
Completion webhook
Pass callback_url at start and, when the turn ends, your endpoint receives a POST with the full answer: no polling. Delivery is best-effort (15 s timeout, no retry) and the turn is always archived, so poll_job_id always works as a fallback.
Public https only: localhost and private networks are rejected with 400 invalid_callback_url.
Header x-neuralai-event: extreme.completed and a JSON body with answer, answer_chars, sources and tokens_charged.
Failed turn: status "failed", error and refunded true (tokens already returned). Reply 2xx to acknowledge.
curl — start with webhook
curl -X POST https://app.neuralaiweb.com/functions/neuralaiExtreme \
-H "Content-Type: application/json" \
-H "x-api-key: nai_xxx" \
-d '{
"prompt": "Analisi competitiva del mercato EU",What your endpoint receives
POST https://tuo-dominio.it/webhook/extreme
x-neuralai-event: extreme.completed
content-type: application/json
{Errors and refunds
401api_key missing, invalid or revoked.
402Insufficient token balance (error_code insufficient_tokens).
403Missing extreme scope (error_code scope_required) or unauthorized domain.
400Invalid callback_url: a public https URL is required (error_code invalid_callback_url).
500Processing failed (error_code extreme_failed): the cost was refunded to your balance.