Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
SDKs and tools

Manage Mubit

This page is for developers who manage Mubit from code, a terminal or an AI agent. With a management key, the TypeScript SDK, the Python SDK, the command line and the MCP server all call the same management API. Each table below gives one operation in all four.

The page lists the operations Mubit serves. The tools also have methods for other operations, which Mubit answers with 501 not_implemented. The page leaves those out.

The TypeScript and Python columns use client: a Mubit client in TypeScript, and a Mubit or AsyncMubit client in Python. In TypeScript every method returns a promise. In Python, AsyncMubit methods are awaited, and its lists are walked with async for.

Organization and projects

You canTypeScriptPythonCommandMCP tool
See your organizationclient.org.get()client.org.get()mubit-cli whoamiget_org
List projectsclient.projects.list()client.projects.list()mubit-cli projects lslist_projects
Open a projectclient.projects.get(id)client.projects.get(id)mubit-cli projects get <id>get_project

Keys

You canTypeScriptPythonCommandMCP tool
List a project's inference keysclient.keys.list({ project })client.keys.list(project=...)mubit-cli keys ls --project <id>list_keys
List the provider keys Mubit calls providers withclient.providers.list()client.providers.list()mubit-cli providers lslist_providers
List management keysclient.managementKeys.list()client.management_keys.list()mubit-cli management-keys lslist_management_keys
Create a management keyclient.managementKeys.create({ name, role })client.management_keys.create(name=..., role=...)mubit-cli management-keys create --name <name> --role <role>none: create it in the console
Rotate a management keyclient.managementKeys.rotate(id)client.management_keys.rotate(id)mubit-cli management-keys rotate <id>none
Revoke a management keyclient.managementKeys.revoke(id)client.management_keys.revoke(id)mubit-cli management-keys revoke <id>revoke_management_key

A new management key, or a rotated one, is shown once, in the answer to the call that made it. Store it then: Mubit doesn't show it again. To create or rotate inference keys and provider keys, use the console: Mubit keys and Provider keys.

Calls

You canTypeScriptPythonCommandMCP tool
List calls, filtered by project, task, model, status and timeclient.calls.list({ task, limit })client.calls.list(task=..., limit=...)mubit-cli calls ls [--project <id>] [--task <id>] [--model <name>] [--status <status>] [--created-after <time>] [--created-before <time>]search_calls
Open a callclient.calls.get(id)client.calls.get(id)mubit-cli calls get <id>get_call
Rate a reply up or down, with a comment or a corrected answerclient.calls.feedback(id, { rating, comment, correction })client.calls.feedback(id, rating=..., comment=..., correction=...)mubit-cli calls feedback <id> --rating <up|down> [--comment <text>] [--correction <text>]add_call_feedback

A rating is up or down. A comment can be up to 500 characters, and a correction up to 8,000.

Tasks

You canTypeScriptPythonCommandMCP tool
List tasksclient.tasks.list()client.tasks.list()mubit-cli tasks lslist_tasks
Open a task: its stage, what it waits for and whyclient.tasks.get(id)client.tasks.get(id)mubit-cli tasks get <id>get_task_status
List a task's training examplesclient.tasks.examples(id)client.tasks.examples(id)mubit-cli tasks examples <id>list_examples
Read a task's settingsclient.tasks.settings(id)client.tasks.settings(id)mubit-cli tasks settings get <id>get_task_settings
Train a new version nowclient.tasks.train(id)client.tasks.train(id)mubit-cli tasks train <id>retrain_task
List a task's versionsclient.tasks.versions(id)client.tasks.versions(id)mubit-cli versions ls <task-id>list_versions

Trained models (versions)

You canTypeScriptPythonCommandMCP tool
Open a version, with its test resultsclient.versions.get(id)client.versions.get(id)mubit-cli versions get <id>get_version
Run a version silently beside the current model, or serve it on a share of the callsclient.versions.rollout(id, { shadow_percent, canary_percent })client.versions.rollout(id, shadow_percent=..., canary_percent=...)mubit-cli versions rollout <id> [--shadow <percent>] [--canary <percent>]set_rollout
Promote a version, so it serves all of the task's callsclient.versions.promote(id)client.versions.promote(id)mubit-cli versions promote <id>promote_version
Roll back to the previous versionclient.versions.rollback(id)client.versions.rollback(id)mubit-cli versions rollback <id>rollback_version

Promoting and rolling back change what answers your traffic. Train, roll out, promote and roll back need an admin key.

Lessons, imports, usage and activity

You canTypeScriptPythonCommandMCP tool
List the lessons Mubit formedclient.lessons.list()client.lessons.list()mubit-cli lessons lslist_lessons
Open a lessonclient.lessons.get(id)client.lessons.get(id)mubit-cli lessons get <id>get_lesson
List importsclient.imports.list()client.imports.list()mubit-cli imports lslist_imports
See usage: calls and tokensclient.usage.get()client.usage.get()mubit-cli usageget_usage
See your balance and creditclient.billing.get()client.billing.get()mubit-cli billingget_billing
Read a project's activityclient.activity.list()client.activity.list()mubit-cli activitylist_activity
Read a long-running jobclient.jobs.get(id)client.jobs.get(id)mubit-cli jobs get <id>get_job
Wait for a job to finishclient.jobs.wait(id, { timeoutMs })client.jobs.wait(id, timeout=...)mubit-cli jobs wait <id> [--timeout <seconds>]none

Pages, retries and safe repeats

All four tools behave the same way:

  • Lists come in pages. A list answers with data and next_cursor. Pass next_cursor back as cursor to get the next page. The SDKs do it for you when you loop over a list, and the command line takes --cursor.
  • Busy or failing calls are retried. On a 429 or a 5xx answer, an SDK waits, honouring Retry-After when Mubit sends it, and retries up to 2 times. You can change the number.
  • A retried write isn't applied twice. Every POST carries an Idempotency-Key. The SDKs make one for you, or you can pass your own.
  • Errors carry a request id. Quote it when you contact support.