The CLI supports two auth modes: browser-based session login for interactive use and a project API key for CI and headless environments.Documentation Index
Fetch the complete documentation index at: https://docs.inference.net/llms.txt
Use this file to discover all available pages before exploring further.
inf auth login
Sign in through your browser using the OAuth 2.0 device authorization flow. Opens a verification URL, displays a user code, and polls until you approve in the browser.
~/.inf/config.json and auto-selects an organization (team). If you have more than one project, run inf project list and inf project switch <id> to pick one.
Session login requires a browser, so
inf auth login is not suitable for CI or other headless environments. Use inf auth set-key or the INF_API_KEY env var there instead.inf auth set-key
Store a project API key on disk for headless or CI authentication.
Arguments
| Argument | Required | Description |
|---|---|---|
key | Yes | A project API key (starts with sk-inference-) |
Example
inf auth status
Show who you’re signed in as, which auth method the CLI is using, the active team and project, and the API URL.
inf auth logout
Sign out, clear the session token / API key from ~/.inf/config.json, and forget the active project and team.
Credential resolution order
When multiple credentials are present, the CLI picks the first match:INF_API_KEYenvironment variable- API key stored via
inf auth set-key - Session token stored via
inf auth login
Configuration
The CLI stores configuration at~/.inf/config.json, created automatically on first login. Tokens are stored with 0600 permissions.
Environment variables
| Variable | Description | Default |
|---|---|---|
INF_API_KEY | API key for authentication. Takes precedence over stored credentials | — |
INF_API_URL | Override the API base URL | https://observability-api.inference.net |
INF_PROJECT_ID | Override the active project for any invocation (equivalent to --project <id> global) | — |