NULIQ / API REFERENCE

Decisions your
code can use.

Send text. Receive a typed result. Connect our self-hosted chat and decision models to your product with a single HTTPS request.

Experimental model. Scores are estimates, not calibrated probabilities. Test on your own task before automating decisions.

NULIQ Chat

POST /v1/chat/completions

NULIQ is powered by self-hosted Qwen3-4B-Instruct-2507 (Apache 2.0), quantized to Q4_K_M. No external AI inference API is used. This model uses non-thinking inference. Ordinary conversations are not used for training. You can explicitly contribute a rated answer and its context through the chat feedback consent form for automatic checks and shared-model training. At least 80 eligible short training examples and 20 held-out examples are required. Candidates train on CPU and are automatically activated only after accuracy, regression and speed gates pass. Model status includes shared_learning and adapter_version. Ratings do not immediately change weights.

curl https://nuliq.ai/v1/chat/completions -H "Authorization: Bearer $NULIQ_KEY" -H 'Content-Type: application/json' -d '{"model":"nuliq","messages":[{"role":"user","content":"Merhaba!"}],"stream":false}'

Set method to chat (default), binary (1=yes/true, 0=no/false), choice or score. Decisions use one independent user message. Choice/score also require 2–12 distinct short strings in options (160 UTF-8 bytes each). Choice returns the selected option. Score returns a JSON string containing the option and its ordered position from 0 to 1, not a confidence estimate. Order score options lowest to highest. Answers can be wrong.

Use stream:true for Server-Sent Events. Chat is a free preview: 20 requests/minute and 200/hour per account, one active generation globally (busy requests return 429). Limits: 16 messages, 8,192 UTF-8 content bytes, 2,048 context tokens and 256 output tokens. No tools, uploads or web access. Chat is separate from the decision billing ledger. GET /v1/models returns model status. Existing decision endpoints and TXT training do not fine-tune Qwen.

01 / Make your first request

Create an account, open Console → API keys and create a key. Keep it on your server. All inference endpoints require bearer authentication.

export NULIQ_KEY='your-secret-key'
curl https://nuliq.ai/v1/decisions \
  -H "Authorization: Bearer $NULIQ_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: decision-001' \
  -d '{"input":"The customer asks for a refund.",
       "instructions":"Does this concern billing?",
       "type":"binary","model":"base"}'

Use a unique idempotency key per logical request. Retrying the same body and key reuses the recorded result. Changing the body with that key returns 409.

02 / Binary decisions with a score

POST /v1/decisions

type: "binary" returns bit (0 or 1), score (the model’s normalized Yes estimate from 0 to 1), and the No/Yes option scores. instructions is optional. A tie chooses the first option, No.

{
  "type": "binary", "bit": 1, "score": 0.63,
  "confidence": 0.63, "score_scale": [0, 1],
  "options": [{"label":"No","score":0.37},
              {"label":"Yes","score":0.63}],
  "experimental": true,
  "model_version": "nuliq-fast-v6-experimental",
  "request_id": "req_..."
}

Illustrative values, not a measured result or accuracy claim. Actual responses also include input_bytes, cost_nano, balance_nano and latency_ms. confidence is the highest option score, not a guarantee.

Existing binary integrations

POST /v1/decide with {"input":"your question","model":"active"} still returns plain text 0 or 1. Use this endpoint for private binary models. The Ollama adapter at /ollama/api/generate and /ollama/api/chat also remains binary only; it accepts one user message, with no conversation history, tools or images.

03 / Route to one option

Use choice for a queue, category or next step. Provide 2–8 descriptive, distinct options. The response contains choice, zero-based index, its score and all option scores. These scores sum to approximately 1.

{
  "type": "choice",
  "input": "My invoice contains a duplicate charge.",
  "instructions": "Choose the team that should handle this message.",
  "options": ["Billing and refunds", "Technical support", "Sales"]
}

Typed decisions use model: "base" plus your enabled private learned adapter, if one has passed evaluation. Separately selected TXT models do not override this selection.

04 / Get an ordered score

Use score with options ordered from lowest to highest. The result’s score is the weighted average of the option positions, normalized to 0–1. For three options, the positions are 0, 0.5 and 1. Multiply by 100 in your application if you prefer a 0–100 display.

{
  "type": "score",
  "input": "Checkout is down and all customers are blocked.",
  "instructions": "How urgent is this support request?",
  "options": ["Not urgent", "Needs attention", "Critical"]
}

choice names the highest-scoring option; it can differ from the position nearest the weighted score. Set your own thresholds after evaluation and keep a human review path.

05 / AI email and phone scores

POST /v1/validate

These endpoints now use NULIQ’s trained neural contact heads. No deterministic email or phone validator is called to decide live requests. The response includes bit, valid, score from 0 to 1, confidence, uncertain, method: "nuliq_neural_contact" and verification: "ai_format_estimate". A score of at least 0.5 produces bit 1. normalized is null; this API no longer promises a normalized address or E.164 number.

{"type":"email","input":"hello@example.com"}

{"type":"phone","input":"+905321234567"}

{"type":"phone","input":"05321234567","region":"TR"}

Use international phone format or an uppercase two-letter region hint. The model estimates whether the format is plausible. It can produce false positives and false negatives, and does not verify mailbox existence, deliverability, phone reachability or ownership. Use an email confirmation or OTP in your own product for ownership verification.

