SDKs and tools
This section is for developers who want to send model calls through Mubit from code, or manage Mubit without the console. It covers four tools. All four manage the same things as the console does, through the same API.
| Tool | Install | Use it to |
|---|---|---|
| TypeScript SDK | npm install @mubit-ai/sdk | Send calls through Mubit and manage Mubit from Node.js code. |
| Python SDK | pip install mubit-sdk | The same, from Python. |
| Command line | brew install MubitLabs/tap/mubit-cli | Manage Mubit from a terminal, a script or CI. |
| MCP server | npx -y @mubit-ai/mcp | Let an AI agent, such as Claude Code or Cursor, manage Mubit. |
Coming from an earlier version of an SDK? Read Migrate to 1.0.
Two kinds of key
Mubit uses two kinds of key. You create both in the console at app.mubit.ai.
| Key | Starts with | Environment variable | What it's for |
|---|---|---|---|
| Inference key | mbt_ or mw_ | MUBIT_API_KEY | Sending model calls through Mubit. Each key belongs to one project. |
| Management key | mwm_ | MUBIT_MANAGEMENT_KEY | Managing your organization: projects, calls, tasks, trained models, keys, usage and more. |
The keys the console creates for sending calls start with mbt_, and Mubit also accepts keys that start with mw_. A management key starts with mwm_.
Each tool needs the key for the job it does. Sending model calls takes an inference key. Managing Mubit takes a management key. The two are not interchangeable: an inference key sent to the management API, or a management key sent with a model call, is refused with 403 wrong_lane.
Mubit keys shows how to create an inference key. To create a management key:
- Sign in at app.mubit.ai.
- Open All projects. In the sidebar, under Workspace, select Management keys.
- Select Create management key.
- Enter a Key name, and choose a Role.
- Optional: choose a Project scope to limit the key to one project. The default is All projects (organization-wide).
- Select Create management key again. Select Copy key, save the key, and select Done.
Only an admin of your organization can create a management key. If you aren't an admin, ask an admin to create one for you. The console shows a new key once, so copy it when it appears. If you lose a key, create a new one.
A management key has a role. The role decides what the key can do:
| Role | What the key can do |
|---|---|
read | Read everything except the list of management keys |
member | Also rate calls, review training examples and import past calls |
admin | Everything |
Keep management keys on a server, in a script or in your CI. Don't put one in code that runs in a browser or an app that you ship.
Send model calls through Mubit
The SDKs hand you the provider's own client, already pointed at Mubit and carrying your inference key. You can also point any provider SDK at Mubit yourself. Connect shows each provider, and Frameworks, Claude Code and Coding tools show tools that speak a provider's API.
Manage Mubit
The SDKs, the command line and the MCP server call the same management API, so what one can do, the others can do too. Manage Mubit lists each operation with its SDK method, its command and its MCP tool.
Versions, and methods Mubit doesn't serve yet
- The SDKs are at version 1.0.6, the command line at 1.0.5 and the MCP server at 1.0.1.
- These pages list the management operations Mubit serves. The SDKs, the command line and the MCP server also have methods, commands and tools for operations Mubit doesn't serve yet. Mubit answers those with
501 not_implemented, and these pages leave them out.