Skip to content
Heimdallm
Marketplace/Documentation
Documentation · Reference

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

CommandDescription
heimdallm activityThe account's usage for one UTC day, over GET /activity, in the row shape OpenRouter's /activity publishes.
heimdallm auth statusThe credential backend and the host a command uses by default.
heimdallm auth switchMake a host with a stored API key the active profile.
heimdallm batches cancelStop a batch, over POST /batches/{id}/cancel.
heimdallm batches createSubmit up to 1000 requests to run in the background against one endpoint, over POST /batches.
heimdallm batches listBatches on the key's own account, newest first, over GET /batches.
heimdallm batches showA batch with its status, request counts and, once it has ended, the outcome of every request, over GET /batches/{id}.
heimdallm benchmarks listBenchmark suites and the current results of every serving variant, over GET /benchmarks.
heimdallm benchmarks variantOne serving variant's current benchmark results and the task attempts of each selected run, over GET /benchmarks/variants/{endpointId}.
heimdallm catalogueThe complete catalogue — models, families and providers — from one consistent view, over GET /catalogue.
heimdallm chatA chat completion over POST /chat/completions, streamed as it arrives.
heimdallm completeThe legacy text-completions shape over POST /completions: a prompt in, text out, no conversation structure.
heimdallm completionPrint 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 creditsCredited and debited totals for the account the presented key belongs to, over GET /credits.
heimdallm decisionsAnswer a typed question about a state.
heimdallm deposits createSettle a signed-authorization (x402) deposit, over POST /deposits/x402.
heimdallm deposits stripeThe card deposit rail terms, over GET /deposits/stripe.
heimdallm deposits x402The signed-authorization (x402) deposit rail terms, over GET /deposits/x402.
heimdallm embedText embeddings over POST /embeddings.
heimdallm endpoints zdrEvery 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 listList families, over GET /families.
heimdallm families showOne family, over GET /families/{author}/{slug}: the family, every served model in it and every live endpoint across those models.
heimdallm files deleteDelete a stored file and its content, freeing what it held against the account quota, over DELETE /files/{id}.
heimdallm files downloadSave a stored file's bytes to a new file, over GET /files/{id}/content.
heimdallm files listEvery unexpired file on the key's own account, newest first, over GET /files.
heimdallm files showOne stored file's metadata, without its content, over GET /files/{id}.
heimdallm files uploadStore 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 showA recorded generation or a funded request awaiting a final record, over GET /generation, scoped to the presented key's own account.
heimdallm imageAn image generation over POST /images.
heimdallm keyWhat the presented key is, what it has spent and what its ceiling leaves, over GET /key.
heimdallm keys createA new key in the presented management key's own workspace, over POST /keys.
heimdallm keys listEvery key in the presented management key's own workspace, newest first, over GET /keys.
heimdallm keys revokeDisables a key in the presented management key’s own workspace, over DELETE /keys/:hash.
heimdallm keys rotateReplaces a key’s material while keeping its name and limit.
heimdallm keys updateEdit a key in the presented management key's own workspace, over PATCH /keys/:hash.
heimdallm logThe local call log that chat, complete and embed each append a row to, newest first.
heimdallm loginStore an API key for a host.
heimdallm logoutRemove a host's stored API key and clear it as the active profile.
heimdallm mcpServe 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-repairStop optional mesh repair, preserving generation and the last validated repair.
heimdallm meshes createGenerate a mesh from a prompt.
heimdallm meshes downloadDownload a mesh GLB to a new file, resuming an interrupted transfer.
heimdallm meshes modelsList mesh generation models, or available vision repair models and machine pricing.
heimdallm meshes showRead a mesh job, geometry, repair progress and exact repair charges.
heimdallm models benchmarksA model's benchmark scores, over GET /models/{author}/{slug}/benchmarks.
heimdallm models countThe number of served models across every modality, before any filter or page, over GET /models/count.
heimdallm models embeddingsEvery served model with an embeddings output, over GET /embeddings/models, in the summary shape models list prints.
heimdallm models endpointsA model and every live endpoint serving it, over GET /models/{author}/{slug}/endpoints.
heimdallm models image-endpointsEvery 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 imagesEvery served image model in the terms the image contract uses, over GET /images/models.
heimdallm models listList every served model.
heimdallm models showShow one served model, the same object GET /models lists.
heimdallm models speechEvery served speech model, over GET /speech/models, with the voices and codecs its live endpoints declare between them.
heimdallm models userThe complete model list narrowed by the presented key's own account preferences, over GET /models/user.
heimdallm promotionsThe active marketplace offers, over GET /promotions: the site offer, then each approved provider with an active catalogue offer and a live endpoint.
heimdallm providers earningsThe 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 listList approved providers, over GET /providers.
heimdallm providers probe-nowMakes 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-nowRe-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 statementsEvery statement issued to the presented key's provider, newest period first, over GET /providers/statements.
heimdallm providers statusThe 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 validateValidate a models document against the marketplace’s own v2.4 parser, offline, before it is published.
heimdallm rerankRank text documents against a query.
heimdallm speechSpeak text and save the audio.
heimdallm statsMarketplace usage aggregates over the last 30 days, over GET /stats/public.
heimdallm statusThe status board: every approved provider's live endpoints with measured health, over GET /status.
heimdallm transcribeA transcription over POST /audio/transcriptions: upload a FILE as multipart/form-data, or pass a JSON --request containing base64 input_audio.
heimdallm version checkCheck npm for eligible updates without installing anything.
heimdallm videos createGenerate a video from a prompt.
heimdallm videos downloadDownload a completed video job’s MP4 to a new file, resuming an interrupted transfer.
heimdallm videos modelsList video generation models and their declared capabilities.
heimdallm videos showRead a video job and its generation progress.
heimdallm webhooks rotateReplaces the webhook signing secret of the presented management key’s account, over POST /webhooks/signing-secret/rotate, and prints the new one.
heimdallm webhooks secretThe 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--datestringnoThe UTC day to report, YYYY-MM-DD. Defaults to the account's current spend day.
--group-byone of model, endpoint, keynoHow to split the day into rows.
--api-key-hashstringnoRestrict 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.

