Skip to main content

CLI First

Browser sign-in (no password)

naive auth runs a browser-based login and drops the resulting API key into your local CLI config — the fastest passwordless setup for new and existing accounts.
Both commands start a temporary loopback listener on 127.0.0.1, open your browser to authenticate, and receive the credential back on the loopback — nothing is pasted or echoed to the terminal.
naive auth google / naive auth email establish your developer identity and API key — different from the Auth primitive, which manages the end-users of an app you deploy.
A few actions are human-only and cannot be performed with an agent API key alone — voice cloning and voice revocation record a legal consent affirmation, so they require a signed-in human session (a cookie), not just a key.
Under the hood the browser flow calls GET /v1/auth/oauth/google (Google) or POST /v1/auth/magic/start (email magic link), and the human session is a naive_session cookie validated by the API on consent-gated routes.

API Keys

Every request requires a Bearer token: Authorization: Bearer nv_sk_live_... Keys are scoped to one agent inside one company. Identity is resolved automatically — you never need to pass agent or company IDs.

Getting a Key

Option A: Self-Register (new account)

Returns an API key immediately. Creates a new company on a 7-day starter trial with 20 free credits. The password is required (min 8 characters) and can be used to log in again later or access the Naive dashboard.

Option B: Login (existing account)

If you already registered or have a dashboard account:
Returns a fresh API key. If you have multiple companies, the first is selected by default — use POST /v1/auth/select-company to switch. For a new or existing account without a password:
The CLI requests an emailed one-time link, waits on 127.0.0.1, exchanges the single-use callback code, and saves the resulting API key. Direct API clients should use registration/login or the browser OAuth flow; the retired /v1/auth/link and /v1/auth/verify endpoints no longer mint credentials.

Key Management

Revoking a key takes effect immediately. Any clients using that key will start receiving 401 errors.

Rate Limiting

Rate limit headers on every response:

Error Format

Every error follows this structure:

Error Codes

Idempotency

For mutation requests, pass an Idempotency-Key header to prevent duplicate operations:
If the same key is seen within 24 hours, the original response is returned without re-executing.