SDKs & Libraries
@apertis/cli
@apertis/cli is a small terminal tool for the Apertis API gateway.
On this page
See your usage and spend, inspect the live model catalog, and benchmark latency, throughput, and real measured cost across models — straight from your terminal.
GitHub: apertis-ai/apertis-cli · npm: @apertis/cli
Installation
npm install -g @apertis/cliOr run it without installing:
npx @apertis/cli usageRequires Node.js 18+.
Authentication
Get an API key from the Apertis Dashboard, then provide it any of these ways (highest precedence first):
apertis --key sk-... usage # 1. per-command flag
export APERTIS_API_KEY=sk-... # 2. environment variable
apertis config set-key sk-... # 3. saved to ~/.apertis/config.json (chmod 0600)Commands
apertis usage
Your API key's lifetime usage and spend.
apertis usage
apertis usage --jsonapertis models
List available models, with optional filters.
apertis models
apertis models --owner openai
apertis models --search claude
apertis models --jsonapertis benchmark <models...>
Benchmark one or more models head-to-head. Reports client-measured latency (avg / p50), Apertis's server-side latency, throughput (tokens/sec), and the actual measured cost of the run.
apertis benchmark gpt-4o-mini claude-sonnet-4-6
apertis benchmark gpt-4o-mini -n 5 --prompt "Summarize the theory of relativity."
apertis benchmark gpt-4o-mini --jsonCost is measured from your key's used_quota_usd delta over the run — so it reflects real spend rather than a pricing-table estimate. (Best-effort: concurrent use of the same key during a benchmark can inflate it.)
apertis config
apertis config set-key sk-... # save key (and optionally --base-url)
apertis config show # show saved config (key masked)Global flags
| Flag | Description |
|---|---|
-k, --key <key> |
API key (overrides env and config file) |
--base-url <url> |
API base URL (default https://api.apertis.ai/v1) |
--json |
Machine-readable JSON output |
Links
- npm:
@apertis/cli - Source: github.com/apertis-ai/apertis-cli
- Model list & pricing: apertis.ai/pricing