FlagTypeRequiredDescription
--hoststringnoHost 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.

ArgumentRequiredDescription
hostyesA 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.

ArgumentRequiredDescription
idyesBatch id, batch_ and 32 hex.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--yesbooleannoSkip 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--inputstringyesJSONL request file, or - for standard input.
--endpointone of /v1/chat/completions, /v1/responses, /v1/messagesnoThe endpoint every body is written for. Defaults to the url the lines name.
--modelstringnoModel for every request whose body names none.
--providerstring (repeatable)noProvider slug to use for every request whose body states no preference. Repeatable.
--fallbacksbooleannoWhether another provider may serve a request the named ones cannot (--no-fallbacks refuses).
--waitbooleannoWait until the batch reaches a terminal status.
--outstringnoWait and save the results file, one JSON line per request, to a new file. Existing files are refused before anything is sent.
--timeoutstringnoMaximum seconds to wait. A timeout leaves the batch running. (default 86400)
--poll-intervalstringnoSeconds between batch status requests while waiting. (default 10)
--yesbooleannoSkip 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--limitstringnoBatches per page, 1 through 100.
--afterstringnoThe last_id of the previous page.
--statusone of validating, in_progress, cancelling, completed, failed, expired, cancelled (repeatable)noOnly batches in this status. Repeatable.
--created-afterstringnoOnly batches created strictly after this instant: unix seconds, a date or an ISO 8601 instant.
--created-beforestringnoOnly 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.

ArgumentRequiredDescription
idyesBatch id, batch_ and 32 hex.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--waitbooleannoWait until the batch reaches a terminal status.
--outstringnoWait and save the results file, one JSON line per request, to a new file. Existing files are refused before anything is sent.
--timeoutstringnoMaximum seconds to wait. A timeout leaves the batch running. (default 86400)
--poll-intervalstringnoSeconds 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--modelstringnoLocal filter. Only variants of this model id.
--providerstringnoLocal filter. Only variants served by this provider slug.
--suitestringnoLocal 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.

ArgumentRequiredDescription
endpoint-idyesThe served endpoint UUID.
FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

