Documentation menu

Get started

Authentication

API keys, test keys and live keys, and the two shell variables the examples use.

Create a key in your workspace under API keys and send it with every request as a bearer token. The key is shown once, so store it somewhere safe; we only keep a hash of it.

Authorization: Bearer ak_live_…
  • ak_test_… keys run the whole API against made-up results. They are free, never read your file for real and never touch live usage. Build with these.
  • ak_live_… keys do the real work and are paid from your workspace's credit.
  • A key only sees its own workspace's documents, and only those made in the same mode.

Every example in these docs uses two shell variables. Set them once:

terminal
export NORTHDOC_API="https://northdoc.northcape.tech/api/v1"
export NORTHDOC_KEY="ak_test_…"

Examples that act on an existing document also use $DOC_ID (the id you get when you send one) and, for a single question, $QUERY_ID.