OneOS Docs
Genesis 0.3.3 Console

API reference

Silos

Serverless PostgreSQL: instances, branches, snapshots and queries.

Operations
21
Base path
https://os.one.ml/api/v1/silos
Scopes
silos:read silos:write
API keys
21 tested with an API key
SDK
genesis.call('silos_listInstances', …) · helpers under genesis.silos
CLI
genesis silos
MCP
21 tools

Operations

OperationEndpointAPI key
List database instances in the selected Genesis projectGET/instancesTested with an API key
Create a database instance in the selected Genesis projectPOST/instancesTested with an API key
Get a database instance with branches, recent operations and 30-day usageGET/instances/{instance_id}Tested with an API key
Delete a database instanceDELETE/instances/{instance_id}Tested with an API key
Rename a database instancePATCH/instances/{instance_id}Tested with an API key
Run up to 50 SQL statements in one transactionPOST/instances/{instance_id}/batchTested with an API key
List the branches of a database instanceGET/instances/{instance_id}/branchesTested with an API key
Create a branch from the current state of another branchPOST/instances/{instance_id}/branchesTested with an API key
Get a branchGET/instances/{instance_id}/branches/{branch_id}Tested with an API key
Delete a branchDELETE/instances/{instance_id}/branches/{branch_id}Tested with an API key
Rename a branchPATCH/instances/{instance_id}/branches/{branch_id}Tested with an API key
Restore a branch from a stored snapshotPOST/instances/{instance_id}/branches/{branch_id}/restoreTested with an API key
Wait for PostgreSQL NOTIFY on one or more channelsPOST/instances/{instance_id}/listenTested with an API key
Get live metrics for a database instanceGET/instances/{instance_id}/metricsTested with an API key
Run one SQL statementPOST/instances/{instance_id}/queryTested with an API key
Resume a database instance nowPOST/instances/{instance_id}/resumeTested with an API key
List stored snapshots of every branch of an instanceGET/instances/{instance_id}/snapshotsTested with an API key
Checkpoint a branch and store the snapshotPOST/instances/{instance_id}/snapshotsTested with an API key
Suspend a database instance (checkpoint, then stop)POST/instances/{instance_id}/suspendTested with an API key
List the regions Silos instances are created inGET/regionsTested with an API key
Silos usage of the selected Genesis project over the last 30 daysGET/usageTested with an API key

Instances

List database instances in the selected Genesis project

GET/v1/silos/instances

silos:readTested with an API keysilos_listInstances

Responses

  • 200Instance metadata only; no credentials or endpoints.
    Response fields
    • instancesobject[]required
    • instances[].[].idstring (uuid)required
    • instances[].[].namestringrequired
    • instances[].[].enginestringrequired

      Runtime engine, postgres-wasm (PostgreSQL compiled to WebAssembly).

    • instances[].[].pgVersionstringrequired

      The PostgreSQL version the runtime engine reports (SHOW server_version), e.g. 17.5.

    • instances[].[].statestringrequired
    • instances[].[].regionstringrequired
    • instances[].[].computeSizestringrequired
    • instances[].[].storageBytesinteger | null (int64)required
    • instances[].[].defaultBranchIdstring | null (uuid)required
    • instances[].[].createdAtstring (date-time)required
    • instances[].[].updatedAtstring (date-time)required
    • instances[].[].lastActiveAtstring | null (date-time)

      The last statement that reached the instance.

    • instances[].[].suspendedAtstring | null (date-time)

      When it last stopped: suspended by a call, or after the idle window.

    • instances[].[].suspendAfterIdleSecondsinteger | null

      Idle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.

  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Create a database instance in the selected Genesis project

POST/v1/silos/instances

silos:writeTested with an API keysilos_createInstance

Request body application/json

  • namestringrequired

    min length 1 · max length 63 · pattern ^[a-z][a-z0-9_-]*$

Responses

  • 201Created instance metadata
    Response fields
    • instanceobjectrequired
    • instance.idstring (uuid)required
    • instance.namestringrequired
    • instance.enginestringrequired

      Runtime engine, postgres-wasm (PostgreSQL compiled to WebAssembly).

    • instance.pgVersionstringrequired

      The PostgreSQL version the runtime engine reports (SHOW server_version), e.g. 17.5.

    • instance.statestringrequired
    • instance.regionstringrequired
    • instance.computeSizestringrequired
    • instance.storageBytesinteger | null (int64)required
    • instance.defaultBranchIdstring | null (uuid)required
    • instance.createdAtstring (date-time)required
    • instance.updatedAtstring (date-time)required
    • instance.lastActiveAtstring | null (date-time)

      The last statement that reached the instance.

    • instance.suspendedAtstring | null (date-time)

      When it last stopped: suspended by a call, or after the idle window.

    • instance.suspendAfterIdleSecondsinteger | null

      Idle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.

  • 400Invalid instance name
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 409An instance already uses this name in this project. List to reconcile; no automatic replay.
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'

