# Concepts

> The words Muzekit uses, and how the pieces fit together.

<WorkspaceMap />

## Workspace

One workspace is one editor, embedded in one product. It holds your members, keys, settings, end users, templates and assets. Pricing is per workspace, and every plan starts with a 15-day free trial.

## Environments

Every editor has two [environments](/docs/environments), on every plan: Test (`mk_test_…` keys) and Live (`mk_live_…`), each with its own data. Build in Test, where localhost is always allowed and free; Live keys only ever see Live data. **Copy to Live** moves your templates, look and features across.

## End users

The people inside your product who use the editor. They never sign in to Muzekit: your server opens a [session](/docs/sessions) for them with your own user id. In the API they are `users` (`usr_…`).

## Templates

Everything made in the editor is a template (`tpl_…`). **Workspace templates** are made by your team or the API; **user templates** belong to one end user. A template's content lives in its current **version** (`ver_…`); saving updates it in place, guarded by a revision number.

## Sessions

A session opens the editor for one user, in one [mode](/docs/editor-modes), optionally on one template. Your server creates it with a secret key; the editor exchanges its single-use client secret for a short token bound to your page's domain.

<Sequence
  actors={[
    { key: "server", label: "Your server", sub: "holds the secret key" },
    { key: "api", label: "Muzekit API", sub: "api.muzekit.com" },
    { key: "page", label: "Your page", sub: "the SDK and the editor" },
  ]}
  steps={[
    { from: "server", to: "api", label: "`POST /v1/sessions`", detail: "the user, the mode, a template" },
    { from: "api", to: "server", label: "`client_secret`", detail: "single use, 10 minutes" },
    { from: "server", to: "page", label: "hands the secret to the page" },
    { from: "page", to: "api", label: "`Muzekit.mount` exchanges it", detail: "checked against your allowed domains" },
    { from: "api", to: "page", label: "editor opens for that user", detail: "token refreshes while it's open" },
  ]}
  caption="Your users never hold a key or see a Muzekit login."
/>

Sessions are what plans count. One session is one person opening the editor; the same person reopening the same template within 10 minutes is the same session. Test sessions on localhost are free up to a fair-use cap, and sessions opened from the Muzekit dashboard never count. Each time one of your users' AI apps works in your editor counts as a session too ([MCP](/docs/mcp#sessions-and-control)).

## Members

Your team in the dashboard: owner, admin, designer, reviewer, each with its own [role](/docs/team). Members sign in to Muzekit; end users never do. An AI app a member connects works with that member's role.

## IDs

All ids are opaque strings with a prefix: `ws_`, `usr_`, `tpl_`, `ver_`, `ast_`, `rnd_`, `key_`, `ses_`. Store them as strings; never parse them.
