EXTREME SCOPE

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_high

Extended reasoning: compares sources, makes the logical steps explicit, closes with key points.

Cost168 tokens
Time1-3 min
Modelgemini-4-argon
extreme_extreme

Deep analysis: hypotheses, verification, comparison tables, risks and edge cases, operational conclusions.

Cost238 tokens
Time2-5 min
Modelgemini-4-carbon

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/neuralaiExtreme
api_key

nai_... key with extreme scope (x-api-key header or body).

prompt

The question or task to analyse.

level

"high" (default) or "extreme".

poll_job_id

Only to retrieve: the extreme_job_id returned at start.

callback_url

Optional: public https URL that receives the full answer via POST, without polling.

Response

result.extreme_pending

true while the turn is running: call again with poll_job_id.

result.answer

The full answer text (markdown).

result.sources

Web sources: [{ title, url }].

result.extreme_level / model

"high" or "extreme" and the model used (gemini-4-argon / gemini-4-carbon).

balance

Token balance updated after the charge.

curl — start the turn

bash
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

bash
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

javascript
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

python
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

bash
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

json
POST https://tuo-dominio.it/webhook/extreme
x-neuralai-event: extreme.completed
content-type: application/json

{

Errors and refunds

401

api_key missing, invalid or revoked.

402

Insufficient token balance (error_code insufficient_tokens).

403

Missing extreme scope (error_code scope_required) or unauthorized domain.

400

Invalid callback_url: a public https URL is required (error_code invalid_callback_url).

500

Processing failed (error_code extreme_failed): the cost was refunded to your balance.

Cookies & Privacy

We use technical cookies necessary for the site to function and, only with your consent, Google and Meta measurement and marketing cookies. You may accept or reject.