ArgumentRequiredDescription
promptnoThe prompt, used instead of reading standard input.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--modelstringnoMarketplace model id. Absent selects the newest live model for this rail.
--systemstringnoSystem message prepended to the conversation.
--temperaturestringnoSampling temperature in [0, 2].
--max-tokensstringnoCeiling on generated tokens.
--toolsstringnoPath to a JSON file holding the tools array.
--reasoning-effortone of none, minimal, low, medium, high, xhigh, maxnoReasoning level, sent as reasoning_effort. Routing skips an endpoint shown to refuse the level.
--providerstring (repeatable)noProvider slug to route to, sent as provider.only. Repeatable.
--filestring (repeatable)noStored file id (files upload) attached to the first user message as a file part. Repeatable.
--requeststringnoComplete chat JSON request file, or - for standard input.
--log-textbooleannoRecord 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.

ArgumentRequiredDescription
promptnoThe prompt, used instead of reading standard input.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--modelstringnoMarketplace model id. Absent selects the newest live model for this rail.
--temperaturestringnoSampling temperature in [0, 2].
--max-tokensstringnoCeiling on generated tokens.
--requeststringnoComplete JSON request file, or - for standard input.
--log-textbooleannoRecord 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.

ArgumentRequiredDescription
shellyesThe 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost 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.

ArgumentRequiredDescription
statenoThe text to judge.
questionnoThe question to answer about the state.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--modelstringnoMarketplace model id. Absent selects the newest live model for this rail.
--choicestring (repeatable)noChoice NAME=DESCRIPTION; repeat for each option.
--levelstring (repeatable)noScore level description, lowest first; repeat for each level.
--requeststringnoComplete JSON request file, or - for standard input.
--log-textbooleannoRecord 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--amountstringyesUSD as an exact decimal string, such as "25" or "25.00". A float amount is refused.
--networkstringnoCAIP-2 network id, such as eip155:8453. Optional where the rail quotes one chain.
--payment-signaturestringnoThe 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)
--yesbooleannoSettle 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

ArgumentRequiredDescription
inputnoThe text to embed, used instead of reading stdin when stdin is not a terminal.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--modelstringnoMarketplace model id. Absent selects the newest live model for this rail.
--requeststringnoComplete JSON request file, or - for standard input.
--log-textbooleannoRecord 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

ArgumentRequiredDescription
idyesFamily id, author/slug.
FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

ArgumentRequiredDescription
idyesFile id, file_ and 32 hex.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--yesbooleannoSkip 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.

ArgumentRequiredDescription
idyesFile id, file_ and 32 hex.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--outstringyesNew 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--limitstringnoFiles per page, 1 through 100 (served by the wire).
--afterstringnoThe 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.

ArgumentRequiredDescription
idyesFile id, file_ and 32 hex.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost 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.

ArgumentRequiredDescription
pathyesThe file to store.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--namestringnoFilename to store under. Defaults to the base name of PATH.
--typestringnoContent type of the part, such as application/pdf. Defaults to the filename extension.
--yesbooleannoSkip 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.

ArgumentRequiredDescription
idyesGeneration id, as returned in X-Generation-Id or the response id.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--remotebooleannoSkip 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.

ArgumentRequiredDescription
promptnoWhat to draw.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--modelstringnoMarketplace model id. Absent selects the newest live image model.
--outstringnoFile to write the decoded image to, or - for stdout. Defaults to image.FORMAT.
--providerstringnoPin generation to this provider slug.
--adaptersstringnoJSON file containing adapter selections: id, revision and strength.
--sizestringnoWIDTHxHEIGHT, matched against the endpoint's declared envelope.
--nstringnoHow many images to render.
--requeststringnoComplete JSON request file, or - for standard input.
--log-textbooleannoRecord 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--namestringyesA label for the key, up to 80 characters.
--limitstringnoA spend ceiling as a decimal USD string, such as "10" or "10.00". Omit for none.
--limit-resetone of daily, weekly, monthlynoHow the ceiling resets. Omit for a lifetime ceiling.
--yesbooleannoSkip 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost 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.

ArgumentRequiredDescription
hashyesThe key hash, as shown by keys list.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--yesbooleannoSkip 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.

ArgumentRequiredDescription
hashyesThe key hash to rotate, as shown by keys list.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--yesbooleannoSkip 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.

