Manage workspaces and API keys

Organize your Mistral account with workspaces, API keys, and spending controls.

  • Workspaces isolate API keys and usage metrics by team or environment
  • API keys are scoped to a workspace for tracking and access control
  • Spending limits prevent unexpected costs per workspace

Time to complete: ~10 minutes

Prerequisites

Prerequisites

  • Admin role in your Mistral organization
  • Billing activated (API keys are inactive until a payment method is on file)
Step 1: Create a workspace

Step 1: Create a workspace

Workspaces isolate API keys, usage metrics, and billing. Use them to separate development from production, or to track usage by team.

  1. Open AdminManage › Workspaces.
  2. Click Create workspace.
  3. Enter a name: for example, Production or ML Research.
  4. Optionally add an icon and description for easy identification.
  5. Click Create.

Create at least two workspaces (development and production) so test traffic doesn't consume production quotas.

Step 2: Add members to the workspace

Step 2: Add members to the workspace

Control who has access to each workspace independently.

  1. Open the workspace you just created.
  2. Click Add members.
  3. Select team members from your organization.
  4. Assign their workspace role:
RolePermissions
AdminFull workspace control: manage members, keys, settings
MemberUse API keys, view usage: no management access
  1. Click Confirm.
Step 3: Generate API keys

Step 3: Generate API keys

Each workspace has its own API keys. We track and bill usage per workspace.

  1. Open StudioAPI keys.
  2. Select the target workspace from the workspace dropdown.
  3. Click Create new key.
  4. Name the key descriptively: for example, prod-backend or staging-chatbot.
  5. Copy the key immediately. It's shown only once.
# Set the key as an environment variable
export MISTRAL_API_KEY="your-key-here"
warning

Never commit API keys to source control. Use environment variables or a secrets manager to store them.

Step 4: Set usage limits

Step 4: Set usage limits

Prevent unexpected costs by setting monthly spending limits per workspace.

  1. Open AdminSubscriptions › Billing.
  2. Under the workspace, click Set limit.
  3. Enter a monthly budget in USD: for example, $500.
  4. When the workspace hits the limit, API requests return 429 Too Many Requests until the next billing cycle.

Monitor real-time usage from the billing dashboard to spot trends before hitting limits.

Verify

Verify

Your workspace setup is complete if:

  • The workspace appears in the workspace dropdown in Studio
  • Team members added to the workspace can see it in their console
  • API keys generated for the workspace return successful responses
  • Usage appears under the correct workspace in the billing dashboard

Test a key with a quick API call:

curl https://api.mistral.ai/v1/models \
  -H "Authorization: Bearer $MISTRAL_API_KEY"

A successful response returns a JSON list of available models.

What's next

What's next