CLI reference
The heimdallm command is @heimdallm/cli's command line client for the same public API these
docs cover: catalogue reads, account and key management, provider operations and one-shot inference
calls. Install it with npm install -g @heimdallm/cli (Node.js 22.12 or later). Commands that
support --json are marked below. Their stdout contains a JSON result instead of a table; errors
have a nonzero exit status. Login uses an interactive authorization flow and does not support
--json. Media commands can report waiting progress on stderr.
Updates are explicit: heimdallm version check reports the newest eligible version, how many
eligible releases the installation is behind, and the exact install command. A release is
recommended 24 hours after publication. Automatic notices appear at most once daily in an
interactive terminal and stay silent in JSON output, scripts and CI. Set
HEIMDALLM_NO_UPDATE_NOTIFIER=1 to disable automatic checks. The delay applies to
recommendations, not manual installation or dependency ages.
A command that changes state on the server asks for confirmation on a terminal, and with no
terminal attached refuses to run unless --yes is passed. Inference requests such as chat or
image are billed per use and run without a prompt.
Most commands share three flags: --base-url (or HEIMDALLM_BASE_URL) is the public API base
URL including /api/v1; --api-key (or HEIMDALLM_API_KEY) is the bearer key for an account
route; --host (or HEIMDALLM_HOST) selects a stored credential profile instead of a literal
key, from heimdallm login. Each is listed again per command below because its requiredness
differs: a public catalogue read takes only --base-url, an account command needs a key from one
of the three, and login/logout/auth switch take a host with no API base URL at all.
The installed heimdallm command sends requests to
https://api-staging.heimdallm.com/api/v1 and signs in through https://staging.heimdallm.com by default,
so no URL setup is needed. Pass --api (an alias of
--base-url) for another API; --web-url overrides the browser login origin. A build run from
the source tree has no default and requires an API URL.
Every HEIMDALLM_ variable is also read under the HEIMDALL_STAGING_ and HEIMDALL_
prefixes, and the HEIMDALLM_ spelling wins where both are set. A session or profile stored by
the heimdall-staging or heimdall command is read on first use, so signing in again is not
needed; those files and keychain entries are only read, never changed.
Commands are grouped by topic below the index: auth, batches, benchmarks, deposits, endpoints, families, files, generations, keys, meshes, models, providers, version, videos, webhooks each
hold more than one subcommand, and every other command stands alone.
Commands
| Command | Description |
|---|---|
heimdallm activity | The account's usage for one UTC day, over GET /activity, in the row shape OpenRouter's /activity publishes. |
heimdallm auth status | The credential backend and the host a command uses by default. |
heimdallm auth switch | Make a host with a stored API key the active profile. |
heimdallm batches cancel | Stop a batch, over POST /batches/{id}/cancel. |
heimdallm batches create | Submit up to 1000 requests to run in the background against one endpoint, over POST /batches. |
heimdallm batches list | Batches on the key's own account, newest first, over GET /batches. |
heimdallm batches show | A batch with its status, request counts and, once it has ended, the outcome of every request, over GET /batches/{id}. |
heimdallm benchmarks list | Benchmark suites and the current results of every serving variant, over GET /benchmarks. |
heimdallm benchmarks variant | One serving variant's current benchmark results and the task attempts of each selected run, over GET /benchmarks/variants/{endpointId}. |
heimdallm catalogue | The complete catalogue — models, families and providers — from one consistent view, over GET /catalogue. |
heimdallm chat | A chat completion over POST /chat/completions, streamed as it arrives. |
heimdallm complete | The legacy text-completions shape over POST /completions: a prompt in, text out, no conversation structure. |
heimdallm completion | Print a shell completion script for bash, zsh or fish, generated from the loaded command tree so it cannot drift from the commands and flags the CLI accepts. |
heimdallm credits | Credited and debited totals for the account the presented key belongs to, over GET /credits. |
heimdallm decisions | Answer a typed question about a state. |
heimdallm deposits create | Settle a signed-authorization (x402) deposit, over POST /deposits/x402. |
heimdallm deposits stripe | The card deposit rail terms, over GET /deposits/stripe. |
heimdallm deposits x402 | The signed-authorization (x402) deposit rail terms, over GET /deposits/x402. |
heimdallm embed | Text embeddings over POST /embeddings. |
heimdallm endpoints zdr | Every live endpoint ZDR routing keeps, across the whole catalogue, over GET /endpoints/zdr: a zero-data-retention claim whose provider an operator approved. |
heimdallm families list | List families, over GET /families. |
heimdallm families show | One family, over GET /families/{author}/{slug}: the family, every served model in it and every live endpoint across those models. |
heimdallm files delete | Delete a stored file and its content, freeing what it held against the account quota, over DELETE /files/{id}. |
heimdallm files download | Save a stored file's bytes to a new file, over GET /files/{id}/content. |
heimdallm files list | Every unexpired file on the key's own account, newest first, over GET /files. |
heimdallm files show | One stored file's metadata, without its content, over GET /files/{id}. |
heimdallm files upload | Store a file on the key's own account, over POST /files, for a chat, Responses or Messages request to name by id (chat --file). |
heimdallm generations show | A recorded generation or a funded request awaiting a final record, over GET /generation, scoped to the presented key's own account. |
heimdallm image | An image generation over POST /images. |
heimdallm key | What the presented key is, what it has spent and what its ceiling leaves, over GET /key. |
heimdallm keys create | A new key in the presented management key's own workspace, over POST /keys. |
heimdallm keys list | Every key in the presented management key's own workspace, newest first, over GET /keys. |
heimdallm keys revoke | Disables a key in the presented management key’s own workspace, over DELETE /keys/:hash. |
heimdallm keys rotate | Replaces a key’s material while keeping its name and limit. |
heimdallm keys update | Edit a key in the presented management key's own workspace, over PATCH /keys/:hash. |
heimdallm log | The local call log that chat, complete and embed each append a row to, newest first. |
heimdallm login | Store an API key for a host. |
heimdallm logout | Remove a host's stored API key and clear it as the active profile. |
heimdallm mcp | Serve the Heimdallm Model Context Protocol server on stdin and stdout, for an agent to launch: model discovery, chat and media generation, files, batches, account usage, key administration and provider operations as tools, each an ordinary request to the API billed as one. |
heimdallm meshes cancel-repair | Stop optional mesh repair, preserving generation and the last validated repair. |
heimdallm meshes create | Generate a mesh from a prompt. |
heimdallm meshes download | Download a mesh GLB to a new file, resuming an interrupted transfer. |
heimdallm meshes models | List mesh generation models, or available vision repair models and machine pricing. |
heimdallm meshes show | Read a mesh job, geometry, repair progress and exact repair charges. |
heimdallm models benchmarks | A model's benchmark scores, over GET /models/{author}/{slug}/benchmarks. |
heimdallm models count | The number of served models across every modality, before any filter or page, over GET /models/count. |
heimdallm models embeddings | Every served model with an embeddings output, over GET /embeddings/models, in the summary shape models list prints. |
heimdallm models endpoints | A model and every live endpoint serving it, over GET /models/{author}/{slug}/endpoints. |
heimdallm models image-endpoints | Every live endpoint serving one image model, over GET /images/models/{author}/{slug}/endpoints: the parameters it accepts, whether it streams, and one price line per unit it charges for. |
heimdallm models images | Every served image model in the terms the image contract uses, over GET /images/models. |
heimdallm models list | List every served model. |
heimdallm models show | Show one served model, the same object GET /models lists. |
heimdallm models speech | Every served speech model, over GET /speech/models, with the voices and codecs its live endpoints declare between them. |
heimdallm models user | The complete model list narrowed by the presented key's own account preferences, over GET /models/user. |
heimdallm promotions | The active marketplace offers, over GET /promotions: the site offer, then each approved provider with an active catalogue offer and a live endpoint. |
heimdallm providers earnings | The presented key's provider's earnings for one month: totals, a breakdown by model, and a breakdown by the statement that claims each part, over GET /providers/earnings. |
heimdallm providers list | List approved providers, over GET /providers. |
heimdallm providers probe-now | Makes one of the presented key's provider's endpoints due for a health probe immediately rather than waiting out the failure backoff, and reports the schedule the request left on it. |
heimdallm providers pull-now | Re-reads one of the presented key's provider's source documents immediately rather than waiting for its schedule, and reports the resulting pull run. |
heimdallm providers statements | Every statement issued to the presented key's provider, newest period first, over GET /providers/statements. |
heimdallm providers status | The presented key's provider: every live, pending-health, provider-not-ready or disabled endpoint it serves, with the same health, measured figures and pricing a customer choosing one would read off the catalogue, beside the outcome of the provider's most recent pull of any of its source documents. |
heimdallm providers validate | Validate a models document against the marketplace’s own v2.4 parser, offline, before it is published. |
heimdallm rerank | Rank text documents against a query. |
heimdallm speech | Speak text and save the audio. |
heimdallm stats | Marketplace usage aggregates over the last 30 days, over GET /stats/public. |
heimdallm status | The status board: every approved provider's live endpoints with measured health, over GET /status. |
heimdallm transcribe | A transcription over POST /audio/transcriptions: upload a FILE as multipart/form-data, or pass a JSON --request containing base64 input_audio. |
heimdallm version check | Check npm for eligible updates without installing anything. |
heimdallm videos create | Generate a video from a prompt. |
heimdallm videos download | Download a completed video job’s MP4 to a new file, resuming an interrupted transfer. |
heimdallm videos models | List video generation models and their declared capabilities. |
heimdallm videos show | Read a video job and its generation progress. |
heimdallm webhooks rotate | Replaces the webhook signing secret of the presented management key’s account, over POST /webhooks/signing-secret/rotate, and prints the new one. |
heimdallm webhooks secret | The secret every job webhook of the presented management key’s account is signed with, over GET /webhooks/signing-secret. |
heimdallm activity
The account's usage for one UTC day, over GET /activity, in the row shape OpenRouter's /activity publishes. Without --date, the day the account's daily spend window is currently in. --group-by (default model) sets what a row is: model aggregates across every endpoint and key that served it, endpoint splits a model's rows by which endpoint served them, and key splits by which API key spent them and adds api_key_hash to every row. Grouping only ever splits a day into more rows: the sum of any field over a grouped day's rows equals the same model's row at the default grouping. Money fields (usage, spend, byok_usage_inference) are decimal strings, printed exactly as the wire sends them.
Supports --json for machine-readable output.
Aliased as usage.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--date | string | no | The UTC day to report, YYYY-MM-DD. Defaults to the account's current spend day. |
--group-by | one of model, endpoint, key | no | How to split the day into rows. |
--api-key-hash | string | no | Restrict to one API key on the account, by its SHA-256 hash (the form heimdallm key and the request log publish, never the key itself). |
heimdallm auth status
The credential backend and the host a command uses by default. Never prints a key, not even a prefix of one.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
heimdallm auth switch
Make a host with a stored API key the active profile.
| Argument | Required | Description |
|---|---|---|
host | yes | A host with a stored credential, from heimdallm login. |
heimdallm batches cancel
Stop a batch, over POST /batches/{id}/cancel. It reads cancelling until the requests in flight have settled, then cancelled. A completed request keeps its reply and its charge; one cut or never sent is not charged. Prompts for confirmation on a terminal; pass --yes to run it without one.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Batch id, batch_ and 32 hex. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm batches create
Submit up to 1000 requests to run in the background against one endpoint, over POST /batches. --input is a JSONL file of { "custom_id", "body" } lines; a line in the OpenAI batch input form (method, url) is accepted and its url names the endpoint. Every request is routed, held and billed exactly as the same body sent live, and the batch earns no discount. --wait polls the batch to a terminal status, and --out also saves its results file. Prompts for confirmation on a terminal; pass --yes to run it without one.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--input | string | yes | JSONL request file, or - for standard input. |
--endpoint | one of /v1/chat/completions, /v1/responses, /v1/messages | no | The endpoint every body is written for. Defaults to the url the lines name. |
--model | string | no | Model for every request whose body names none. |
--provider | string (repeatable) | no | Provider slug to use for every request whose body states no preference. Repeatable. |
--fallbacks | boolean | no | Whether another provider may serve a request the named ones cannot (--no-fallbacks refuses). |
--wait | boolean | no | Wait until the batch reaches a terminal status. |
--out | string | no | Wait and save the results file, one JSON line per request, to a new file. Existing files are refused before anything is sent. |
--timeout | string | no | Maximum seconds to wait. A timeout leaves the batch running. (default 86400) |
--poll-interval | string | no | Seconds between batch status requests while waiting. (default 10) |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm batches list
Batches on the key's own account, newest first, over GET /batches. Every flag is a query parameter the route serves. When more remain, the id to pass as --after for the next page prints beneath the table; batches show has the results.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--limit | string | no | Batches per page, 1 through 100. |
--after | string | no | The last_id of the previous page. |
--status | one of validating, in_progress, cancelling, completed, failed, expired, cancelled (repeatable) | no | Only batches in this status. Repeatable. |
--created-after | string | no | Only batches created strictly after this instant: unix seconds, a date or an ISO 8601 instant. |
--created-before | string | no | Only batches created strictly before this instant. |
heimdallm batches show
A batch with its status, request counts and, once it has ended, the outcome of every request, over GET /batches/{id}. Results are held for 48 hours from the batch ending. --wait polls it to a terminal status, and --out also saves its results file.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Batch id, batch_ and 32 hex. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--wait | boolean | no | Wait until the batch reaches a terminal status. |
--out | string | no | Wait and save the results file, one JSON line per request, to a new file. Existing files are refused before anything is sent. |
--timeout | string | no | Maximum seconds to wait. A timeout leaves the batch running. (default 86400) |
--poll-interval | string | no | Seconds between batch status requests while waiting. (default 10) |
heimdallm benchmarks list
Benchmark suites and the current results of every serving variant, over GET /benchmarks. A score is provisional until its run completes; completed beside expected is the coverage it stands on, and a result with no score prints a dash. --model, --provider and --suite filter the printed rows locally; --json prints the whole document.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--model | string | no | Local filter. Only variants of this model id. |
--provider | string | no | Local filter. Only variants served by this provider slug. |
--suite | string | no | Local filter. Only results of this suite id. |
heimdallm benchmarks variant
One serving variant's current benchmark results and the task attempts of each selected run, over GET /benchmarks/variants/{endpointId}. The table counts the attempts per run by outcome; --json prints every attempt.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
endpoint-id | yes | The served endpoint UUID. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm catalogue
The complete catalogue — models, families and providers — from one consistent view, over GET /catalogue. The table counts each; --json prints the whole document, bounded to 2 MiB.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm chat
A chat completion over POST /chat/completions, streamed as it arrives. Runs one-shot when a PROMPT argument is given or stdin is piped, and opens an interactive turn loop only when neither is present. Tokens print to stdout as they stream; under --json, stdout carries nothing until the stream ends, then one response document with usage and the generation id, in the same shape as a non-streamed chat completion. Ctrl-C during a stream aborts the request, leaves whatever text already printed in place, and exits 130; the call log still records the generation id when one arrived before the interrupt.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
prompt | no | The prompt, used instead of reading standard input. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--model | string | no | Marketplace model id. Absent selects the newest live model for this rail. |
--system | string | no | System message prepended to the conversation. |
--temperature | string | no | Sampling temperature in [0, 2]. |
--max-tokens | string | no | Ceiling on generated tokens. |
--tools | string | no | Path to a JSON file holding the tools array. |
--reasoning-effort | one of none, minimal, low, medium, high, xhigh, max | no | Reasoning level, sent as reasoning_effort. Routing skips an endpoint shown to refuse the level. |
--provider | string (repeatable) | no | Provider slug to route to, sent as provider.only. Repeatable. |
--file | string (repeatable) | no | Stored file id (files upload) attached to the first user message as a file part. Repeatable. |
--request | string | no | Complete chat JSON request file, or - for standard input. |
--log-text | boolean | no | Record prompt and completion text in the local call log (omitted by default). |
heimdallm complete
The legacy text-completions shape over POST /completions: a prompt in, text out, no conversation structure. Give a PROMPT, pipe standard input, or pass a complete --request file.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
prompt | no | The prompt, used instead of reading standard input. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--model | string | no | Marketplace model id. Absent selects the newest live model for this rail. |
--temperature | string | no | Sampling temperature in [0, 2]. |
--max-tokens | string | no | Ceiling on generated tokens. |
--request | string | no | Complete JSON request file, or - for standard input. |
--log-text | boolean | no | Record prompt and completion text in the local call log (omitted by default). |
heimdallm completion
Print a shell completion script for bash, zsh or fish, generated from the loaded command tree so it cannot drift from the commands and flags the CLI accepts. Topic names, the commands within a topic, flags and the fixed values of a flag complete in a fresh shell. Load the script from the shell startup file: source <(heimdallm completion bash) for bash, source <(heimdallm completion zsh) for zsh after compinit, or heimdallm completion fish > ~/.config/fish/completions/heimdallm.fish for fish. A zsh script saved as a function file named after the command, on the function path, loads without sourcing.
| Argument | Required | Description |
|---|---|---|
shell | yes | The shell to print a completion script for: bash, zsh or fish. |
heimdallm credits
Credited and debited totals for the account the presented key belongs to, over GET /credits. The balance is the difference between the two; both figures are exact.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
heimdallm decisions
Answer a typed question about a state. A plain question asks yes/no (noul); --choice ranks named options and --level scores ordered levels. Use --request for multiple questions or structured state.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
state | no | The text to judge. |
question | no | The question to answer about the state. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--model | string | no | Marketplace model id. Absent selects the newest live model for this rail. |
--choice | string (repeatable) | no | Choice NAME=DESCRIPTION; repeat for each option. |
--level | string (repeatable) | no | Score level description, lowest first; repeat for each level. |
--request | string | no | Complete JSON request file, or - for standard input. |
--log-text | boolean | no | Record the state and questions in the local call log. |
heimdallm deposits create
Settle a signed-authorization (x402) deposit, over POST /deposits/x402. With no signature from --payment-signature or HEIMDALLM_PAYMENT_SIGNATURE the answer is the 402 PaymentRequired terms the protocol itself defines, not a settled deposit, so a quote is asked for with neither set: sign the printed offer with the paying wallet and resubmit the same --amount and --network carrying that signature, in --payment-signature or the environment variable, to settle it. A signature already in the environment is sent and settles. The credit posts at the chain's confirmation depth, not with this command's own response.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--amount | string | yes | USD as an exact decimal string, such as "25" or "25.00". A float amount is refused. |
--network | string | no | CAIP-2 network id, such as eip155:8453. Optional where the rail quotes one chain. |
--payment-signature | string | no | The base64 PaymentPayload from the paying wallet's own signing, carried in the PAYMENT-SIGNATURE header. - reads it from stdin, and the environment variable supplies it without a flag; either keeps a signed authorization out of the process list, where any local user can read an argument. (or HEIMDALLM_PAYMENT_SIGNATURE) |
--yes | boolean | no | Settle without a confirmation prompt. |
heimdallm deposits stripe
The card deposit rail terms, over GET /deposits/stripe. No key is required. Nothing here takes money: the Checkout Session that does is created on the browser session plane.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm deposits x402
The signed-authorization (x402) deposit rail terms, over GET /deposits/x402. No key is required. { "enabled": false } alone means the rail is not configured.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm embed
Text embeddings over POST /embeddings. Give an INPUT, pipe standard input, or pass a complete --request file for batches and provider settings. Vectors never print to a table; use --json to read them.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
input | no | The text to embed, used instead of reading stdin when stdin is not a terminal. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--model | string | no | Marketplace model id. Absent selects the newest live model for this rail. |
--request | string | no | Complete JSON request file, or - for standard input. |
--log-text | boolean | no | Record the input text in the local call log (omitted by default). |
heimdallm endpoints zdr
Every live endpoint ZDR routing keeps, across the whole catalogue, over GET /endpoints/zdr: a zero-data-retention claim whose provider an operator approved. What a request with provider.zdr: true routes to.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm families list
List families, over GET /families. A family is one base model and the variants published from it, such as a quantisation or an abliteration.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm families show
One family, over GET /families/{author}/{slug}: the family, every served model in it and every live endpoint across those models. A family none of whose models is served prints empty tables.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Family id, author/slug. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm files delete
Delete a stored file and its content, freeing what it held against the account quota, over DELETE /files/{id}. A second delete answers 404. Prompts for confirmation on a terminal; pass --yes to run it without one.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | File id, file_ and 32 hex. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm files download
Save a stored file's bytes to a new file, over GET /files/{id}/content. The destination must not exist, and is written only once every byte has arrived.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | File id, file_ and 32 hex. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--out | string | yes | New file to write. Existing files are refused before fetching. |
heimdallm files list
Every unexpired file on the key's own account, newest first, over GET /files. When more remain, the id to pass as --after for the next page prints beneath the table.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--limit | string | no | Files per page, 1 through 100 (served by the wire). |
--after | string | no | The id the previous page ended on (served by the wire). |
heimdallm files show
One stored file's metadata, without its content, over GET /files/{id}. A file past its expires_at answers 404, as a deleted one does.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | File id, file_ and 32 hex. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
heimdallm files upload
Store a file on the key's own account, over POST /files, for a chat, Responses or Messages request to name by id (chat --file). The file expires 48 hours after it is stored. One file is capped at 32 MiB and an account at 512 MiB across its unexpired files. Without --type the part is sent as application/octet-stream and typed from the filename extension. Prompts for confirmation on a terminal; pass --yes to run it without one.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
path | yes | The file to store. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--name | string | no | Filename to store under. Defaults to the base name of PATH. |
--type | string | no | Content type of the part, such as application/pdf. Defaults to the filename extension. |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm generations show
A recorded generation or a funded request awaiting a final record, over GET /generation, scoped to the presented key's own account. record_state is recorded or unrecorded: an unrecorded request leaves final tokens, timings and cost null. Absent measurements print null, never a measured zero. Consults the local call log first: a row logged under this id by chat, complete, embed, image or transcribe prints from there with no request sent, and the gateway is asked only when the log holds no such row or --remote is given.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Generation id, as returned in X-Generation-Id or the response id. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--remote | boolean | no | Skip the local call log and always ask the gateway. |
heimdallm image
An image generation over POST /images. Give a PROMPT or a complete --request file. The reply is asked for whole: rendered images are base64-decoded and written to --out (with numbered names for additional images), or the sole image to stdout when --out is -. Under --json, the printed response document replaces each image's base64 payload with its decoded byte count.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
prompt | no | What to draw. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--model | string | no | Marketplace model id. Absent selects the newest live image model. |
--out | string | no | File to write the decoded image to, or - for stdout. Defaults to image.FORMAT. |
--provider | string | no | Pin generation to this provider slug. |
--adapters | string | no | JSON file containing adapter selections: id, revision and strength. |
--size | string | no | WIDTHxHEIGHT, matched against the endpoint's declared envelope. |
--n | string | no | How many images to render. |
--request | string | no | Complete JSON request file, or - for standard input. |
--log-text | boolean | no | Record the prompt text in the local call log (omitted by default). |
heimdallm key
What the presented key is, what it has spent and what its ceiling leaves, over GET /key. A key with no ceiling reports null for every ceiling field rather than a zero.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
heimdallm keys create
A new key in the presented management key's own workspace, over POST /keys. The plaintext prints exactly once, in this command’s own response, and is never written to the local call log or anywhere else this process keeps state — read it now or lose it, the same as the API itself never stores it.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--name | string | yes | A label for the key, up to 80 characters. |
--limit | string | no | A spend ceiling as a decimal USD string, such as "10" or "10.00". Omit for none. |
--limit-reset | one of daily, weekly, monthly | no | How the ceiling resets. Omit for a lifetime ceiling. |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm keys list
Every key in the presented management key's own workspace, newest first, over GET /keys. Served only to a management key; a spending key gets the same refusal every other management route answers it with. Never carries key material — only the plaintext a create or rotate just minted does, and only in that one response.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
heimdallm keys revoke
Disables a key in the presented management key’s own workspace, over DELETE /keys/:hash. The key’s next authenticated request fails from that point on. Idempotent — revoking an already-disabled key succeeds without changing anything. Prompts for confirmation on a terminal; pass --yes to run it without one.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
hash | yes | The key hash, as shown by keys list. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm keys rotate
Replaces a key’s material while keeping its name and limit. No single gateway route rotates a key, so this composes three calls under one confirmation: GET /keys/:hash to read the existing name, limit and limit_reset, POST /keys with the same three to mint a replacement, then DELETE /keys/:hash on the original. The new plaintext prints exactly once, the same as keys create. If the DELETE step fails after the POST succeeds, both keys are left live and the command says so — it never guesses which one to keep. Prompts for confirmation on a terminal; pass --yes to run it without one.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
hash | yes | The key hash to rotate, as shown by keys list. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm keys update
Edit a key in the presented management key's own workspace, over PATCH /keys/:hash. Only the members given change; at least one is required. --limit none removes the spend ceiling and --limit-reset none makes it a lifetime one. --disabled suspends the key and --no-disabled lifts the suspension; keys revoke is the permanent form, and a revoked key is never re-enabled. Prompts for confirmation on a terminal; pass --yes to run it without one.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
hash | yes | The key hash, as shown by keys list. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--name | string | no | Rename the key, up to 80 characters. |
--limit | string | no | Replace the spend ceiling with a decimal USD string such as "25", or none to remove it. |
--limit-reset | one of daily, weekly, monthly, none | no | Replace how the ceiling resets; none makes it a lifetime ceiling. |
--disabled | boolean | no | Suspend the key; --no-disabled lifts the suspension. |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm log
The local call log that chat, complete and embed each append a row to, newest first. Stored under $XDG_DATA_HOME/heimdallm (default ~/.local/share/heimdallm). Holds no prompt or completion text unless the call that produced a row was run with --log-text.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--limit | string | no | Row cap. (default 20) |
heimdallm login
Store an API key for a host. The default flow opens the browser on the marketplace's authorization page. Paste its one-time code here, or finish in the browser on the same computer. It uses --web-url (or HEIMDALLM_WEB_URL) for its web origin. An installed release has a built-in default. --with-token reads the key from stdin instead, for CI and containers. Use --manual when the browser runs on another computer.
| Flag | Type | Required | Description |
|---|---|---|---|
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--base-url | string | no | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--web-url | string | no | Marketplace web app origin for browser authorization. (or HEIMDALLM_WEB_URL) |
--with-token | boolean | no | Read the API key from stdin instead of the browser authorization flow. |
--manual | boolean | no | Print the approval URL and accept a pasted code without opening a browser or local port. |
--timeout | string | no | Seconds to wait for the browser to complete authorization. (default 300) |
heimdallm logout
Remove a host's stored API key and clear it as the active profile.
| Flag | Type | Required | Description |
|---|---|---|---|
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
heimdallm mcp
Serve the Heimdallm Model Context Protocol server on stdin and stdout, for an agent to launch: model discovery, chat and media generation, files, batches, account usage, key administration and provider operations as tools, each an ordinary request to the API billed as one. The key is --api-key, then the stored profile for the host; without one the catalogue tools still answer and the account tools answer 401. Paths the tools read and write resolve against the working directory. Stdout carries nothing but the protocol.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--management-key | string | no | Management key sent on the key administration tools only. Without it those tools send the API key. (or HEIMDALLM_MANAGEMENT_KEY) |
heimdallm meshes cancel-repair
Stop optional mesh repair, preserving generation and the last validated repair. Poll meshes show until repair is terminal.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Mesh job id. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm meshes create
Generate a mesh from a prompt. Use --input for a full JSON request with views, texture and repair options. Use --out to wait and save the GLB, or --wait to return the completed job.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
prompt | no | What to build. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--wait | boolean | no | Wait through generation and optional repair. |
--out | string | no | Wait and save the selected GLB to a new file. Existing files are refused before submitting. |
--index | string | no | Download this index instead of the selected result: 0 original, 1 repair. |
--timeout | string | no | Maximum seconds to wait. A timeout leaves the server job running. (default 7200) |
--poll-interval | string | no | Seconds between job status requests while waiting. (default 5) |
--model | string | no | Marketplace model id. Absent selects the newest live mesh model. |
--target-faces | string | no | Maximum number of faces. |
--seed | string | no | Reproducible generation seed. |
--input | string | no | Complete JSON request file, or - for standard input. |
heimdallm meshes download
Download a mesh GLB to a new file, resuming an interrupted transfer. Index 0 is the original; index 1 is the validated repair when available. The destination must not exist.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Mesh job id. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--index | string | no | Artifact index from the job document. (default 0) |
--out | string | yes | New GLB file to write. Existing files are refused before fetching. |
heimdallm meshes models
List mesh generation models, or available vision repair models and machine pricing.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--refiners | boolean | no | List available repair models and machine price instead of generators. |
heimdallm meshes show
Read a mesh job, geometry, repair progress and exact repair charges. Use --wait to wait for completion or --out to wait and save the selected GLB to a new file.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Mesh job id. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--wait | boolean | no | Wait through generation and optional repair. |
--out | string | no | Wait and save the selected GLB to a new file. Existing files are refused before submitting. |
--index | string | no | Download this index instead of the selected result: 0 original, 1 repair. |
--timeout | string | no | Maximum seconds to wait. A timeout leaves the server job running. (default 7200) |
--poll-interval | string | no | Seconds between job status requests while waiting. (default 5) |
heimdallm models benchmarks
A model's benchmark scores, over GET /models/{author}/{slug}/benchmarks. The benchmark bank runs as real paid traffic through the routing customers use, and a dataset appears only where its run holds enough samples to publish. The grading note prints beneath the table.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Model id, author/slug. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm models count
The number of served models across every modality, before any filter or page, over GET /models/count.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm models embeddings
Every served model with an embeddings output, over GET /embeddings/models, in the summary shape models list prints.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--offset | string | no | Records to skip (served by the wire). |
--limit | string | no | Maximum records to return (served by the wire). |
heimdallm models endpoints
A model and every live endpoint serving it, over GET /models/{author}/{slug}/endpoints. A measured figure whose window holds fewer samples than its own gate is null, printed as a dash in the table and as null in --json — never as a measured zero. Each price is what a request is charged; pricing.discount is the fraction already taken off it, and is 0 on an endpoint charging its published price.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Model id, author/slug. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm models image-endpoints
Every live endpoint serving one image model, over GET /images/models/{author}/{slug}/endpoints: the parameters it accepts, whether it streams, and one price line per unit it charges for. A unit with no published line is unknown, never free.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Image model id, author/slug. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm models images
Every served image model in the terms the image contract uses, over GET /images/models. supported_parameters and supports_streaming are the union across the live endpoints, a discovery aid rather than a promise any one endpoint keeps; models image-endpoints answers per endpoint.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--offset | string | no | Records to skip (served by the wire). |
--limit | string | no | Maximum records to return (served by the wire). |
heimdallm models list
List every served model. --family, --limit and --offset are the query parameters the public /models route serves; every other flag filters the returned page locally, after it is fetched. --provider and --zdr read a live endpoint, which the list route does not carry, so each fetches one candidate's endpoints route after the other filters have narrowed the page.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--family | string | no | Restrict the list to one family id (served by the wire). |
--limit | string | no | Page size (served by the wire). |
--offset | string | no | Rows to skip (served by the wire). |
--modality | string | no | Local filter. Keep models whose architecture.modality, input_modalities or output_modalities contain this text, case-insensitive (for example "image"). |
--min-context | string | no | Local filter. The model's declared context_length floor. |
--max-context | string | no | Local filter. The model's declared context_length ceiling. |
--max-prompt-price | string | no | Local filter. Keep models whose cheapest live endpoint's effective prompt price, net of any discount and a decimal USD-per-token string, is at or under this ceiling. A model with no published prompt price is excluded: absence is unknown, never free. |
--max-completion-price | string | no | Local filter. The same ceiling, applied to the effective completion price. |
--supports | string (repeatable) | no | Local filter. Keep models declaring this supported_parameters entry. Repeatable; every given value must be declared. |
--provider | string | no | Local filter, fetched per candidate. Keep models with a live endpoint from this provider slug. |
--zdr | boolean | no | Local filter, fetched per candidate. Keep models with a live endpoint whose compliance.zdr is true. |
heimdallm models show
Show one served model, the same object GET /models lists.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Model id, author/slug. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm models speech
Every served speech model, over GET /speech/models, with the voices and codecs its live endpoints declare between them. The union is what can be asked for somewhere, not what any one endpoint keeps; models endpoints shows each endpoint. Read this before choosing a speech --voice.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--offset | string | no | Records to skip (served by the wire). |
--limit | string | no | Maximum records to return (served by the wire). |
heimdallm models user
The complete model list narrowed by the presented key's own account preferences, over GET /models/user. A workspace whose default routing preference requires ZDR sees only the models with a live endpoint ZDR routing keeps; any other account sees the list models list reads.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
heimdallm promotions
The active marketplace offers, over GET /promotions: the site offer, then each approved provider with an active catalogue offer and a live endpoint. fraction is an exact decimal taken off the price; a request receives the larger of an endpoint discount and the offer, never both.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm providers earnings
The presented key's provider's earnings for one month: totals, a breakdown by model, and a breakdown by the statement that claims each part, over GET /providers/earnings. Without --month, the current month. Every amount is an exact decimal USD string, printed exactly as the wire sends it, never converted to a float.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--month | string | no | The UTC month to report, YYYY-MM. Defaults to the current month. |
heimdallm providers list
List approved providers, over GET /providers.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm providers probe-now
Makes one of the presented key's provider's endpoints due for a health probe immediately rather than waiting out the failure backoff, and reports the schedule the request left on it. Over POST /providers/probe-now. --endpoint-id names which endpoint, as providers status publishes it; a withdrawn endpoint and one belonging to somebody else both answer 404. The answer is the schedule rather than a verdict: the marketplace runs the probe on its next tick, and the request has been served once providers status reports a last_probe_at newer than the requested_at printed here. Refused, at the interval the schedule itself keeps to, when the endpoint was probed or asked for too recently. The provider must be approved.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--endpoint-id | string | yes | Which endpoint to probe, as providers status publishes it. One endpoint is always named: a provider lists many, and every probe is a real paid request. |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm providers pull-now
Re-reads one of the presented key's provider's source documents immediately rather than waiting for its schedule, and reports the resulting pull run. Over POST /providers/pull-now. --source-id names which source; it is required only where the provider holds more than one active source. Refused, at the interval the schedule itself keeps to, when the named source (or the provider’s whole set of sources when none is named) was pulled too recently. The provider must be approved.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--source-id | string | no | Which source to pull. Omitted, the one active source is pulled; required once more than one is active. |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm providers statements
Every statement issued to the presented key's provider, newest period first, over GET /providers/statements. earliest_earned_month is the earliest month of an earning the statement claims, which reads earlier than period_start when the statement picked up an earning that settled after its own month was already paid. Every amount is an exact decimal USD string, printed exactly as the wire sends it.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
heimdallm providers status
The presented key's provider: every live, pending-health, provider-not-ready or disabled endpoint it serves, with the same health, measured figures and pricing a customer choosing one would read off the catalogue, beside the outcome of the provider's most recent pull of any of its source documents. Over GET /providers/status. last_pull is null before the first pull. Withdrawn endpoints are not listed and are not counted. Each endpoint carries when it was last probed and how that probe ended, and one line under the table names when its newest failed probe ran and what it was answered with: the path the provider's own server was asked for and the status it gave, beside the status the marketplace recorded.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
heimdallm providers validate
Validate a models document against the marketplace’s own v2.4 parser, offline, before it is published. Reports the same errors a pull of the document records, so a mistake is caught here rather than in a reconcile warning hours later. Runs no tips, since every tip reads measured or filled marketplace state (health, capability checks, Hub-filled facts) this command never fetches.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
path | yes | Path to the published models document (JSON). |
heimdallm rerank
Rank text documents against a query. Give the query first and documents after it, or repeat --document. Use --request for the full JSON request including image documents and provider preferences.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
text | no | The query followed by text documents. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--model | string | no | Marketplace model id. Absent selects the newest live model for this rail. |
--document | string (repeatable) | no | A text document to rank; repeat for each document. |
--top-n | string | no | Return this many highest-ranked documents. |
--request | string | no | Complete JSON request file, or - for standard input. |
--log-text | boolean | no | Record the query and ranked documents in the local call log. |
heimdallm speech
Speak text and save the audio. Use --request for the full JSON request, including a voice sample or provider preferences. --json reports metadata, never encoded audio.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
text | no | Text to speak. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--model | string | no | Marketplace model id. Absent selects the newest live speech model. |
--out | string | no | Output audio file, or - for stdout. Defaults to speech.FORMAT. |
--voice | string | no | Voice to use; omit for the endpoint default. |
--format | one of mp3, wav, pcm, opus, flac, aac, mulaw, alaw | no | Output audio codec. (default mp3) |
--speed | string | no | Playback speed, within the model envelope. |
--instructions | string | no | Delivery instructions for an endpoint that supports them. |
--request | string | no | Complete JSON request file, or - for standard input. |
--log-text | boolean | no | Record the spoken text in the local call log. |
heimdallm stats
Marketplace usage aggregates over the last 30 days, over GET /stats/public.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm status
The status board: every approved provider's live endpoints with measured health, over GET /status.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
heimdallm transcribe
A transcription over POST /audio/transcriptions: upload a FILE as multipart/form-data, or pass a JSON --request containing base64 input_audio. Prints the transcript text; under --json, the full response document (usage.seconds, usage.cost, and duration/language/segments/words when the endpoint reports them).
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
file | no | Path to the audio file to transcribe. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--model | string | no | Marketplace model id. Absent selects the newest live transcription model. |
--language | string | no | ISO-639-1 source language; supplying it skips detection. |
--request | string | no | Complete JSON request with base64 input_audio, or - for standard input. |
--log-text | boolean | no | Record the transcript text in the local call log (omitted by default). |
heimdallm version check
Check npm for eligible updates without installing anything. A release is recommended 24 hours after it is published.
Supports --json for machine-readable output.
Aliased as upgrade.
heimdallm videos create
Generate a video from a prompt. Use --input for a full JSON request with references and provider options. Use --out to wait and save the MP4, or --wait to return the completed job.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
prompt | no | What the clip should show. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--wait | boolean | no | Wait for video generation to complete. |
--out | string | no | Wait and save the MP4 to a new file. Existing files are refused before submitting. |
--index | string | no | Video artifact index (0). |
--timeout | string | no | Maximum seconds to wait. A timeout leaves the server job running. (default 7200) |
--poll-interval | string | no | Seconds between job status requests while waiting. (default 5) |
--model | string | no | Marketplace model id. Absent selects the newest live video model. |
--duration | string | no | Clip length in seconds. |
--size | string | no | Exact WIDTHxHEIGHT resolution. |
--resolution | one of 480p, 720p, 768p, 1080p, 1K, 2K, 4K | no | Resolution tier. |
--seed | string | no | Reproducible generation seed. |
--input | string | no | Complete JSON request file, or - for standard input. |
heimdallm videos download
Download a completed video job’s MP4 to a new file, resuming an interrupted transfer. The clip stays readable for 10 minutes from its first delivery. The destination must not exist.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Video job id. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--index | string | no | Clip index, for a job that returned several. (default 0) |
--out | string | yes | New MP4 file to write. Existing files are refused before fetching. |
heimdallm videos models
List video generation models and their declared capabilities.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
heimdallm videos show
Read a video job and its generation progress. Use --wait to wait for completion or --out to wait and save the MP4 to a new file.
Supports --json for machine-readable output.
| Argument | Required | Description |
|---|---|---|
id | yes | Video job id. |
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--wait | boolean | no | Wait for video generation to complete. |
--out | string | no | Wait and save the MP4 to a new file. Existing files are refused before submitting. |
--index | string | no | Video artifact index (0). |
--timeout | string | no | Maximum seconds to wait. A timeout leaves the server job running. (default 7200) |
--poll-interval | string | no | Seconds between job status requests while waiting. (default 5) |
heimdallm webhooks rotate
Replaces the webhook signing secret of the presented management key’s account, over POST /webhooks/signing-secret/rotate, and prints the new one. For 24 hours every delivery carries two v1 signatures, the new secret’s and the replaced secret’s, so a receiver holding either verifies it and moves to the new secret inside that window; previous_secret_expires_at is when the replaced secret stops signing. Prompts for confirmation on a terminal; pass --yes to run it without one.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |
--yes | boolean | no | Skip the confirmation prompt. (default false) |
heimdallm webhooks secret
The secret every job webhook of the presented management key’s account is signed with, over GET /webhooks/signing-secret. A receiver verifies the Heimdall-Signature header of a delivery with it. An account that has not signed a delivery is given its secret by this read. previous_secret_expires_at is set for the 24 hours after a rotation, while deliveries also carry a signature under the replaced secret. The secret is printed to standard output and written nowhere this process keeps state.
Supports --json for machine-readable output.
| Flag | Type | Required | Description |
|---|---|---|---|
--base-url | string | yes | Public API base URL, including /api/v1. (or HEIMDALLM_BASE_URL) |
--api-key | string | no | API key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY) |
--host | string | no | Host key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST) |