Creating an API Key
AVAILABLETo authenticate requests against the Naagmani Gateway Data Plane, your application requires a valid API Key or Project Service Token.
Option A: Via the Developer Portal #
- Log into the Naagmani Developer Portal at http://localhost:3000 or https://developer.naagmani.app.
- In the left navigation sidebar, select your active Project.
- Click on API Keys in the project menu.
- Click + Create API Key.
- Give your key a descriptive name (e.g.
production-backend-key), choose an environment (Production), and click Generate. - Copy your API key (prefixed with
nsk_live_...). Store it securely—it is only displayed once.
Option B: Via the Naagmani CLI #
If you have the Naagmani CLI installed:
bash
# Authenticate CLI
naagmani auth login
# Generate a new project API key
naagmani keys create --project "my-copilot" --env "production" --name "cli-generated-key"
Key Format #
Naagmani credentials use standard prefix identifiers for fast identification:
nsk_live_...: Standard Project API Keynsk_test_...: Sandbox / Development API Keynst_live_...: Scoped Project Service Token (Machine-to-Machine)
Next Steps #
- Use your key to make a request: Sending Your First Request
- Learn about scoped machine tokens: Project Service Tokens Guide