Get a database instance with branches, recent operations and 30-day usage

GET/v1/silos/instances/{instance_id}

silos:readTested with an API keysilos_getInstance

Parameters

  • instance_idpath · string (uuid)required

Responses

  • 200Instance detail; no credentials or endpoints.
    Response fields
    • instanceobjectrequired
    • instance.idstring (uuid)required
    • instance.namestringrequired
    • instance.enginestringrequired

      Runtime engine, postgres-wasm (PostgreSQL compiled to WebAssembly).

    • instance.pgVersionstringrequired

      The PostgreSQL version the runtime engine reports (SHOW server_version), e.g. 17.5.

    • instance.statestringrequired
    • instance.regionstringrequired
    • instance.computeSizestringrequired
    • instance.storageBytesinteger | null (int64)required
    • instance.defaultBranchIdstring | null (uuid)required
    • instance.createdAtstring (date-time)required
    • instance.updatedAtstring (date-time)required
    • instance.lastActiveAtstring | null (date-time)

      The last statement that reached the instance.

    • instance.suspendedAtstring | null (date-time)

      When it last stopped: suspended by a call, or after the idle window.

    • instance.suspendAfterIdleSecondsinteger | null

      Idle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.

    • branchesobject[]required
    • branches[].[].idstring (uuid)required
    • branches[].[].namestringrequired
    • branches[].[].isDefaultboolean | nullrequired
    • branches[].[].statestringrequired
    • branches[].[].storageSizeBytesinteger | null (int64)required
    • branches[].[].createdAtstring | null (date-time)required
    • operationsobject[]required
    • operations[].[].idstring (uuid)required
    • operations[].[].kindstringrequired
    • operations[].[].statusstringrequired
    • operations[].[].createdAtstring (date-time)required
    • operations[].[].completedAtstring | null (date-time)required
    • operations[].[].targetstring | null

      A snapshot id, or timestamp:<requested time>

    • operations[].[].initiatedBystring | null

      The verified principal that asked for it

    • usageobjectrequired
    • usage.windowDaysintegerrequired
    • usage.queriesinteger (int64)required
    • usage.computeMsinteger (int64)required
    • usage.storageBytesinteger | null (int64)required
    • callerobject

      Who Silos verified this call as from the gateway signature, checked on every read and write.

    • caller.organizationIdstring
    • caller.projectIdstring
    • caller.environmentstring
    • caller.principalstring
    • caller.verifiedBy"gateway-signature"
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance absent or outside the selected Genesis project
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Delete a database instance

DELETE/v1/silos/instances/{instance_id}

silos:writeTested with an API keysilos_deleteInstance

Removes the instance from the selected project and stops it. Its name is free again at once.

Parameters

  • instance_idpath · string (uuid)required

Responses

  • 204Deleted
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance absent or outside the selected Genesis project
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Rename a database instance

PATCH/v1/silos/instances/{instance_id}

silos:writeTested with an API keysilos_updateInstance

Parameters

  • instance_idpath · string (uuid)required

Request body application/json

  • namestringrequired

    min length 1 · max length 63 · pattern ^[a-z][a-z0-9_-]*$

Responses

  • 200Renamed instance
    Response fields
    • instanceobjectrequired
    • instance.idstring (uuid)required
    • instance.namestringrequired
    • instance.enginestringrequired

      Runtime engine, postgres-wasm (PostgreSQL compiled to WebAssembly).

    • instance.pgVersionstringrequired

      The PostgreSQL version the runtime engine reports (SHOW server_version), e.g. 17.5.

    • instance.statestringrequired
    • instance.regionstringrequired
    • instance.computeSizestringrequired
    • instance.storageBytesinteger | null (int64)required
    • instance.defaultBranchIdstring | null (uuid)required
    • instance.createdAtstring (date-time)required
    • instance.updatedAtstring (date-time)required
    • instance.lastActiveAtstring | null (date-time)

      The last statement that reached the instance.

    • instance.suspendedAtstring | null (date-time)

      When it last stopped: suspended by a call, or after the idle window.

    • instance.suspendAfterIdleSecondsinteger | null

      Idle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.

  • 400Invalid instance name
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance absent or outside the selected Genesis project
  • 409An instance already uses this name in this project
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'