Contact training examples were labelled offline using format libraries. Serving uses learned weights. Phone training primarily covers TR, GB, US, DE, FR, NL, ES, IT, BR, IN, CA, AU, JP, AE, SA, PL, ZA, MX, ID and SE; untested regions can perform worse.

06 / Private automatic learning

Enable Automatic learning in the console, or use the authenticated API below. It is off until you opt in. Ordinary queries do not update the model or create retained training examples.

POST /v1/learning
{"enabled":true}

GET /v1/learning

POST /v1/decision-feedback
{
  "request_id":"req_from_your_decision",
  "request":{"type":"email","input":"hello@example.com"},
  "answer":1
}

Send the exact original request object and a verified answer. For binary/email/phone, answer is the integer 0 or 1. For choice or ordered score, it is the zero-based index of the correct option. You must own the original request, and it must have used the current Fast Core. Saving a label does not assert that NULIQ has independently verified it.

Verified decision feedback supplies private learning labels for Fast Core requests; this private decision-feedback route does not train Qwen. Shared chat contributions use the separate explicit-consent flow above. Saved private labels are never inferred from the model’s own predictions and never shared between accounts.

  1. A keyed, stable split reserves examples for testing; those examples never enter the optimiser.
  2. Each decision/contact head needs at least 40 training and 20 held-out examples. Later cycles require 20 new or corrected labels across the account.
  3. A small learned adapter trains in the background while the existing model serves requests.
  4. Promotion requires at least 90% held-out accuracy and at least two more correct answers than the previous adapter. Contact heads also require at least five test examples per class, at least 80% recall per class and no increase in false positives.
  5. Only passing heads are activated. If feedback changes, learning is disabled, training fails, or the candidate does not improve, the previous weights remain.

The test split is reused across cycles. These are small private evaluation sets, not proof of general accuracy. You can inspect results and the active learned version with GET /v1/learning. Accounts retain at most 500 automatic-learning examples and 256 KiB of associated request text.

POST /v1/learning
{"enabled":false}

DELETE /v1/learning

Disabling learning immediately stops using the adapter and returns shared Core decisions; it preserves your saved adapter and labels. Resetting with DELETE removes automatic-learning labels and adapters. Separately saved TXT-training feedback and trained private TXT models remain available. Deleting all saved feedback in the console also clears automatic learning. An in-flight request may finish using the version selected when it began.

07 / Connect Arduino and edge devices

The model runs on NULIQ’s server. Your Arduino, ESP32, kiosk or gateway only needs an HTTPS client and JSON parsing. No model download, GPU or local inference memory is required.

  1. Collect the text or event description on your device.
  2. Send it over TLS to your own authenticated gateway.
  3. Have the gateway call NULIQ with its server-side key.
  4. Return the bit, category or score to the device.

Verify TLS certificates. Set a request timeout, retry with the same idempotency key, and handle unavailable results without triggering an irreversible action. A gateway keeps your account-wide API key out of extractable firmware. Text only; this API does not process raw sensor streams, audio or images.

08 / Limits, metering and errors

FieldLimit
input1–4096 UTF-8 bytes
instructionsUp to 512 UTF-8 bytes
options2–8; up to 160 UTF-8 bytes each
Model contextAll text within the byte limits is processed using bounded word/character features; no 384-token Transformer limit
Contact input1–320 UTF-8 bytes
Request rate120 inference requests per minute per account, shared across inference endpoints

Typed requests meter the UTF-8 bytes in input, instructions and caller-supplied options. Contact checks meter input bytes only. JSON field names and punctuation are excluded. Output is free. Check current pricing and free-access status in the console; cost_nano uses one billion units per US dollar. Failed inference does not debit the balance.

{"error":{"code":"invalid_input","message":"..."}}

400 invalid request · 401 missing/invalid key · 402 insufficient balance when billing is enabled · 409 idempotency conflict or request in progress · 413 oversized body/input · 429 rate limit · 503 unavailable inference. Retry 429/503 with backoff and the same idempotency key.

09 / Our model, on our servers

NULIQ Fast Core has 1,125,955 parameters trained from random initialization. Its training and serving paths use the same architecture: learned word/character representations, neural option scoring and separate neural contact heads. Fast Core does not use pretrained external weights. Separately, NULIQ Chat uses self-hosted Qwen3-4B-Instruct-2507 weights; neither route calls an external AI inference service.

The generated curriculum covers limited English/Turkish support workflows and contact patterns. It is not a general knowledge or reasoning model. Laya inspired the typed API design; JEV/Laya accuracy, multilingual coverage and benchmarks do not describe NULIQ.

Small acceptance check

On 36 authored binary workflow questions, v6 answered 22 correctly versus 12 for the previous release. On 12 choice questions it answered 11 correctly versus 6. The contact checks matched format-library labels on 29/30 email cases and 21/24 phone cases. These small tests were authored within this project and are not an external independent benchmark.

Local CPU median inference was approximately 0.25 ms for binary and 0.28 ms for choice in that run, excluding authentication, request parsing, queueing and network time. Your end-to-end API latency will be higher and depends on deployment load and network conditions.

Usage history stores metering and a keyed input fingerprint rather than raw query text. Feedback and training text are retained when you explicitly submit them. Enabled automatic learning creates an account-specific adapter; it does not modify the shared Core or other customers’ models. See the Privacy Policy.

Try Fast Core ↗