deeprelayDocs
UPDATED 2026.09.21READ 6 MINSUGGEST AN EDIT →
CH·02CLI

The deeprelay CLI.

deeprelay is a single binary that wraps the public REST API. Run a streaming completion from the terminal with deeprelay chat, then pull your keys, usage and billing without opening the dashboard.

§ 02.1Install

The CLI ships for darwin and linux on amd64 and arm64. Pick whichever path fits your workflow.

Homebrew (macOS + Linux)

brew install deeprelay-dev/tap/deeprelay

curl | sh

curl -fsSL https://install.deeprelay.ai/install | sh

The script detects your OS and arch, downloads the matching archive from GitHub Releases, verifies SHA-256, and installs to /usr/local/bin/deeprelay (override with INSTALL_DIR=$HOME/.local/bin).

§ 02.2Authenticate

Every command except --help and --version requires a deeprelay_live_* API key. The fastest path is the browser device flow:

SHELL
deeprelay login

That mints a key and writes it to ~/.config/deeprelay/credentials.json with mode 0600. For CI and scripts, set the environment variable instead: it takes precedence over the credentials file:

SHELL
export DEEPRELAY_API_KEY=deeprelay_live_xxxxxxxxxxxxxxxxxxxxxxxx
deeprelay models list

§ 02.3First commands

Browse the catalog, then send your first completion.

SHELL
# Every served model, newest first
deeprelay models list

# Narrow to one surface
deeprelay models list --modality chat

# Details and per-token rates for one model
deeprelay models get deeprelay/qwen2.5-7b-instruct

# What you have spent, by model
deeprelay usage

§ 02.4Run inference

chat streams tokens to stdout by default. The model id is positional, and anything after it is treated as the prompt.

SHELL
# Streaming chat completion
deeprelay chat deeprelay/qwen2.5-7b-instruct "Explain FRP tunnels in one line"

# Add a system prompt and bound the response
deeprelay chat deeprelay/qwen2.5-7b-instruct "Summarise this" \
  --system "You are terse." \
  --max-tokens 256

# Print the whole response at once instead of streaming
deeprelay chat deeprelay/qwen2.5-7b-instruct "hello" --no-stream

# Embeddings (one vector per input, in request order)
deeprelay embeddings deeprelay/qwen3-embedding-8b "first sentence" "second sentence"

# Image and video generation
deeprelay image "an isometric datacenter at dusk"
deeprelay video create --model deeprelay/wan-2.2-t2v --prompt "a drone shot over dunes"

Video generation is asynchronous: deeprelay video create returns a job id you poll with deeprelay video get, or subscribe to webhooks and be told when it lands.

§ 02.5Usage and billing

SHELL
# What have I spent
deeprelay usage --bucket day

# Filter to one model
deeprelay usage --model deeprelay/qwen2.5-7b-instruct

# Balance and spending limit
deeprelay billing balance
deeprelay spend-limit

§ 02.6Output formats

The default is table on a TTY and json when stdout is piped, so deeprelay models list | jq just works. Override with the global --output flag.

SHELL
deeprelay models list                    # table (TTY) or JSON (pipe)
deeprelay models list --output json      # always JSON
deeprelay models list --output table     # always table

# Pull just the ids of chat models
deeprelay models list --modality chat --output json | jq -r '.[].id'

§ 02.7Environment variables

VariableDefaultPurpose
DEEPRELAY_API_KEYAPI key for authenticated requests.
DEEPRELAY_API_BASEhttps://api.deeprelay.ai/v1Override the API host. Useful for staging or self-hosted backends.
DEEPRELAY_LOGIN_BASEhttps://deeprelay.aiDashboard host for the device-flow approval URL.
GPU_BROWSER_DISABLEDSet to 1 to skip auto-opening the browser on `deeprelay login`.
XDG_CONFIG_HOME~/.configOverride the directory that holds credentials.json.

§ 02.8Reference and source

Per-command pages with full flag tables start at the CLI reference (a mirror of deeprelay <cmd> --help).