Skip to main content
You need two things: a key that starts np_live_, and the host it was issued for. Everything else is one HTTP POST.
There is no SDK to install yet. The clients below are plain HTTP against the published contract, which is exactly what the SDKs will wrap — so nothing you write here is throwaway. See Integrations.

1. Set your credentials

Keys are org-scoped and grant the ability to spend your organisation’s allowance. Keep them server-side. Never put one in a browser bundle, a mobile app, or a URL — and never in request_id, which reaches our logs (why).

2. Check you can reach the service

A 401 here means no usable Authorization header reached us; a 403 means one did and it was refused. The difference is worth wiring separately — see Errors.

3. Make a selection

Send every record you are considering, the task they must serve, and the budget they have to fit inside.

4. Read the response

Four fields carry most of the meaning:
tokens_before and tokens_after are the engine’s own accounting, useful for seeing how much a selection moved. They are not the billing quantity and cannot be recomputed from your payload — see How to recompute your own bill.

5. Fail open

This is the part to get right before you ship. Selection is an optimisation, so a failure must degrade to no optimisation — never to an empty prompt.
Do not retry a 403 — none of its causes are transient. Do retry a 429 with exponential backoff and jitter, and a 5xx only if the request is unchanged. Errors has the full table.

Next

Records and tasks

What to put in each field, and what each one buys you.

Adaptive budget

Let the engine escalate its own budget instead of guessing one.

Limits

Rate, quota and the one exact ceiling.

Authentication

Key format, rotation, and what a leaked key means.