Skip to main content
POST
/
v1
/
api-keys
Create an API key
curl --request POST \
  --url https://api.runtools.ai/v1/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "scopes": [
    "sandbox:create"
  ],
  "expiresIn": "<string>",
  "isTest": false,
  "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "keyPrefix": "<string>",
    "scopes": [
      "<string>"
    ],
    "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "expiresAt": "2023-11-07T05:31:56Z",
    "lastUsedAt": "2023-11-07T05:31:56Z",
    "revokedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "status": "active",
    "ownerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "ownerDisplayName": "<string>",
    "ownerEmail": "<string>",
    "key": "<string>"
  },
  "message": "Store this key securely. You will not be able to see it again."
}

Documentation Index

Fetch the complete documentation index at: https://docs.runtools.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

WorkOS session token or RunTools API key (rt_live_* / rt_test_*). Used in Authorization: Bearer <token> header.

Body

application/json
name
string
required
scopes
enum<string>[]

Empty defaults to ['*'].

Available options:
sandbox:create,
sandbox:read,
sandbox:write,
sandbox:*,
agent:run,
agent:read,
agent:write,
agent:*,
files:read,
files:write,
files:*,
org:read,
org:write,
org:members,
org:*,
admin:resources,
admin:*,
*
expiresIn
string

Duration string like 30d, 90d, 1y.

isTest
boolean
default:false
projectId
string<uuid> | null

Response

201 - application/json

Created.

data
object
message
string
Example:

"Store this key securely. You will not be able to see it again."