The Studio API accepts API keys and, when enabled by your deployment, OAuth access tokens. API keys support automation and the SDKs. OAuth lets the CLI and registered applications act on your behalf with permissions you approve.
Studio supports two types of API keys — personal keys and workspace keys — each with different billing and access behaviors.
Key Types
| Feature | Personal Keys | Workspace Keys |
|---|---|---|
| Billing | Workspace payer for workspace-hosted usage | Workspace payer |
| Scope | Across workspaces you have access to | Shared across the workspace |
| Managed by | Each user individually | Workspace admins |
| Permissions | Must be enabled at workspace level | Require admin permissions |
| Chat actions shown as | The key owner | Robô |
Personal keys identify the user making a request; they do not select who pays. Hosted usage is billed to the workspace's organization or personal billing account and, for organizations, is attributed to the actor's member cap. Workspace admins can disable personal API key usage for their workspace. If disabled, only workspace keys can be used.
Generating API Keys
To generate a personal key, open Account settings → Studio API keys. Workspace administrators can create shared keys from Workspace settings → Studio API keys.
Choose when the key expires as you create it: 15, 30 or 90 days, 1 or 2 years, or never. An expired
key is refused with 401. From a key's menu you can also rename it, change what it may do, or
Regenerate it: the key gets a new secret, keeping its name and permissions, and the current
secret stops working at once, so replace it wherever it is used.
API keys are only shown once when generated. Store your key securely — you will not be able to view it again.
Using API Keys
Pass your API key in the X-API-Key header with every request:
curl -X POST https://agent-studio.seeyu.ai/api/v2/workflows/{workflowId}/execute \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"input": {}}'const response = await fetch(
'https://agent-studio.seeyu.ai/api/v2/workflows/{workflowId}/execute',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': process.env.STUDIO_API_KEY!,
},
body: JSON.stringify({ input: {} }),
}
)import os
import requests
response = requests.post(
"https://agent-studio.seeyu.ai/api/v2/workflows/{workflowId}/execute",
headers={
"Content-Type": "application/json",
"X-API-Key": os.environ["STUDIO_API_KEY"],
},
json={"input": {}},
)Workspace Scoping
Every request that names a workspace is checked against the key's own scope before any data is read. The two key types are scoped differently:
- A workspace key can only ever reach its own workspace. If a request names a
different
workspaceId, the API answers403withAPI key is not authorized for this workspaceand stops there — no query runs, and the response reveals nothing about whether the other workspace exists. This holds on every endpoint of every API version, and it is not something a workspace admin can grant around. - A personal key reaches a workspace only when that workspace allows it. Each
workspace has an Allow personal API keys setting. With it off, a personal key is
refused with
403andPersonal API keys are not allowed for this workspace, even when its owner is a member. With it on, the key is still held to its owner's permission level on that workspace — a read endpoint needsread, a write endpoint needswrite— and a key whose owner has neither is refused with403andAccess denied.
All three refusals are 403 and are told apart by the message, not by a status code.
Branch on the message only for logging — the remedy differs: point the workspace key at
its own workspace, turn on Allow personal API keys in Workspace settings, or
raise the owner's workspace permission.
A 403 never tells you whether a resource exists in the workspace you could not reach.
Resources are always resolved inside workspaceId, so a conversation or contact that
lives in another workspace is reported as 404 not found rather than as denied.
Restricting a key
Any key, personal or workspace, can be limited to the actions it needs, on every plan. Set Access when you create the key, or choose Edit permissions on it in Studio API keys:
| Access | What the key can do |
|---|---|
| Full access | Everything its role allows. Every key starts here. |
| Read only | Every read action. It changes nothing, runs nothing and spends no credits. |
| Custom | Only the actions you check, resource by resource. |
A permission never adds to the role: a key can do only what both its role and its permissions allow. A change applies from the key's next request, and the key itself stays the same, so nothing that uses it needs a new secret.
Actions
Each action is named resource.action, the form GET /api/v2/meta reports.
| Resource | Actions |
|---|---|
workflows | read, create, update, delete, deploy, execute |
logs | read |
tables | read, create, update, delete, export, execute |
table_rows | create, update, delete (reading rows is tables.read) |
files | read, create, update, delete |
knowledge | read, search, create, update, delete, export |
custom_tools, mcp_servers, skills | read, create, update, delete |
secrets | read, write, delete |
integrations | read, create, update, delete, execute |
sandboxes | read, create, update, delete |
workspace_forks | read, manage |
members, billing, audit_logs | read |
roles | read, create, update, delete, assign (personal keys only) |
studio_agent | ask and build (personal keys only), configure |
chat_contacts | read, create, update, delete |
chat_conversations | read, create, update |
chat_messages | read, send |
chat_teams | read |
helpdesk_calls | read, create, update |
An action counts as a write when it changes data, runs something, spends credits or reaches
outside Studio. That is why knowledge.search, which spends credits, is left out of Read only.
An endpoint whose effect depends on its body asks for every action it may take: creating a
conversation that also sends its first message needs chat_conversations.create and
chat_messages.send.
Some actions reach further than their name. workflows.execute and tables.execute run the
deployed workflow as it is: its blocks act with the workflow's own access, not the key's
permissions. studio_agent.ask chats with Studio in plan mode, which reads what the key's
owner can read whatever the key's read permissions say; studio_agent.build chats in agent
mode, with everything the owner's role allows. A conversation a restricted key starts never
creates an API key.
Refusals
A request the key's permissions don't cover is refused with 403 before anything is read, so a
refused delete answers the same whether the resource exists or not. The detail code is
API_KEY_PERMISSION_DENIED and the message names what the key lacks:
{
"error": {
"code": "FORBIDDEN",
"message": "This API key does not have the tables.delete permission",
"details": { "code": "API_KEY_PERMISSION_DENIED" }
}
}To check what a key holds, call GET /api/v2/meta. Its permissions field lists the key's
actions, or is null for a key with full access.
Where Keys Are Used
API keys authenticate access to:
- Workflow execution — run deployed workflows via the API
- Logs API — query workflow execution logs and metrics
- MCP servers — authenticate connections to deployed MCP servers
- Chat API — read and write conversations, messages, contacts, and teams in a workspace inbox
- SDKs — the Python and TypeScript SDKs use API keys for all operations
OAuth access tokens
Use studio login to authorize the CLI in your browser, or studio login --read-only to request read access. For hosted Studio, add --endpoint https://agent-studio.seeyu.ai; the CLI saves the endpoint with the login. The CLI stores the login locally and refreshes access tokens automatically. See CLI authentication for profiles, sign-in, and sign-out.
Registered OAuth applications send access tokens in the Authorization header:
curl https://agent-studio.seeyu.ai/api/v2/workspaces \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"| Scope | Access |
|---|---|
api:read | Read operations, including searches sent as POST requests |
api:write | Includes api:read, plus mutations and execution, including operations that can start external work |
offline_access | Refresh tokens for continued access after the access token expires |
Scopes limit what an application may do; your current workspace membership and role still apply. Each endpoint documents its required scope. Some GET endpoints that perform external discovery require api:write, so HTTP method alone does not determine the permission.
Manage grants in Settings → General → Authorized apps. Revoking an application signs out all of its logins. studio logout revokes the current CLI login and removes it from your machine. The Python and TypeScript SDKs currently use API keys; they do not manage OAuth sign-in or refresh tokens.
Security
- Keys use the
sk-studio-prefix and are encrypted at rest - Keys can be revoked at any time from the dashboard
- Use environment variables to store keys — never hardcode them in source code
- For browser-based applications, use a backend proxy to avoid exposing keys to the client
Never expose your API key in client-side code. Use a server-side proxy to make authenticated requests on behalf of your frontend.