Skip to content
Docs
Request access

Connect a model

A run uses a real model only when a person has said so. The fake model needs none of this: no key, no cost, no network. This page is for the first real run.

  • A team that already runs on the fake model (Quickstart).
  • An owner account on the server (Accounts and roles): connecting a provider and approving a model are done by an owner in a signed-in session, each with a reason.
  • An account at the provider, with a project or key used for NuraMesh alone.
  • For a provider that uses a key: a place for the key file outside every repository, owned by the server user, mode 0400 or 0600.
  1. At the provider, create the project or key and set a monthly spend limit there (Spend caps at the provider).
  2. Give the server the key as a file path, never as a value (see the section “Keys come from the environment, as a file path” below). The page of your provider under Models and integrations has the exact commands.
  3. As an owner, connect the provider and approve the model for the data class you will send.
  4. Make sure a price is in effect for the model (Override a price).
  5. Ask whether a run would start, before starting one: see Check it worked.

A real model call happens only when all of these are recorded, each by a person:

  1. the model is in the organization’s approved catalog;
  2. its data class is allowed for it (the quickstart real run is --data synthetic);
  3. the provider has an active connection;
  4. a price is in effect. An unknown price blocks the call and records the block; it is never guessed.

A verifier must also come from a different model family than the worker it checks. When any of these fails the run is refused before it starts (exit 3), with the reason. nuramesh models check --data synthetic --team <team> answers “would this run start?” without starting it. Prices are covered in Price overrides and OpenAI-compatible endpoints in their own guide.

Provider How it signs in What you set
Azure OpenAI and Azure AI keyless, with your Entra identity no key exists to export or leak
Anthropic (direct) a key in a file NURAMESH_ANTHROPIC_KEY_FILE, the path of the file
OpenAI-compatible (tested against mock servers shaped like Ollama, vLLM, Groq and OpenAI) a named key bound by the operator, or none for a local model NURAMESH_OPENAI_COMPATIBLE_KEYS, the path of a binding file
Fake (fake/*) none nothing

Keys come from the environment, as a file path

Section titled “Keys come from the environment, as a file path”

A key is never in the configuration, the repository, the API, the command line or the ledger. The environment variable holds only the path of a file outside every repository, owned by the server user, with mode 0400 or 0600. The key is in that file and is read on every call, not cached. nuramesh serve refuses to start when the variable is set and the file is not usable. Never paste a key into a command, a chat or an environment dump.

  • Keep the file out of reach of any account that runs agents or builds the code. The server should run code that those accounts cannot change.
  • The Anthropic key file is for a self-hosted install. With NURAMESH_HOSTED=1 it is refused.
  • Connecting, repointing and approving a model widen what a run may use, so they are made by an owner in a signed-in session through the app or the API, each with a reason. The command line can only restrict (pause, retire, disable, disconnect). See Accounts and roles.

NuraMesh budgets are hard stops inside NuraMesh. They are one limit, not the only one: they can only count what NuraMesh sees. A key used outside NuraMesh is not counted at all, and NuraMesh cannot see what the provider bills. Cost metering is proven today for Anthropic Claude models (tokens counted); for other models the cost shows as unknown until a price is set. So set a cap at the provider too.

First-run checklist:

  1. In the provider’s console, create a project or key for NuraMesh alone, so nothing else shares its limit.
  2. Set a monthly spend limit there, lower than you can afford to lose, and turn on the provider’s billing alert.
  3. In NuraMesh, set a budget for the agent or role and confirm it with --confirm-cap USD on the run. The run budget you accept is the most it will spend.
  4. Declare a price for each model (price overrides), or the call is blocked as an unknown price.
  5. Start with synthetic data and a small task. A real run spends real money.
  6. After the run, read the cost in the run report (nuramesh report) and compare it with the provider’s usage page.

NuraMesh does not set or read the provider’s limit for you.

Terminal window
nuramesh models check --data synthetic --team my-team

It answers “would this run start?” without starting it, and names the first of the four conditions that is not met. When it passes, start a small run with --data synthetic and --confirm-cap USD, then compare the cost in nuramesh report with the provider’s usage page.

You see Do this
The run is refused before it starts (exit 3) One of the four conditions is not met. nuramesh models check names it
serve refuses to start A key variable is set and its file is not usable. Check the path, the owner and the mode (0400 or 0600)
A call is blocked for an unknown price Add a price, or a price override. A price is never guessed
The verifier is refused A verifier must come from a different model family than the worker it checks
The Anthropic key file is refused It is for a self-hosted install. With NURAMESH_HOSTED=1 it is refused

Was this page helpful?