Neuji

Authentication

The Neuji Search API authenticates with a bearer API key. Every request must carry your key in the Authorization header.

Create a key

Create and manage keys in your Neuji account under Settings → API → API keys:

  1. Enter a name for the key, so you can recognize it later.
  2. Click Create. The full key is shown once — copy it immediately and store it somewhere safe.
  3. Thereafter only a masked form (neuji_live_abc123…wxyz) is shown. Neuji never stores the raw key, so it cannot be retrieved again. If you lose a key, revoke it and create a new one.

Revoke a key at any time from the same screen; a revoked key stops working immediately.

Key format

A key looks like this:

TEXT
neuji_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

It begins with the neuji_live_ prefix, followed by a random secret. Treat a key like a password — anyone who holds it can search against your account's credit. Keep it server-side; never embed it in client-side code, mobile apps, or public repositories.

The Authorization header

Send the key as a bearer token on every request:

TEXT
Authorization: Bearer neuji_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Make an authenticated request

cURL
curl "https://api.neuji.com/v1/search?q=hello+world" \
  -H "Authorization: Bearer $NEUJI_API_KEY"
C#
using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
    new("Bearer", Environment.GetEnvironmentVariable("NEUJI_API_KEY"));
var json = await http.GetStringAsync("https://api.neuji.com/v1/search?q=hello+world");
Console.WriteLine(json);
JavaScript
const res = await fetch("https://api.neuji.com/v1/search?q=hello+world", {
  headers: { Authorization: `Bearer ${process.env.NEUJI_API_KEY}` },
});
console.log(await res.json());

Scopes

A key created in your account settings carries the search scope, which grants access to all v1 search endpoints and to Usage. A request made with a key that lacks the required scope is rejected with HTTP 403 and type: insufficient_scope — see Errors.

Failed authentication

A missing, malformed, invalid, or revoked key returns HTTP 401:

JSON
{ "error": { "type": "unauthorized", "message": "Provide a valid API key as a Bearer token.", "request_id": "…" } }

Next steps

Was this page helpful?