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 can | TypeScript | Python | Command | MCP tool |
|---|---|---|---|---|
| See your organization | client.org.get() | client.org.get() | mubit-cli whoami | get_org |
| List projects | client.projects.list() | client.projects.list() | mubit-cli projects ls | list_projects |
| Open a project | client.projects.get(id) | client.projects.get(id) | mubit-cli projects get <id> | get_project |
Keys
| You can | TypeScript | Python | Command | MCP tool |
|---|---|---|---|---|
| List a project's inference keys | client.keys.list({ project }) | client.keys.list(project=...) | mubit-cli keys ls --project <id> | list_keys |
| List the provider keys Mubit calls providers with | client.providers.list() | client.providers.list() | mubit-cli providers ls | list_providers |
| List management keys | client.managementKeys.list() | client.management_keys.list() | mubit-cli management-keys ls | list_management_keys |
| Create a management key | client.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 key | client.managementKeys.rotate(id) | client.management_keys.rotate(id) | mubit-cli management-keys rotate <id> | none |
| Revoke a management key | client.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 can | TypeScript | Python | Command | MCP tool |
|---|---|---|---|---|
| List calls, filtered by project, task, model, status and time | client.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 call | client.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 answer | client.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 can | TypeScript | Python | Command | MCP tool |
|---|---|---|---|---|
| List tasks | client.tasks.list() | client.tasks.list() | mubit-cli tasks ls | list_tasks |
| Open a task: its stage, what it waits for and why | client.tasks.get(id) | client.tasks.get(id) | mubit-cli tasks get <id> | get_task_status |
| List a task's training examples | client.tasks.examples(id) | client.tasks.examples(id) | mubit-cli tasks examples <id> | list_examples |
| Read a task's settings | client.tasks.settings(id) | client.tasks.settings(id) | mubit-cli tasks settings get <id> | get_task_settings |
| Train a new version now | client.tasks.train(id) | client.tasks.train(id) | mubit-cli tasks train <id> | retrain_task |
| List a task's versions | client.tasks.versions(id) | client.tasks.versions(id) | mubit-cli versions ls <task-id> | list_versions |
Trained models (versions)
| You can | TypeScript | Python | Command | MCP tool |
|---|---|---|---|---|
| Open a version, with its test results | client.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 calls | client.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 calls | client.versions.promote(id) | client.versions.promote(id) | mubit-cli versions promote <id> | promote_version |
| Roll back to the previous version | client.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 can | TypeScript | Python | Command | MCP tool |
|---|---|---|---|---|
| List the lessons Mubit formed | client.lessons.list() | client.lessons.list() | mubit-cli lessons ls | list_lessons |
| Open a lesson | client.lessons.get(id) | client.lessons.get(id) | mubit-cli lessons get <id> | get_lesson |
| List imports | client.imports.list() | client.imports.list() | mubit-cli imports ls | list_imports |
| See usage: calls and tokens | client.usage.get() | client.usage.get() | mubit-cli usage | get_usage |
| See your balance and credit | client.billing.get() | client.billing.get() | mubit-cli billing | get_billing |
| Read a project's activity | client.activity.list() | client.activity.list() | mubit-cli activity | list_activity |
| Read a long-running job | client.jobs.get(id) | client.jobs.get(id) | mubit-cli jobs get <id> | get_job |
| Wait for a job to finish | client.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
dataandnext_cursor. Passnext_cursorback ascursorto 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
429or a5xxanswer, an SDK waits, honouringRetry-Afterwhen Mubit sends it, and retries up to 2 times. You can change the number. - A retried write isn't applied twice. Every
POSTcarries anIdempotency-Key. The SDKs make one for you, or you can pass your own. - Errors carry a request id. Quote it when you contact support.