Skip to content

Authentication & API keys

Every /v1 request is authenticated with an API key. Keys are tied to your account and carry your tier, which governs your quota and which data you can read.

Getting a key

Sign up at noms.sh, verify your email, then mint a key from your dashboard: Dashboard → API Keys → Create key. The raw key is shown once at creation and never stored, so copy it somewhere safe. If you lose it, revoke it from the same screen and mint a new one.

If a key may have leaked, rotate it in place: Dashboard → API Keys → Rotate. Rotation keeps the key's label, tier and usage history, reveals a fresh secret once, and invalidates the old secret immediately. Update your integrations with the new value; the old one stops working the moment you rotate.

A key looks like noms_sk_live_.... Treat it like a password: never commit it, never ship it in client-side code, and rotate it if it leaks.

Sending your key

Send your key in the X-API-Key header on every request:

curl https://api.noms.sh/v1/foods?q=oats \
  -H "X-API-Key: $NOMS_KEY"

When auth fails

A missing, malformed, revoked, expired or unknown key returns a deliberately opaque 401. We never reveal why a key failed, to avoid leaking a key-probing signal:

Next steps