DreamLake

API Reference

The REST surface behind the CLI and dashboard. Endpoints are grouped by resource; every path below is relative to your server's base URL.

Base URL: https://api.dreamlake.ai in production, http://localhost:3001 in local dev. All endpoints require Authorization: Bearer <token> unless noted — see Architecture § Auth for how tokens are issued.

Auth

MethodPathDescription
POST/auth/exchangeExchange vuer-auth token for dreamlake JWT (no auth required)
GET/auth/meCurrent user profile
PATCH/auth/meUpdate profile

Namespaces & Projects

MethodPathDescription
GET/auth/namespacesList public namespaces (no auth)
GET/namespaces/:slugNamespace overview with asset counts
PATCH/namespaces/:slugUpdate namespace (owner only)
GET/namespaces/:slug/projectsList projects
POST/namespaces/:slug/projectsCreate project
PATCH/namespaces/:slug/projects/:projUpdate project

For GraphQL project/Note reads and equivalent REST association and choice views, see Project and Note queries.

Episodes

MethodPathDescription
POST/namespaces/:slug/projects/:proj/episodesCreate/upsert episode
GET/namespaces/:slug/projects/:proj/episodesList episodes (paginated)
PATCH/namespaces/:slug/projects/:proj/episodes/:nameUpdate episode

Nodes (File Tree)

MethodPathDescription
POST/nodesCreate node (auto-creates hierarchy)
GET/nodesList nodes by namespace/project/kind
GET/nodes/childrenList 1-level children
GET/nodes/lookupResolve node by materialized path
GET/nodes/:id/descendantsAll descendants (recursive)
GET/nodes/:id/contentsEpisodes + files (paginated)
GET/nodes/:id/downloadPresigned S3 download URL
PATCH/nodes/:idUpdate node (name, move, tags)
DELETE/nodes/:idHard-delete node + descendants

Files

MethodPathDescription
POST/episodes/:id/filesUpload file (multipart)
GET/episodes/:id/filesList files
GET/episodes/:id/files/:fid/downloadDownload file
DELETE/episodes/:id/files/:fidDelete file

Tracks & Logs

MethodPathDescription
POST/episodes/:id/tracks/:name/appendAppend data point
POST/episodes/:id/tracks/:name/append-batchAppend batch
GET/episodes/:id/tracks/:name/dataRead track data
GET/episodes/:id/tracksList tracks
POST/episodes/:id/logsCreate log entries
GET/episodes/:id/logsQuery logs (level, time, search)

Parameters

MethodPathDescription
POST/episodes/:id/parametersSet/merge parameters
GET/episodes/:id/parametersGet parameters
DELETE/episodes/:id/parametersSoft-delete

Bindrs & Datasets

MethodPathDescription
POST…/bindrsCreate bindr
GET…/bindrsList bindrs
GET…/bindrs/:nameGet bindr
PATCH…/bindrs/:nameUpdate bindr
DELETE…/bindrs/:nameSoft-delete
POST…/bindrs/:name/membersAdd members
DELETE…/bindrs/:name/membersRemove members
POST…/datasetsCreate dataset
GET…/datasetsList datasets
GET…/datasets/:nameGet dataset with bindrs
PATCH…/datasets/:nameUpdate dataset
DELETE…/datasets/:nameSoft-delete

All bindr/dataset paths are under /namespaces/:slug/projects/:proj/.

Artifacts

Renderable, versioned documents with per-artifact visibility — the surface behind dreamlake artifact. Public/list/read routes apply per-artifact policy themselves (member / public / valid share).

