API Keys
An API key lets a program call Partite: the configuration API and the APIs that run meshes. Scripts, servers, CI pipelines, Terraform, the CLI and a self-hosted Partite Mesh with cloud config all use API keys.
To let people or other systems sign in with their own tokens instead, use an access point.
Quick Reference
API Key
| Field | Purpose | Guidance |
|---|---|---|
| Name | Identifies the key | Name it for the system that holds it, for example “ci-terraform” or “support-app”. |
| Description | Notes | Optional. Record who owns the key and where it is stored. |
| Token | The credential | Shown once, when the key is created. Copy it then. Send it as a bearer token, for example |
Scopes & Permissions
| Field | Purpose | Guidance |
|---|---|---|
| Read configuration | Read config objects | Read meshes, agents, model sets, connections and every other configuration object. Needed by Terraform and the CLI, and by a self-hosted Partite Mesh with cloud config. |
| Write configuration | Change config objects | Create, edit and delete configuration objects. Needed by Terraform and by the Terraform state backend. |
| Converse with meshes | Run meshes | Needed for the Conversation API under |
| Trace meshes | Upload traces | Lets a self-hosted Partite Mesh with cloud config upload its traces to the hosted service, so they show in the trace viewer. Also needed to call |
| Use credentials | Run with stored credentials | Lets a self-hosted Partite Mesh with cloud config read the credentials its meshes run with, such as model provider keys and MCP connection secrets, and get their access tokens. Give it only to keys that self-hosted servers use. |
The token
When you create a key, Partite shows its token once. It has the form prt_ak_<key ID>_<secret>. Only a hash of the secret is stored, so a lost token can’t be shown again: create a new key.
Send the token as a bearer token:
curl -H "Authorization: Bearer <API_KEY_TOKEN>" https://api.partite.ai/conversations/<CONVERSATION_ID>Keep the token secret. The key ID alone is not secret.
The key ID and secret can also be sent with HTTP Basic authentication, the key ID as the username and the secret as the password. This is deprecated. Use the bearer token.
Choosing scopes
Give a key only the scopes it needs:
| Used by | Scopes |
|---|---|
| An app that calls meshes | Converse with meshes |
| Terraform or the CLI, to read and change configuration | Read configuration, Write configuration |
| A self-hosted Partite Mesh with cloud config | Read configuration, Use credentials, and Trace meshes to upload traces |
Tunnel relays do not use API keys
Relays authenticate with tunnel keys. You create tunnel keys on the subscription of an MCP connection. See MCP Connections.
Related
- Access Points: let callers sign in with their own tokens.
- Boundaries: limit what callers can do.
- Conversation API: call a mesh with a key.
- Configuration As Code: use a key with Terraform.
- CLI: use a key in scripts and CI.