ArgumentRequiredDescription
hashyesThe key hash, as shown by keys list.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--namestringnoRename the key, up to 80 characters.
--limitstringnoReplace the spend ceiling with a decimal USD string such as "25", or none to remove it.
--limit-resetone of daily, weekly, monthly, nonenoReplace how the ceiling resets; none makes it a lifetime ceiling.
--disabledbooleannoSuspend the key; --no-disabled lifts the suspension.
--yesbooleannoSkip 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.

FlagTypeRequiredDescription
--limitstringnoRow 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.

FlagTypeRequiredDescription
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--base-urlstringnoPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--web-urlstringnoMarketplace web app origin for browser authorization. (or HEIMDALLM_WEB_URL)
--with-tokenbooleannoRead the API key from stdin instead of the browser authorization flow.
--manualbooleannoPrint the approval URL and accept a pasted code without opening a browser or local port.
--timeoutstringnoSeconds 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.

FlagTypeRequiredDescription
--hoststringnoHost 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--management-keystringnoManagement 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.

ArgumentRequiredDescription
idyesMesh job id.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--yesbooleannoSkip 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.

ArgumentRequiredDescription
promptnoWhat to build.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--waitbooleannoWait through generation and optional repair.
--outstringnoWait and save the selected GLB to a new file. Existing files are refused before submitting.
--indexstringnoDownload this index instead of the selected result: 0 original, 1 repair.
--timeoutstringnoMaximum seconds to wait. A timeout leaves the server job running. (default 7200)
--poll-intervalstringnoSeconds between job status requests while waiting. (default 5)
--modelstringnoMarketplace model id. Absent selects the newest live mesh model.
--target-facesstringnoMaximum number of faces.
--seedstringnoReproducible generation seed.
--inputstringnoComplete 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.

ArgumentRequiredDescription
idyesMesh job id.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--indexstringnoArtifact index from the job document. (default 0)
--outstringyesNew 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--refinersbooleannoList 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.

ArgumentRequiredDescription
idyesMesh job id.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--waitbooleannoWait through generation and optional repair.
--outstringnoWait and save the selected GLB to a new file. Existing files are refused before submitting.
--indexstringnoDownload this index instead of the selected result: 0 original, 1 repair.
--timeoutstringnoMaximum seconds to wait. A timeout leaves the server job running. (default 7200)
--poll-intervalstringnoSeconds 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.

ArgumentRequiredDescription
idyesModel id, author/slug.
FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--offsetstringnoRecords to skip (served by the wire).
--limitstringnoMaximum 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.

ArgumentRequiredDescription
idyesModel id, author/slug.
FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

ArgumentRequiredDescription
idyesImage model id, author/slug.
FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--offsetstringnoRecords to skip (served by the wire).
--limitstringnoMaximum 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--familystringnoRestrict the list to one family id (served by the wire).
--limitstringnoPage size (served by the wire).
--offsetstringnoRows to skip (served by the wire).
--modalitystringnoLocal filter. Keep models whose architecture.modality, input_modalities or output_modalities contain this text, case-insensitive (for example "image").
--min-contextstringnoLocal filter. The model's declared context_length floor.
--max-contextstringnoLocal filter. The model's declared context_length ceiling.
--max-prompt-pricestringnoLocal 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-pricestringnoLocal filter. The same ceiling, applied to the effective completion price.
--supportsstring (repeatable)noLocal filter. Keep models declaring this supported_parameters entry. Repeatable; every given value must be declared.
--providerstringnoLocal filter, fetched per candidate. Keep models with a live endpoint from this provider slug.
--zdrbooleannoLocal 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.

ArgumentRequiredDescription
idyesModel id, author/slug.
FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--offsetstringnoRecords to skip (served by the wire).
--limitstringnoMaximum 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--monthstringnoThe 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--endpoint-idstringyesWhich 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.
--yesbooleannoSkip 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--source-idstringnoWhich source to pull. Omitted, the one active source is pulled; required once more than one is active.
--yesbooleannoSkip 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost 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.

ArgumentRequiredDescription
pathyesPath 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.