MethodPathDescription
GET/namespaces/:slug/artifactsCatalog list (members: all; others: public only). ?deleted=true lists the Trash (members)
GET/namespaces/:slug/artifacts/:idOne catalog row + viewerCanManage (?share= for share links)
POST/namespaces/:slug/artifacts/upload-credentialsMint scoped STS creds for a push (member)
POST/namespaces/:slug/artifacts/:idUpsert catalog entry — metadata / visibility / share token (member)
POST/namespaces/:slug/artifacts/read-tokenMint a short-lived per-artifact read token
GET/namespaces/:slug/artifacts/read/:token/*Read-proxy: stream artifact objects (Range-aware)
DELETE/namespaces/:slug/artifacts/:idSoft delete → Trash (member)
POST/namespaces/:slug/artifacts/:id/restoreRestore from Trash (member)
DELETE/namespaces/:slug/artifacts/:id/purgePermanent purge — storage + catalog, irreversible (member)
GET/me/artifactsSigned-in user's artifacts: yours + shared-with-you, tagged by group

Envs

Versioned simulation environments (MJCF + assets) — the surface behind dreamlake env. Env file bytes never transit the API: uploads go straight to storage with brokered STS credentials, and reads hand back one presigned URL per file. Public routes apply per-env policy themselves; a hidden env answers 404, never 403.

MethodPathDescription
GET/namespaces/:slug/envsCatalog list (members: all; others: public only). ?deleted=true lists the Trash (members)
GET/namespaces/:slug/envs/:nameOne catalog row + viewerCanManage + thumbVersion
GET/namespaces/:slug/envs/:name/versionsAll pushed versions, newest first
GET/namespaces/:slug/envs/:name/versions/:versionOne version's manifest — entry + per-file {path, size, hash, url} with presigned GETs (:version int or latest)
POST/namespaces/:slug/envs/upload-credentialsMint STS creds scoped to envs/<ns>/<name>/ for a push (member)
POST/namespaces/:slug/envs/:nameRegister a pushed version (create-or-revive, latestVersion = max), or patch title/description/envType/visibility (member)
POST/namespaces/:slug/envs/:name/thumbnailStore the browser-captured PNG thumbnail, ≤ 512 KB (member)
DELETE/namespaces/:slug/envs/:nameSoft delete → Trash (member)
POST/namespaces/:slug/envs/:name/restoreRestore from Trash (member)
DELETE/namespaces/:slug/envs/:name/purgePermanent purge — whole storage prefix + catalog, irreversible (member)

Libraries

Asset collections stored verbatim under one storage prefix, searchable per asset — the surface behind dreamlake library. Payload bytes never transit the API: uploads and downloads run on presigned batches straight to storage. Public routes apply per-library policy themselves (member / public visibility / valid ?share=<token>); a hidden library answers 404, never 403.

MethodPathDescription
GET/namespaces/:slug/librariesCatalog list (members: all; others: public only). ?deleted=true lists the Trash (members)
GET/namespaces/:slug/libraries/:nameOne catalog row (LibraryDetail) + viewerCanManage
GET/namespaces/:slug/libraries/:name/manifestThe full parsed wire manifest (dreamlake.assets/v1), served verbatim
GET/namespaces/:slug/libraries/:name/assets/:assetIdOne asset with presigned per-file URLs — the preview payload (?ttlSeconds)
POST/namespaces/:slug/libraries/:name/files-presignPresigned GETs for manifest paths, ≤ 1,000 per batch — the pull payload (ttlSeconds)
GET/namespaces/:slug/libraries/:name/searchSearch inside one library (q, category, kind, license, tag, limit ≤ 200, offset)
GET/librariesVisible libraries across namespaces, newest first (limit ≤ 500)
GET/library-searchCross-library search over libraries=ns/a,ns/b (≤ 50); inaccessible targets land in skipped[]
POST/namespaces/:slug/libraries/:name/upload-authorizationsPresigned upload batch for a push (member)
POST/namespaces/:slug/libraries/:name/registerValidate the uploaded manifest, bump revision (CAS — stale expectedRevision → 409), reconcile storage (member)
POST/namespaces/:slug/libraries/:namePatch visibility / share token — content metadata is manifest-derived (member)
DELETE/namespaces/:slug/libraries/:nameSoft delete → Trash (member)
POST/namespaces/:slug/libraries/:name/restoreRestore from Trash (member)
DELETE/namespaces/:slug/libraries/:name/purgePermanent purge — storage prefix + catalog, irreversible (member)

Full request/response schemas, the manifest contract, and agent read patterns live in Libraries Reference.

LLM Relay

Pass-through to a chat-model API using your DreamLake token instead of a provider key — the surface behind LLM Relay. The path under /relay/:provider/ is forwarded to the provider verbatim, so its whole API is reachable. Authenticate with Authorization: Bearer or x-api-key.

MethodPathDescription
GET/relay/providersWhich providers this deployment can relay to, and the base URL for each
POST/relay/:provider/v1/messagesRelay a chat completion (stream: true streams SSE straight back)
POST/relay/:provider/v1/messages/count_tokensRelay a token count
GET/relay/:provider/v1/modelsRelay the provider's live model list

Search

MethodPathDescription
POST/projects/:id/searchProject-wide vector search
POST/projects/:id/episodes/:eid/searchEpisode-scoped search
POST…/assets/searchSemantic search (CLIP text/image)

Health

MethodPathDescription
GET/healthServer status (no auth)

Next steps

CLI Reference →

The command-line wrapper over these endpoints.

Architecture →

The data model and auth flow behind the paths on this page.