Skip to content
Heimdallm
Marketplace/Documentation
Documentation · Guides

Gateways

A gateway that already speaks the OpenRouter wire can serve its users through Heimdallm as though it were OpenRouter, and every client of that gateway comes along. Each gateway below is configured with the marketplace as an upstream: a base URL and a Heimdallm API key (sk-hd-v1-…, see Authentication). Model ids stay author/slug catalogue ids.

The compatibility matrix runs Bifrost through its native OpenRouter provider. LLMGateway and the LiteLLM proxy have no gateway rows; the LiteLLM Python SDK has a separate client row. A configuration example does not establish a passing result.

Bifrost

Matrix row bifrost-openrouter. The report identifies the pinned v2.3.0 gateway binary as binary:bifrost. The row starts an owned local gateway and sends requests through its native OpenRouter provider. It exercises chat, streaming, tools, structured output, embeddings, speech, transcription, decisions and error handling. Rerank and individual model retrieval are unsupported provider operations and appear as skips.

Bifrost's openrouter provider speaks OpenRouter's wire and takes a base URL in network_config. It appends /v1/chat/completions, /v1/embeddings and /v1/models to that URL, so the base URL is the API origin plus /api. When key validation is enabled it reads /v1/auth/key, which the gateway answers beside /key (Key & activity).

{
"providers": {
  "openrouter": {
    "keys": [
      { "name": "heimdall", "value": "env.HEIMDALL_API_KEY", "models": ["*"], "weight": 1.0 }
    ],
    "network_config": { "base_url": "https://api-staging.heimdallm.com/api" }
  }
}
}

Requests name the model as openrouter/ followed by the catalogue id, for example openrouter/deepseek/deepseek-v4-flash-0731-abliterated. Bifrost's OpenRouter provider covers chat, text completions, embeddings, speech, transcription and decisions; image generation, files and batches are not operations of that provider, so use the API reference routes directly for them.

Bifrost reports billed chat cost at usage.cost.total_cost. Its errors preserve HTTP status but convert the numeric error code to a string and omit error.metadata.error_type; the matrix records that loss as failed error-envelope cells. Speech requires a voice, so the default-voice cell fails while the named-voice cell sends the request. Decisions reach /api/alpha/decisions, the path OpenRouter's clients append to the /api base URL, which Heimdallm serves as the same operation as POST /systemone, and return Bifrost's typed answer array.

LLMGateway

LLMGateway reaches an upstream through a custom provider: a name, a base URL and a token. Its base URL field appends /v1/chat/completions to a bare host. Heimdallm serves chat completions under /api/v1, so the field takes the full endpoint, which LLMGateway uses unchanged when it ends in /chat/completions:

https://api-staging.heimdallm.com/api/v1/chat/completions

The token is a Heimdallm API key, sent as a bearer credential. Callers then name the model as the custom provider's name, a slash and the catalogue id: with a provider named heimdall, the model heimdall/deepseek/deepseek-v4-flash-0731-abliterated. LLMGateway documents these limits for custom providers: the URL must be HTTPS, the provider must support the chat completions format, and embeddings, images, audio, video and rerank do not route through a custom provider. Creating one requires its Enterprise plan on the hosted service.

LiteLLM proxy

A LiteLLM proxy forwards to Heimdallm through the same openrouter provider the Python client uses. model_name is the alias the proxy's own callers send.

model_list:
- model_name: deepseek-flash
  litellm_params:
    model: openrouter/deepseek/deepseek-v4-flash-0731-abliterated
    api_base: https://api-staging.heimdallm.com/api/v1
    api_key: os.environ/HEIMDALL_API_KEY

What a gateway adds to the path

The marketplace sees every request as coming from the gateway's key, so the per-key rate limit of Errors & rate limits is shared by all of the gateway's users, and a spend limit on that key bounds all of them together. A gateway that retries should follow the rules in the production checklist: retry 408, 429, 502, 503 and 504 with backoff, honour Retry-After, and leave the other 4xx responses alone. A gateway that retries a request after its own timeout can send that request twice, and both attempts are billed if both complete.

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