Documentation

Authentication

Most public endpoints use your NavyAI API key. Send it as an Authorization header with the Bearer prefix.

Standard header

Bash
1Authorization: Bearer sk-navy-YOUR_KEY

Anthropic-compatible header

For POST /v1/messages, you can also use the Anthropic-style x-api-key header.

Bash
1x-api-key: sk-navy-YOUR_KEY
2anthropic-version: 2023-06-01

Where to get your key

You can obtain your API key from the NavyAI Dashboard. Sign in with Discord, then navigate to the Keys page to generate one. Each account can have one active key at a time.

Best practices

  • Keep keys server-side when possible
  • Rotate keys if a client or repository leaks one
  • Pass only the models your plan allows in user-facing pickers
  • Handle 401 and 403 separately so users know whether they are signed out or plan-limited
Docs Assistant
I’m here to help with NavyAI docs. Ask about endpoints, auth, models, request bodies, or integration details.