All endpoints live under /api/cloud-saas and require Bearer token authentication.
| Query | Type | Description |
|---|---|---|
category | string | Filter by category |
q | string | Search query |
locale | string | Language for localized content (default 'en') |
Returns approved templates (official + community), sorted by category and score.
Response:
| Query | Type | Description |
|---|---|---|
locale | string | Language (default 'en') |
Returns a single approved template with full content. Supports server-rendered i18n descriptions.
Returns the template's declared environment variables, form fields, and auto-detected env references.
Response:
List or get templates authored by the current user, including pending/rejected ones. Same response shape as public templates.
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Kebab-case identifier (1–255 chars) |
name | string | Yes | Display name (1–255 chars) |
description | string | No | Markdown description |
content | object | Yes | CloudConfig snapshot |
tags | string[] | No | Up to 20 tags |
category | string | No | Category name (≤64 chars) |
baseCost | number | No | Estimated monthly cost in Shrimp Coins |
Content is validated against the template policy allowlist. Templates are submitted for review as pending.
Same fields as create, all optional. Only allowed for the author when the template is draft or rejected.
Re-submits a draft or rejected template for review. No body required.
Deletes own template at any review status.
| Query | Type | Description |
|---|---|---|
limit | number | Max results (50 default, 100 max) |
offset | number | Pagination offset (0 default) |
includeOrphans | '1' | Include orphaned namespaces without DB rows |
includeHistory | '1' | Include all historical deployment entries |
Returns the newest visible deployment per namespace. Uses a per-namespace deduplication strategy.
Returns aggregate cost snapshots for all visible SaaS deployments.
| Field | Type | Required | Description |
|---|---|---|---|
namespace | string | Yes | K8s-safe name (1–255 chars) |
name | string | Yes | Deployment display name (1–255) |
templateSlug | string | Yes | Template identifier |
resourceTier | string | Yes | lightweight, standard, or pro |
agentCount | number | No | Number of agent replicas (≥0) |
configSnapshot | object | Yes | Validated CloudConfig |
envVars | object | No | Key-value environment overrides |
runtimeContext | object | No | { locale?, timezone? } |
Creates a new deployment with billing. Validates the template, locks the namespace, and checks wallet balance (returns 402 if insufficient). The deployment is queued asynchronously.
Returns full deployment detail including current status, blocking info, and cost summary.
Returns cost summary for a specific deployment.
Cancels an active deploy or destroy task. Does not wait for namespace operation locks.
Queues a Pulumi destroy for the current deployment entry. Interrupts active operations.
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | No | snapshot (default) or template |
templateSlug | string | No | Redeploy from a specific template |
configSnapshot | object | No | Explicit config after policy validation |
envVars | object | No | Override declared template env vars |
runtimeContext | object | No | { locale?, timezone? } |
Re-enqueues the same namespace with a new deployment history entry. Does not debit wallet.
| Query | Type | Description |
|---|---|---|
agent | string | Filter by agent name |
pod | string | Filter by pod name |
page | number | Page (1–100) |
limit | number | Per page (20–500, default 200) |
GET /logs returns an SSE event stream (text/event-stream) with real-time events: log, status, error, close. Terminates when deployment reaches terminal status.
GET /logs/history returns a plain JSON array of log entries.
| Query | Type | Description |
|---|---|---|
pod | string | Pod name (required for pod-logs) |
agent | string | Agent name |
tail | number | Lines to tail (default 200, max 2000) |
container | string | Container name (default 'openclaw') |
GET /pods lists K8s pods in the deployment namespace. GET /pod-logs streams live K8s pod logs via SSE.
/claim adopts a Shadow-Cloud-managed namespace with no DB row. /cleanup force-deletes an orphan namespace (admin only).
| Field | Type | Required | Description |
|---|---|---|---|
vars | array | Yes (PUT) | [{ key: string, value: string }] |
Values are encrypted at rest. GET returns masked values ('****'). GET by key returns decrypted value for editing.
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Variable key |
value | string | Yes | Variable value |
isSecret | boolean | No | Whether to treat as secret (masked) |
groupName | string | No | Optional grouping |
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Group name (1–255 chars) |
Returns model providers discovered from installed Cloud plugins. Each entry includes plugin ID, provider details, and required secret fields.
Returns the current user's encrypted provider profiles. Values are masked.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Profile ID (for updates) |
providerId | string | Yes | Catalog provider ID (1–120 chars) |
name | string | Yes | Display name (1–255) |
enabled | boolean | No | Whether the profile is active |
config | object | No | Provider-specific config |
envVars | object | No | Encrypted env var values |
Validates model list in config and applies SSRF guard on any base URL.
Tests encrypted credentials against the provider API with 8s timeout and SSRF protection.
Fetches model list from the provider's native API and persists into the profile config.
Deletes the profile and all associated encrypted values.
Returns the current user's Shrimp Coin balance.
Response:
| Query | Type | Description |
|---|---|---|
limit | number | Max results (50 default, 100 max) |
offset | number | Pagination offset (0 default) |
Returns paginated wallet transaction history.
| Query | Type | Description |
|---|---|---|
limit | number | Max results (50 default, 100 max) |
offset | number | Pagination offset (0 default) |
Returns the user's cloud activity log (paginated), including deployment creation, pause, resume, backup, restore, and deletion events.
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Generation prompt (4–2000 chars) |
feedback | string | No | Follow-up feedback (≤2000) |
previousConfig | object | No | Previous CloudConfig for iteration |
locale | string | No | User locale (≤16 chars) |
timezone | string | No | User timezone (≤64 chars) |
Rate-limited to 12 requests per minute. Returns runId, status, and streamUrl.
AI generation requires capability checks, rate/budget controls, and token estimates before model calls.
| Query | Type | Description |
|---|---|---|
afterSeq | number | Event sequence offset (≥0) |
GET /runs/:runId returns the run with events after afterSeq. GET /stream provides an SSE event stream (text/event-stream) for real-time progress.
| Field | Type | Required | Description |
|---|---|---|---|
feedback | string | Yes | Refinement feedback (1–2000) |
prompt | string | No | Updated prompt (4–2000) |
locale | string | No | User locale |
timezone | string | No | User timezone |
Cancels a running generation. No body required.
Rate-limited endpoints that list available community templates and plugins for use in DIY generation.
GET /schema returns the primary CloudConfig JSON Schema for frontend validation and editor autocomplete.
POST /validate accepts a raw JSON config snapshot and returns a validation summary with errors.