API keys and scopes
Create, scope, use, rotate and revoke API keys, the credentials scripts, integrations and agents use for programmatic access.
API keys authenticate programmatic callers (scripts, integrations and AI agents) as you, limited to the scopes and artifacts you grant. A key is a bearer credential issued by the platform's authentication service.
Create a key in the console
- Open Settings → API keys and choose Create key.
- Select the scopes the key needs. Read, write, render, share, publish and delete are distinct permissions; grant the minimum.
- Optionally restrict the key to particular artifacts.
- Copy the revealed key once. It is never shown again.
Use a key
Send the key as a bearer credential in the Authorization header of your
requests:
curl -H "Authorization: Bearer <your-key>" \
https://api.xentropy.ai/api/v1/artifactsScopes
Permissions are distinct and independently grantable:
| Scope | Allows | Agent default |
|---|---|---|
artifacts:read | List and read artifacts, versions and outputs | ✓ |
artifacts:write | Create, edit, refresh, trash and restore artifacts | ✓ |
artifacts:render | Export images and files; read and cancel export jobs | ✓ |
artifacts:share | Create and revoke share links | opt-in |
artifacts:publish | Publish and unpublish with reviewed metadata | opt-in |
artifacts:delete | Permanently delete trashed artifacts | opt-in |
dashboards:read | List and read dashboards | ✓ |
dashboards:write | Create, edit, trash and restore dashboards | ✓ |
dashboards:delete | Permanently delete trashed dashboards | opt-in |
data:read | Preview and inspect dataset definitions and saved datasets | ✓ |
data:write | Create, bind and delete reusable datasets; uploads | ✓ |
connections:read | List your connections; discover, preview and read the sources you selected | ✓ |
connections:write | Write through Google integrations (Sheets, Drive) | opt-in |
connections:manage | Verify and create connections; requires unrestricted connection access | opt-in |
Agent default is the set an assistant receives when you choose Allow access and saving while connecting it. Opt-in scopes are granted only when the assistant asks for them and you approve them. MCP lists only the tools your grant can call. An existing connection never gains new scopes: reconnect the assistant to approve a larger set.
Folders
Folders add no new scope. Reading folders needs any read scope; changing them
needs any write scope. folders_items_move checks the scope of each item's
kind: artifacts:write, dashboards:write, data:write for datasets, and
data:write or connections:write for connections. Moving organises items and
does not change who can see them. See Folder tools.
Restrictions
- Artifact restriction: optionally pin the key to specific artifacts; requests outside the set fail authorization.
- No credential minting: an agent cannot create or rotate another agent's credentials.
- Ownership first: scopes never bypass ownership checks on another user's resources.
Rotate and revoke
- Rotate replaces a key with a new credential in one step. Use it as routine hygiene or after any suspected exposure.
- Revoke disables the key immediately; the next request with a revoked key fails authorization.
Handling rules
Treat keys like secrets
Keep keys in your secret manager or process environment. Never place them in source code, project files, command-line arguments, URLs, logs, or analytics.
- One key per integration, named for what it belongs to.
- Prefer artifact-restricted keys for agents working on specific artifacts.
- Rotate on a schedule; revoke immediately when an integration is retired.
Agent data workflow
Use data_preview_definition to inspect a source before saving it with
data_datasets_create. Alternatively, artifacts_create accepts a direct
source: {definition, mode: "live" | "snapshot"} without a saved dataset.
connections_create accepts configuration and an idempotency key. Inject
credentials programmatically from a secure process environment, never in chat.
Connection creation verifies TLS, login and selected relation permissions;
responses include metadata only. Retry identical input with the same key.