NOUKAI

Authentication

How to authenticate with Noukai — JWT tokens for the web app, API keys for server-to-server calls.

Noukai uses two authentication methods depending on the context.

Authentication Methods

MethodUse CaseHeader Format
JWT TokenWeb app sessions, dashboardAuthorization: Bearer <supabase_jwt>
API KeyServer-to-server, flow execution, productionAuthorization: Bearer nk_live_...
OAuth 2.1MCP clients (Claude Code, Cursor)Browser sign-in, automatic

For flow execution and server-to-server calls, use API keys. For MCP tool access, use OAuth — Claude Code handles this automatically when you add the server.

API Keys

Format

nk_{environment}_{key_id}_{secret}
PartExampleDescription
PrefixnkIdentifies as a Noukai key
Environmentlive or testProduction or sandbox
Key IDAb12CdEf8-character identifier
Secretyour32charsecret...32-character secret (shown once)

Creating a Key

  1. Go to Project Settings → API Keys
  2. Click Create Key
  3. Choose environment: live (production) or test (sandbox)
  4. Name your key (e.g., "Production Server")
  5. Copy the full key immediately

The secret is shown once at creation. If lost, revoke the key and create a new one.

Using a Key

Pass the full key in the Authorization header:

curl -X POST https://api.noukai.xyz/api/v1/seq/{org}/{project}/{flow}/execute \
  -H "Authorization: Bearer nk_live_Ab12CdEf_your32charsecrethere1234567890ab" \
  -H "Content-Type: application/json" \
  -d '{"message": "...", "parameters": {}}'

Limits

  • Maximum 10 active keys per project
  • Keys can be revoked instantly (propagates within 30 seconds)
  • Optional expiration date at creation

Security Best Practices

  • Never commit keys to version control
  • Use environment variables: NOUKAI_API_KEY=nk_live_...
  • Use test keys during development, live keys in production
  • Rotate keys periodically
  • Revoke compromised keys immediately via the dashboard

Scoping

Each API key is scoped to a single project within an organization. A key for project A cannot access flows in project B.

If you need to access multiple projects, create a key per project.

On this page