Batch

Run up to 50 SQL statements in one transaction

POST/v1/silos/instances/{instance_id}/batch

silos:writeTested with an API keysilos_queryInstanceBatch

All statements commit together or none do. Runs once and is never replayed. Each statement is metered as one query. Up to 64 KiB.

Parameters

  • instance_idpath · string (uuid)required

Request body application/json

  • statementsobject[]required
  • statements[].[].sqlstringrequired

    min length 1

  • statements[].[].paramsany[]

    Positional parameters for $1, $2, …

  • branchIdstring (uuid)

    A branch of this instance; the default branch when absent.

  • idempotencyKeystring

    Runs the statement(s) at most once on this instance for this key (kept 7 days). A repeat answers 409 QUERY_ALREADY_RUN with the first run's receipt and runs nothing. The Idempotency-Key header is accepted too. pattern ^[A-Za-z0-9_.:-]{1,128}$

Responses

  • 200Committed results, one per statement
    Response fields
    • resultsobject[]
    • results[].[].rowsobject[]
    • results[].[].rowCountinteger
    • results[].[].affectedRowsinteger | null
    • results[].[].commandstring | null
    • statementCountinteger
    • durationMsnumber
    • committedboolean
    • queryIdstring (uuid)

      Receipt id of this run; its usage events carry the same id.

  • 400Empty statement, an invalid idempotency key, or a SQL error the statement caused: error.code SQL_ERROR with Postgres's message, plus sqlstate, severity and, when Postgres gives them, position, detail, hint (and statementIndex in a batch)
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance or branch absent, or outside the selected Genesis project
  • 409QUERY_ALREADY_RUN: this idempotency key already ran on this instance; receipt holds the first run (queryId, status completed or unknown, times). Nothing ran again.
  • 502The runtime is unavailable or failed for a server reason
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/batch" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "statements": [
      {
        "sql": "string"
      }
    ]
  }'

Branches

List the branches of a database instance

GET/v1/silos/instances/{instance_id}/branches

silos:readTested with an API keysilos_listInstanceBranches

Parameters

  • instance_idpath · string (uuid)required

Responses

  • 200Branches, default first
    Response fields
    • branchesobject[]required
    • branches[].[].idstring (uuid)required
    • branches[].[].namestringrequired
    • branches[].[].isDefaultbooleanrequired
    • branches[].[].parentBranchIdstring | null (uuid)required
    • branches[].[].statestringrequired
    • branches[].[].createdAtstring | null (date-time)required
    • branches[].[].updatedAtstring | null (date-time)required
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance or branch absent, or outside the selected Genesis project
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Create a branch from the current state of another branch

POST/v1/silos/instances/{instance_id}/branches

silos:writeTested with an API keysilos_createInstanceBranch

Copies the parent's latest checkpoint; the branch then changes on its own. Up to 25 live branches per instance.

Parameters

  • instance_idpath · string (uuid)required

Request body application/json

  • namestringrequired

    min length 1 · max length 63 · pattern ^[a-z][a-z0-9_-]*$

  • parentBranchIdstring (uuid)

    Defaults to the default branch.

Responses

  • 201Created branch
    Response fields
    • branchobjectrequired
    • branch.idstring (uuid)required
    • branch.namestringrequired
    • branch.isDefaultbooleanrequired
    • branch.parentBranchIdstring | null (uuid)required
    • branch.statestringrequired
    • branch.createdAtstring | null (date-time)required
    • branch.updatedAtstring | null (date-time)required
  • 400Invalid branch name
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance or branch absent, or outside the selected Genesis project
  • 409The name is taken in this instance, or the instance already has 25 branches
  • 502Silos runtime unavailable; no branch was created
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'

Get a branch

GET/v1/silos/instances/{instance_id}/branches/{branch_id}

silos:readTested with an API keysilos_getInstanceBranch

Parameters

  • instance_idpath · string (uuid)required
  • branch_idpath · string (uuid)required

