ChartnautDocs

API keys

An API key lets the CLI, a coding agent or your own code call Chartnaut as you. You create and revoke keys on the Developers page, in the menu under your name.

A key acts as you. It can read, save and run anything your account can, within the scopes you give it, and it uses your plan's limits exactly as the app does. Treat it like a password.

On Free

API access is included on Starter and above. The Developers page still opens on Free, with the install commands and the key list, but it cannot give you a working key:

  • Create API key opens the form, and submitting it shows API access is included on Starter and above.

  • Approving chartnaut login in the browser shows the same message after you click Connect.

  • A key made before a move to Free stays in the list, and every call it makes gets 403 plan_limit. It works again within a minute of upgrading.

Revoking works on every plan, so you can always clear out old keys. Plans and limits lists what each plan includes.

Create a key

  1. Open the menu under your name and choose Developers.

  2. Under API keys, click Create API key.

  3. Type a Name you will recognise later, such as Laptop CLI.

  4. Untick any Scopes the key does not need. At least one must stay ticked.

  5. Pick when it Expires: Never, 30 days, 90 days or 1 year. The default is 90 days.

  6. Click Create API key.

  7. Copy the key. Chartnaut shows it once, and closing the dialog loses it for good.

Screenshot to capture · 4:3 · cli-api-keys-create
The Create API key dialog in its form state
Route/morpheus/settings/developers
FocusThe Create API key dialog: Name field filled with Laptop CLI, the three scope rows all ticked, Expires set to 90 days, Cancel and Create API key buttons
StateA Starter or higher account; dialog open, nothing submitted
Sourceclient/src/routes/authenticated/morpheus/settings/ApiTokens/CreateApiTokenDialog.tsx:138 CreateApiTokenDialog
The Create API key form with all three scopes ticked.

The next screen shows the key, and under it the line that signs the CLI in with it:

chartnaut login --token cn_live_XXXX

A third line for Claude Code over MCP is marked Coming soon. For your own code, send the key as a bearer token; API overview shows how.

Screenshot to capture · 4:3 · cli-api-keys-created
The API key created state of the dialog, with the key and the CLI sign-in line
Route/morpheus/settings/developers
FocusThe API key created dialog: the copy-now warning, the key, the chartnaut login --token line, the Claude Code (MCP) line marked Coming soon, and Done
StateA Starter or higher account. The frame shows a live secret: before capturing, replace the secret text in both copy blocks with cn_live_XXXX in devtools, and revoke the key straight after
Sourceclient/src/routes/authenticated/morpheus/settings/ApiTokens/CreateApiTokenDialog.tsx:101 CreateApiTokenDialog
The new key, shown once, with the CLI sign-in line under it.

Most CLI users never open this dialog. Approving chartnaut login in the browser makes a key named CLI on followed by your computer's name, with every scope and no expiry. Sign in covers it.

Scopes

A scope narrows what a key can do. It never adds anything your account cannot already do.

Scope

Lets the key

scripts:read

Every read: your scripts, versions, a definition's events, runs and results, instruments, timeframes, the docs and your usage. Also validating a script without saving it

scripts:write

Create scripts, save new versions, change a name, description or visibility, and delete

runs:write

Start and cancel runs, and run a definition over history

A key for a dashboard that only reads results needs scripts:read alone. A key for a coding agent that writes and tests scripts needs all three. A call outside the key's scopes gets 403 forbidden_scope.

The keys list

Each key shows its name, its first characters (cn_live_ and four more), its scopes, when it was created, when it was last used and when it expires.

Screenshot to capture · 16:9 · cli-api-keys-list
The API keys list with two keys
Route/morpheus/settings/developers
FocusThe API keys section: header with Create API key, and two key rows showing name, cn_live_ prefix, scope chips, Created, Last used and Expires, each with Revoke
StateTwo keys: Laptop CLI with all three scopes, expiring in 90 days and used today; Dashboard with scripts:read only, never expires, never used
Sourceclient/src/routes/authenticated/morpheus/settings/ApiTokens/ApiTokensSection.tsx:114 TokenRow
Two API keys with their scopes, last use and expiry.

An expired key stays in the list marked Expired until you revoke it, and it stops working the moment it expires.

You can have 20 keys at once, not counting expired ones. Make one per machine or per tool, so revoking one never breaks the others.

Revoke a key

  1. Click Revoke on the key.

  2. Click Revoke again in the confirm dialog.

Anything using the key stops working straight away, and it cannot be undone.

Screenshot to capture · 4:3 · cli-api-keys-revoke
The Revoke API key confirm dialog
Route/morpheus/settings/developers
FocusThe Revoke API key dialog: the key name as subtitle, the stop-working warning with the key prefix, Cancel and Revoke
StateAt least one key in the list
Sourceclient/src/routes/authenticated/morpheus/settings/ApiTokens/ApiTokensSection.tsx:76 ApiTokensSection
The Revoke API key confirm dialog.

chartnaut logout revokes the key the CLI is signed in with, including one you gave it with --token. Your own code can do the same with Revoke the current key. Revoke a key at once if it ends up in a commit, a log or a chat.