ArgumentRequiredDescription
textnoThe query followed by text documents.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--modelstringnoMarketplace model id. Absent selects the newest live model for this rail.
--documentstring (repeatable)noA text document to rank; repeat for each document.
--top-nstringnoReturn this many highest-ranked documents.
--requeststringnoComplete JSON request file, or - for standard input.
--log-textbooleannoRecord 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.

ArgumentRequiredDescription
textnoText to speak.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--modelstringnoMarketplace model id. Absent selects the newest live speech model.
--outstringnoOutput audio file, or - for stdout. Defaults to speech.FORMAT.
--voicestringnoVoice to use; omit for the endpoint default.
--formatone of mp3, wav, pcm, opus, flac, aac, mulaw, alawnoOutput audio codec. (default mp3)
--speedstringnoPlayback speed, within the model envelope.
--instructionsstringnoDelivery instructions for an endpoint that supports them.
--requeststringnoComplete JSON request file, or - for standard input.
--log-textbooleannoRecord 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic 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.

ArgumentRequiredDescription
filenoPath to the audio file to transcribe.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--modelstringnoMarketplace model id. Absent selects the newest live transcription model.
--languagestringnoISO-639-1 source language; supplying it skips detection.
--requeststringnoComplete JSON request with base64 input_audio, or - for standard input.
--log-textbooleannoRecord 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.

ArgumentRequiredDescription
promptnoWhat the clip should show.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--waitbooleannoWait for video generation to complete.
--outstringnoWait and save the MP4 to a new file. Existing files are refused before submitting.
--indexstringnoVideo artifact index (0).
--timeoutstringnoMaximum seconds to wait. A timeout leaves the server job running. (default 7200)
--poll-intervalstringnoSeconds between job status requests while waiting. (default 5)
--modelstringnoMarketplace model id. Absent selects the newest live video model.
--durationstringnoClip length in seconds.
--sizestringnoExact WIDTHxHEIGHT resolution.
--resolutionone of 480p, 720p, 768p, 1080p, 1K, 2K, 4KnoResolution tier.
--seedstringnoReproducible generation seed.
--inputstringnoComplete 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.

ArgumentRequiredDescription
idyesVideo job id.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--indexstringnoClip index, for a job that returned several. (default 0)
--outstringyesNew 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--hoststringnoHost 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.

ArgumentRequiredDescription
idyesVideo job id.
FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--waitbooleannoWait for video generation to complete.
--outstringnoWait and save the MP4 to a new file. Existing files are refused before submitting.
--indexstringnoVideo artifact index (0).
--timeoutstringnoMaximum seconds to wait. A timeout leaves the server job running. (default 7200)
--poll-intervalstringnoSeconds 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
--yesbooleannoSkip 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.

FlagTypeRequiredDescription
--base-urlstringyesPublic API base URL, including /api/v1. (or HEIMDALLM_BASE_URL)
--api-keystringnoAPI key sent as Authorization: Bearer. Falls back to HEIMDALLM_API_KEY. (or HEIMDALLM_API_KEY)
--hoststringnoHost key selecting a stored credential profile, such as api-staging.heimdallm.com. (or HEIMDALLM_HOST)
DiscoverFind your next modelModel libraryAll models, versions, prices and capabilitiesBenchmarksMeasured quality, cost and time by serving configurationModel requestsAsk for a model, and vote on what is listed nextShowcaseImages, video and 3D made on the marketplaceProvidersCompare independent inference providersActivityMarketplace traffic and usageNetwork statusAvailability, latency and endpoint healthChatConversations, model settings and filesImage, video & 3DGenerate images, video and 3D assetsScene studioStage a shot in 3D, direct it and render it as a videoCoding playgroundBuild software with an AI agent on a machine of your ownOverview & routingIdentity, workspaces and routing preferencesBalance & depositsBalance, deposits, ledger and reserved fundsAPI keysKeys scoped to workspaces, limits and expirationOrganizationsTeams, members and shared workspacesRequest historyRequests, receipts, sandbox sessions and account historyReferralsInvitations and referral earningsPrivacyData settings, exports and deletionDocumentationQuickstart, SDKs, pricing and guidesAPI referenceInteractive endpoint referenceList your modelsProvider guide: requirements, the fee, payouts and what is measuredProvider payoutsMonthly statements, the marketplace fee and payout walletsProvider dashboardApply as a provider, add sources and track earnings