Responses

  • 200Branch
    Response fields
    • branchobjectrequired
    • branch.idstring (uuid)required
    • branch.namestringrequired
    • branch.isDefaultbooleanrequired
    • branch.parentBranchIdstring | null (uuid)required
    • branch.statestringrequired
    • branch.createdAtstring | null (date-time)required
    • branch.updatedAtstring | null (date-time)required
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance or branch absent, or outside the selected Genesis project
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches/$BRANCH_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Delete a branch

DELETE/v1/silos/instances/{instance_id}/branches/{branch_id}

silos:writeTested with an API keysilos_deleteInstanceBranch

The default branch cannot be deleted; delete the instance instead.

Parameters

  • instance_idpath · string (uuid)required
  • branch_idpath · string (uuid)required

Responses

  • 204Deleted
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance or branch absent, or outside the selected Genesis project
  • 409The default branch cannot be deleted
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches/$BRANCH_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Rename a branch

PATCH/v1/silos/instances/{instance_id}/branches/{branch_id}

silos:writeTested with an API keysilos_updateInstanceBranch

Parameters

  • instance_idpath · string (uuid)required
  • branch_idpath · string (uuid)required

Request body application/json

  • namestringrequired

    min length 1 · max length 63 · pattern ^[a-z][a-z0-9_-]*$

Responses

  • 200Renamed branch
    Response fields
    • branchobjectrequired
    • branch.idstring (uuid)required
    • branch.namestringrequired
    • branch.isDefaultbooleanrequired
    • branch.parentBranchIdstring | null (uuid)required
    • branch.statestringrequired
    • branch.createdAtstring | null (date-time)required
    • branch.updatedAtstring | null (date-time)required
  • 400Invalid branch name
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance or branch absent, or outside the selected Genesis project
  • 409The name is taken in this instance
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches/$BRANCH_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'

Restore a branch from a stored snapshot

POST/v1/silos/instances/{instance_id}/branches/{branch_id}/restore

silos:writeTested with an API keysilos_restoreInstanceBranch

Replaces the branch's data with the snapshot. The instance stops without a checkpoint and starts from the snapshot on its next statement. The restore is recorded in the instance's operations.

Parameters

  • instance_idpath · string (uuid)required
  • branch_idpath · string (uuid)required

Request body application/json

  • snapshotIdstring

    A stored snapshot. Give this or timestamp. pattern ^[0-9]{1,20}$

  • sourceBranchIdstring (uuid)

    The branch the snapshot or history is read from; defaults to the restored branch.

  • timestampstring (date-time)

    Point-in-time restore: the branch returns to its newest saved state at or before this time (checkpoints are kept at least once a minute while the branch runs, and on every stop, for 7 days). Give this or snapshotId.

Responses

  • 200Completed restore
    Response fields
    • operationobjectrequired
    • operation.idstring (uuid)
    • operation.kindstring
    • operation.statusstring
    • operation.branchIdstring (uuid)
    • operation.snapshotIdstring
    • operation.timestampstring (date-time)
    • operation.restoredTostring | null (date-time)

      When the restored state was saved

    • operation.sourceBranchIdstring (uuid)
    • operation.initiatedBystring

      The verified principal that asked

  • 400Neither or both of snapshotId and timestamp, or an invalid or future timestamp
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance, branch or snapshot absent, no saved state at or before the timestamp, or outside the selected Genesis project
  • 409Another start, checkpoint, stop or restore of the instance ran past the 45 s wait; try again
  • 502Silos runtime unavailable
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches/$BRANCH_ID/restore" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '"string"'

Listen

Wait for PostgreSQL NOTIFY on one or more channels

POST/v1/silos/instances/{instance_id}/listen

silos:writeTested with an API keysilos_listenInstance

Waits up to waitMs (default 10000, at most 15000) and returns as soon as a notification arrives, or an empty list. Only notifications sent while the call waits are returned; call again to keep listening.

Parameters

  • instance_idpath · string (uuid)required

Request body application/json

  • channelsstring[]required
  • waitMsinteger

    min 0 · max 15000

  • branchIdstring (uuid)

    A branch of this instance; the default branch when absent.

Responses

  • 200Notifications received while waiting
    Response fields
    • notificationsobject[]required
    • notifications[].[].channelstringrequired
    • notifications[].[].payloadstringrequired
    • notifications[].[].receivedAtstring (date-time)required
  • 400No channels, an invalid channel name, or waitMs above 15000
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance or branch absent, or outside the selected Genesis project
  • 502Silos runtime unavailable
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/listen" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channels": [
      "string"
    ]
  }'

Metrics

Get live metrics for a database instance

