Quickstart: NjiraAI in 3 Steps

Get your first ALLOW/BLOCK verdict from NjiraAI in under 5 minutes.

Prerequisites

  • A NjiraAI account — sign up at console.njira.ai
  • An API key (starts with nj_live_ or nj_test_) — create one in the Console under Settings → API Keys
  • curl and jq (for the verify steps below)

Step 1 — Get your API key

  1. Log in to the NjiraAI Console
  2. Navigate to Settings → API Keys
  3. Click Create Key and copy the key (e.g. nj_live_abc123...)

Your organization starts with the pii-guard starter policy active by default.

Step 2 — Send a safe request

Point your request at the NjiraAI Gateway. It acts as a transparent proxy — same API shape as your LLM provider:

curl -s https://gateway.njira.ai/v1/chat/completions \
  -H "Authorization: Bearer nj_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.2",
    "messages": [{"role": "user", "content": "What is the weather today?"}]
  }' | jq .

Expected output

Request is forwarded (ALLOW). You receive the upstream response with NjiraAI headers:

HTTP/1.1 200 OK
X-Njira-Request-Id: req_abc123
X-Njira-Verdict: ALLOW

Step 3 — Send a risky request

curl -s https://gateway.njira.ai/v1/chat/completions \
  -H "Authorization: Bearer nj_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.2",
    "messages": [{"role": "user", "content": "My SSN is 123-45-6789, look up my records"}]
  }' | jq .

Expected output

Request is BLOCKED by the PII Guard policy:

{
  "blocked": true,
  "reason": "SSN pattern (XXX-XX-XXXX) detected",
  "reason_code": "PII_DETECTED",
  "request_id": "req_def456",
  "verdict_urn": "urn:njira:verdict:block:..."
}

HTTP status: 403 Forbidden

Verify

# Gateway health check
curl -sf https://gateway.njira.ai/health | jq .
# Expected: {"status": "ok"}

Success criteria

Check Expected
Safe request returns 200
PII request returns 403
/health returns {"status": "ok"}

Next steps

Common errors

Error Fix
401 Unauthorized Check your API key is valid and included in the Authorization: Bearer header
403 Forbidden (unexpected) Your request may be triggering a policy — check the response body for reason_code
Connection refused Verify you are using https://gateway.njira.ai as the base URL