Settings API
Credentials, API keys, notifications, OAuth, Engines, Runtime credentials, execution modes, sandboxes, and LLM configuration.
Settings covers a wide area. Most endpoints are user_only; Runtime devices and some sandbox configurations are dual. Confirm the scope before write operations; do not use tk_ for user-level settings.
Endpoints
Credentials and API keys
| Method | Path | Purpose |
|---|---|---|
GET/PUT |
/api/settings/credentials |
Third-party platform credential status and update |
POST |
/api/settings/credentials/reveal |
Retrieve credential plaintext once |
GET/POST |
/api/settings/api-keys |
List or generate API keys |
DELETE |
/api/settings/api-keys/{key_id} |
Revoke an API key |
POST |
/api/settings/beta-apply/send-code |
Email verification code for beta applications (public; returns email_configured=false when mail is not configured and the application can still be submitted) |
Notifications and OAuth
| Method | Path | Purpose |
|---|---|---|
GET/PUT |
/api/settings/notifications |
Notification preferences |
GET/PUT |
/api/settings/oauth |
GitCode OAuth configuration |
GET/PUT |
/api/settings/oauth-github |
GitHub OAuth configuration |
GET/PUT |
/api/settings/gitcode-repo/{owner}/{repo} |
Repository GitCode configuration |
Engines and Runtime credentials
| Method | Path | Purpose |
|---|---|---|
GET |
/api/settings/agent-runtimes |
Engine list |
GET |
/api/settings/runtime-devices |
Device list |
POST |
/api/settings/agent-runtimes/refresh |
Refresh Engines |
GET |
/api/settings/agent-runtimes/{rid} |
Engine details |
POST |
/api/settings/agent-runtimes/{rid}/health-reset |
Reset the health score |
GET/POST |
/api/settings/agent-runtimes/{rid}/tags |
Engine tags |
PUT/DELETE |
/api/settings/agent-runtimes/{rid}/tags/{tag} |
Edit or delete a tag |
GET/POST |
/api/settings/runtime-credentials |
List or create Runtime credentials |
PUT |
/api/settings/runtime-credentials/{cid} |
Rename |
PUT |
/api/settings/runtime-credentials/{cid}/scope |
Switch the scope |
POST |
/api/settings/runtime-credentials/{cid}/revoke |
Revoke |
GET |
/api/settings/sandbox-platforms |
Supported sandbox platforms |
GET |
/api/settings/sandbox-engines |
Supported sandbox engines |
GET |
/api/settings/llm-engine-types |
Engine types available for LLM credentials |
GET |
/api/settings/backend-agents |
Backend engines (legacy alias of agent-runtimes) |
Modes and event filters
| Method | Path | Purpose |
|---|---|---|
GET/PUT |
/api/settings/execution-mode |
Execution mode |
GET/PUT |
/api/settings/pipeline-mode |
Pipeline mode |
GET/POST |
/api/settings/event-action-filters |
Event filter rules |
PUT/DELETE |
/api/settings/event-action-filters/{rule_id} |
Edit or delete a rule |
Sandboxes
| Method | Path | Purpose |
|---|---|---|
PUT |
/api/settings/sandbox-providers/{provider_id}/toggle |
Enable or disable a provider |
PUT |
/api/settings/sandbox-templates/{tpl_id}/toggle |
Enable or disable a template |
POST/DELETE |
/api/settings/sandbox-templates/{tpl_id}/bind-engine |
Bind or unbind an Engine |
POST |
/api/settings/sandbox-providers/{provider_id}/scan-templates |
Scan templates |
GET/PUT |
/api/settings/sandbox-provider-configs |
Provider configuration |
GET/POST |
/api/settings/sandbox-providers |
List/create providers |
PUT |
/api/settings/sandbox-providers/{provider_id} |
Update a provider |
POST |
/api/settings/sandbox-providers/{provider_id}/health |
Provider health check |
GET/POST |
/api/settings/sandbox-templates |
List/create templates |
PUT/DELETE |
/api/settings/sandbox-templates/{tpl_id} |
Update/delete a template |
POST |
/api/settings/sandbox-templates/{tpl_id}/check |
Check template validity |
DELETE |
/api/settings/sandbox-templates/{tpl_id}/bind-engine/{engine_type} |
Unbind a single engine |
LLM credentials
| Method | Path | Purpose |
|---|---|---|
GET/POST |
/api/settings/llm-credentials |
User LLM credentials |
DELETE |
/api/settings/llm-credentials/{cred_id} |
Delete |
GET/POST |
/api/settings/llm-credentials/repo |
Repository LLM credentials |
PUT |
/api/settings/llm-credentials/repo/{cred_id}/toggle |
Enable or disable |
DELETE |
/api/settings/llm-credentials/repo/{cred_id} |
Delete |
Admin sandbox
The allowlist, path, and configuration endpoints under /admin/sandbox/... are admin-side and unavailable to regular users.
Generate an API key
POST /api/settings/api-keys
Request body: {"name":"<key-name>"}.
The response returns the plaintext only once:
{"id":1,"name":"ci","plaintext":"grape_...","key":"grape_..."}
The plaintext is shown only once and the server stores only a hash. Save it to a secret manager immediately; do not write it into a repository.
Retrieve credential plaintext
POST /api/settings/credentials/reveal
Returns the plaintext of the specified credential once. After calling it, do not write logs or paste the value into an Issue. Regular queries return only a mask and whether the credential exists.
Engines and tags
GET /api/settings/agent-runtimes
GET /api/settings/agent-runtimes/{rid}
GET /api/settings/agent-runtimes/{rid}/tags
POST /api/settings/agent-runtimes/{rid}/tags
Tags constrain Scene dispatch. After changing tags, rebind or reapply the Scene node; otherwise the old rules still apply.
Runtime credentials
Runtime credentials (rta_) are used for Worker registration. They are shown only once after creation; revoking one affects the corresponding Worker.
GET/POST /api/settings/runtime-credentials
POST /api/settings/runtime-credentials/{cid}/revoke
Common errors
| Status | Cause |
|---|---|
| 400 | Missing parameters or an invalid name |
| 403 | A tk_ credential was used, or the caller is not an administrator |
| 404 | The credential or Engine does not exist |
| 409 | Name conflict |
Related
Code platform integration | Runtimes and Workers | Authentication and credentials