GET/v1/silos/instances/{instance_id}/metrics

silos:readTested with an API keysilos_getInstanceMetrics

Parameters

  • instance_idpath · string (uuid)required

Responses

  • 200Instance metrics
    Response fields
    • metricsobjectrequired
    • metrics.instanceIdstring (uuid)required
    • metrics.runningbooleanrequired
    • metrics.state"hot" | "cold"required
    • metrics.storageBytesinteger | null (int64)required
    • metrics.lastActiveAtstring | null (date-time)required
    • metrics.suspendedAtstring | null (date-time)required
    • metrics.runtimeobject | nullrequired

      Live counters while the instance runs; null when it is suspended.

    • metrics.runtime.queryCountinteger
    • metrics.runtime.totalQueryTimeMsnumber
    • metrics.runtime.avgQueryTimeMsnumber
    • metrics.runtime.memoryUsedBytesinteger
    • metrics.runtime.uptimeMsinteger
    • metrics.runtime.lastQueryAtstring | null
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance absent or outside the selected Genesis project
  • 502Silos runtime unavailable
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/metrics" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Query

Run one SQL statement

POST/v1/silos/instances/{instance_id}/query

silos:writeTested with an API keysilos_queryInstance

Runs once and is never replayed. Each success is metered as one query plus its compute time. Up to 64 KiB.

Parameters

  • instance_idpath · string (uuid)required

Request body application/json

  • sqlstringrequired

    min length 1

  • paramsany[]

    Positional parameters for $1, $2, …

  • branchIdstring (uuid)

    A branch of this instance; the default branch when absent.

  • idempotencyKeystring

    Runs the statement(s) at most once on this instance for this key (kept 7 days). A repeat answers 409 QUERY_ALREADY_RUN with the first run's receipt and runs nothing. The Idempotency-Key header is accepted too. pattern ^[A-Za-z0-9_.:-]{1,128}$

Responses

  • 200Statement result
    Response fields
    • rowsobject[]
    • fieldsobject[]
    • fields[].[].namestring
    • fields[].[].dataTypeIDinteger
    • rowCountinteger
    • affectedRowsinteger | null
    • commandstring | null
    • durationMsnumber
    • queryIdstring (uuid)

      Receipt id of this run; its usage events carry the same id.

  • 400Empty statement, an invalid idempotency key, or a SQL error the statement caused: error.code SQL_ERROR with Postgres's message, plus sqlstate, severity and, when Postgres gives them, position, detail, hint (and statementIndex in a batch)
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance or branch absent, or outside the selected Genesis project
  • 409QUERY_ALREADY_RUN: this idempotency key already ran on this instance; receipt holds the first run (queryId, status completed or unknown, times). Nothing ran again.
  • 502The runtime is unavailable or failed for a server reason
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/query" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sql": "string"
  }'

Resume

Resume a database instance now

POST/v1/silos/instances/{instance_id}/resume

silos:writeTested with an API keysilos_resumeInstance

Starts the instance instead of waiting for its first statement. A query also starts a suspended instance on its own.

Parameters

  • instance_idpath · string (uuid)required

Responses

  • 200Running instance (state hot)
    Response fields
    • instanceobjectrequired
    • instance.idstring (uuid)required
    • instance.namestringrequired
    • instance.enginestringrequired

      Runtime engine, postgres-wasm (PostgreSQL compiled to WebAssembly).

    • instance.pgVersionstringrequired

      The PostgreSQL version the runtime engine reports (SHOW server_version), e.g. 17.5.

    • instance.statestringrequired
    • instance.regionstringrequired
    • instance.computeSizestringrequired
    • instance.storageBytesinteger | null (int64)required
    • instance.defaultBranchIdstring | null (uuid)required
    • instance.createdAtstring (date-time)required
    • instance.updatedAtstring (date-time)required
    • instance.lastActiveAtstring | null (date-time)

      The last statement that reached the instance.

    • instance.suspendedAtstring | null (date-time)

      When it last stopped: suspended by a call, or after the idle window.

    • instance.suspendAfterIdleSecondsinteger | null

      Idle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.

  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance absent or outside the selected Genesis project
  • 502Silos runtime unavailable
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/resume" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Snapshots

List stored snapshots of every branch of an instance

GET/v1/silos/instances/{instance_id}/snapshots

silos:readTested with an API keysilos_listInstanceSnapshots

Parameters

  • instance_idpath · string (uuid)required

