Skip to main content

Documentation Index

Fetch the complete documentation index at: https://libretto.sh/docs/llms.txt

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

Use the sessions API to create and close hosted browser sessions directly.
All routes on this page require x-api-key.

POST /v1/sessions/create

Start a hosted browser session. Request fields:
  • timeout_seconds: optional session timeout, default 3600, max 7200
Response fields:
  • success
  • session_id
  • cdp_url
  • live_view_url
  • recording_url
Example:
curl -X POST "https://api.libretto.sh/v1/sessions/create" \
  -H "x-api-key: $LIBRETTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "json": {
      "timeout_seconds": 1800
    }
  }'

POST /v1/sessions/close

Close a hosted browser session by provider session id. Request fields:
  • session_id: session id returned from sessions/create
Response fields:
  • success
  • message
  • replay_url
Example:
curl -X POST "https://api.libretto.sh/v1/sessions/close" \
  -H "x-api-key: $LIBRETTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "json": {
      "session_id": "<session-id>"
    }
  }'

Libretto Cloud API overview

See the shared request format.

Jobs and Logs

Run workflows and inspect results.

Deployments and Workflows

Deploy workflows before invoking them.