Environments
Every workspace ships with three environments — production (default, unlocked), staging, and development. They isolate documents, runs, and webhook destinations from one another, while keeping schema definitions shared across them.
Default layout
When you create a workspace, Tracore provisions all three environments automatically. production is unlocked on every plan; staging and development require a Pro plan.
Environments are addressed via the ?env= query parameter on schema-scoped endpoints:
GET /workspaces/my-workspace/schemas/invoice/documents?env=staging
If ?env= is omitted, production is used.
Provider + model assignment
Each environment can bind to one of your provider keys. Assignment lives on the environment row — picking Anthropic for production while leaving staging on the system Mistral fallback is supported, and recommended while you’re tuning a new schema.
Configure it from the schema-settings page (/ws/<workspace>/schemas/<schemaKey>/settings?env=<envSlug>), in the Environment · {env} · Model section.
Provider dropdown
Lists all four supported providers plus a System fallback (Mistral · pixtral-large-latest) option at the bottom. Providers without a connected key appear disabled — visit your /profile to add one (see Provider keys).
Model picker
Once you’ve picked a connected provider, the model picker is scoped to that provider’s allowlist. Two modes:
- Use profile default model (default ON) — the environment inherits the key’s
defaultModel. The PATCH body sendsmodel: null. - Override (uncheck the box) — picks an explicit model from the allowlist. The PATCH body sends the model id.
System fallback
Selecting System fallback clears both providerKeyId and model on the environment. Extractions in that environment use Tracore’s Mistral key (residency: EU). This is the zero-config path for new users — extract a sample document before pasting any keys.
Resolved block
GET /workspaces/{slug}/environments/{envSlug} includes a denormalized resolved block describing what extractions in that environment will actually use:
{
"id": "env_…",
"slug": "production",
"providerKeyId": "pk_…",
"model": null,
"resolved": {
"provider": "anthropic",
"model": "claude-haiku-4-5",
"residency": "US",
"keySource": "user"
}
}
resolved is computed server-side using the precedence rules from the runtime: per-request override > env assignment > system fallback. The web app’s header environment selector reads this block to show a second line per env (e.g. Anthropic · claude-haiku-4-5, or System fallback · Mistral when keySource === 'system').
API surface
import { TracoreClient } from "@tracore/sdk";
const client = new TracoreClient({ apiKey: process.env.TRACORE_API_KEY! });
// Inspect the resolved provider/model for an env
const env = await client.environments.get("my-workspace", "production");
console.log(env.resolved.provider, env.resolved.model);
// Assign Anthropic with profile-default model
const { data: keys } = await client.user.providerKeys.list();
const anthropic = keys.find((k) => k.provider === "anthropic")!;
await client.environments.update("my-workspace", "production", {
providerKeyId: anthropic.id,
model: null, // inherit profile default
});
// Pick a specific model for this env
await client.environments.update("my-workspace", "production", {
providerKeyId: anthropic.id,
model: "claude-opus-4-7",
});
// Revert to system fallback
await client.environments.update("my-workspace", "production", {
providerKeyId: null,
model: null,
});