Responses

  • 200Snapshots, newest first per branch
    Response fields
    • snapshotsobject[]required
    • snapshots[].[].idstringrequired

      Snapshot id (its creation time in milliseconds) pattern ^[0-9]{1,20}$

    • snapshots[].[].branchIdstring (uuid)required
    • snapshots[].[].sizeBytesinteger | null (int64)required
    • snapshots[].[].createdAtstring | null (date-time)required
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance or branch absent, or outside the selected Genesis project
  • 502Silos runtime unavailable
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/snapshots" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Checkpoint a branch and store the snapshot

POST/v1/silos/instances/{instance_id}/snapshots

silos:writeTested with an API keysilos_createInstanceSnapshot

Starts the branch first if it is not running.

Parameters

  • instance_idpath · string (uuid)required

Request body application/json

  • branchIdstring (uuid)

    Defaults to the default branch.

Responses

  • 201Stored snapshot
    Response fields
    • snapshotobjectrequired
    • snapshot.idstringrequired

      Snapshot id (its creation time in milliseconds) pattern ^[0-9]{1,20}$

    • snapshot.branchIdstring (uuid)required
    • snapshot.sizeBytesinteger | null (int64)required
    • snapshot.createdAtstring | null (date-time)required
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance or branch absent, or outside the selected Genesis project
  • 409Another branch of this instance is running; try again
  • 502Silos runtime unavailable
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/snapshots" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Suspend

Suspend a database instance (checkpoint, then stop)

POST/v1/silos/instances/{instance_id}/suspend

silos:writeTested with an API keysilos_suspendInstance

Parameters

  • instance_idpath · string (uuid)required

Responses

  • 200Suspended instance (state cold)
    Response fields
    • instanceobjectrequired
    • instance.idstring (uuid)required
    • instance.namestringrequired
    • instance.enginestringrequired

      Runtime engine, postgres-wasm (PostgreSQL compiled to WebAssembly).

    • instance.pgVersionstringrequired

      The PostgreSQL version the runtime engine reports (SHOW server_version), e.g. 17.5.

    • instance.statestringrequired
    • instance.regionstringrequired
    • instance.computeSizestringrequired
    • instance.storageBytesinteger | null (int64)required
    • instance.defaultBranchIdstring | null (uuid)required
    • instance.createdAtstring (date-time)required
    • instance.updatedAtstring (date-time)required
    • instance.lastActiveAtstring | null (date-time)

      The last statement that reached the instance.

    • instance.suspendedAtstring | null (date-time)

      When it last stopped: suspended by a call, or after the idle window.

    • instance.suspendAfterIdleSecondsinteger | null

      Idle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.

  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 404Instance absent or outside the selected Genesis project
  • 502Silos runtime unavailable
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/suspend" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Regions

List the regions Silos instances are created in

GET/v1/silos/regions

silos:readTested with an API keysilos_listRegions

Responses

  • 200Regions
    Response fields
    • regionsobject[]required
    • regions[].[].idstringrequired
    • regions[].[].providerstringrequired
    • regions[].[].locationstringrequired
    • regions[].[].defaultbooleanrequired
  • 401Verified One account identity required
  • 403Silos scope required
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/regions" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Usage

Silos usage of the selected Genesis project over the last 30 days

GET/v1/silos/usage

silos:readTested with an API keysilos_getUsage

Billable Silos meters (queries and compute time) per instance and in total, plus stored size. Deleted instances keep the usage they recorded.

Responses

  • 200Project usage
    Response fields
    • usageobjectrequired
    • usage.windowDaysintegerrequired
    • usage.queriesinteger (int64)required
    • usage.computeMsinteger (int64)required
    • usage.storageBytesinteger (int64)required
    • usage.instancesobject[]required
    • usage.instances[].[].instanceIdstring (uuid)required
    • usage.instances[].[].namestringrequired
    • usage.instances[].[].deletedbooleanrequired
    • usage.instances[].[].queriesinteger (int64)required
    • usage.instances[].[].computeMsinteger (int64)required
    • usage.instances[].[].storageBytesinteger | null (int64)required
    • callerobject

      Who Silos verified this call as from the gateway signature, checked on every read and write.

    • caller.organizationIdstring
    • caller.projectIdstring
    • caller.environmentstring
    • caller.principalstring
    • caller.verifiedBy"gateway-signature"
  • 401Verified One account identity required
  • 403Silos scope, or a signed Genesis project selection (genesis select), required
  • 503Silos unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/usage" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support