Skip to main content
Generated from the SDK route registry and public SDK types by scripts/generate-play-sdk-reference.ts. Do not edit this file manually.
Generated from SDK source comments and type declarations by scripts/generate-play-sdk-reference.ts. Do not edit this file manually. Field tables cover current authoring. The SDK retains deprecated compatibility properties, but these tables omit them.

Version And Coverage

Quick Call Flow

Submit a saved or prebuilt name and JSON input to POST /api/v2/plays/run. Save run.id and URL-encode it for endpoint paths. Poll GET /api/v2/runs/:runId or stream /tail until run.status is completed, failed, or cancelled. Read final outputs from the compact package and dataset rows through their paginated endpoints.

Tool And Provider Call Flow

  1. GET /api/v2/tools/search?q=... to discover ranked provider/tool candidates.
  2. GET /api/v2/integrations/:toolId/get to inspect input schema, pricing, extractors, and examples.
  3. POST /api/v2/integrations/:toolId/execute with payload to execute the provider-backed tool.
  4. Read normalized values from declared extractedValues and extractedLists getters. For provider-specific fields, inspect the complete parsed and scrubbed response at toolResponse.rawV2 before selecting a nested path. Do not expose provider spend. Customer billing shows only Deepline credits or USD.
Inside a play, prefer ctx.tools.execute(...) so calls are durable, at-least-once, and recorded in run progress. From a regular SDK process, use Deepline.connect().tools.execute(...) or client.executeTool(...).

Authentication

Use a workspace API key from a trusted backend. Every request requires Authorization: Bearer <DEEPLINE_API_KEY>.

Start A Named Or Prebuilt Play

Representative launch response excerpt:

Poll Status

Save the launch response as launch.json. Encode the run ID before interpolating it into a path:
The default response is the compact package: use run.status and outputs. With explicit ?full=true, the detail wrapper uses top-level status, result, and nested package.run.status / package.outputs.

Stream Events

The stream emits a canonical run snapshot first, then incremental play events until the connection closes or the run reaches terminal state.

Stop A Run

Python Caller

Source: docs-examples/sdk-v2/http-python/run_prebuilt.py

Generated Route Tables

Runtime Health

Tool And Provider Calls

Customer Data

Play Runs

Play Definitions

Play Artifacts

Management And CLI

Recent Compatible API Changes

These entries come from the compatible SDK/API change ledger and explain additive changes that did not require an SDK API-contract bump. Each change lives in apps/deepline-api/src/lib/sdk/compatible-changes/ so concurrent PRs do not edit a shared ledger file.

Public Types

ToolDefinition

Summary definition of a callable provider-backed tool. Returned by DeeplineClient.listTools and ranked tool search. Use getTool(toolId) or the matching HTTP describe route for provider-specific schema, examples, pricing, extraction guidance, and execution metadata.

ToolSearchOptions

Query options for ranked tool/provider discovery.

ToolSearchResult

Ranked tool/provider discovery response. Includes matching tools plus render/action hints used by the CLI and agents.

ToolExecution

Standard provider/tool execution envelope returned by low-level SDK calls. toolResponse.rawV2 contains the complete scrubbed provider response. extractedValues and extractedLists contain Deepline-normalized getters when the tool exposes them. Billing fields are Deepline-facing and must not expose provider spend.

ExecutionRecovery

Durable state returned for a keyed tool execution.

ExecutionByKeyResult

Durable lookup result for a keyed tool execution.

StartPlayRunRequest

Request body for starting a play run via DeeplineClient.startPlayRun. Internal/advanced request shape for low-level submission primitives. Most callers should prefer deepline plays run, DeeplineClient.runPlay, or Deepline.connect. Either name (for live plays) or artifactStorageKey (for packaged ad hoc runs) is required.

PlayRunStart

Response from starting a play run. Internal/advanced payload returned by low-level play submission primitives. Most callers should prefer deepline plays run, DeeplineClient.runPlay, or PlayJob.get.

PlayStatus

Current status of a play execution, returned by DeeplineClient.getPlayStatus. Poll this until status reaches a terminal state: 'completed' | 'failed' | 'cancelled'.

PlayRunPackage

Compact canonical run package for SDK/CLI consumers: stable metadata, output handles and follow-up actions without dashboard internals.

PlayRunListItem

Summary of a single play run, returned by DeeplineClient.listPlayRuns.

StopPlayRunResult

Result returned by DeeplineClient.stopPlay.

RunsNamespace

Use client.runs to watch, stop, query logs/events, and export durable dataset rows.

CustomerDbQueryResult

Result returned by DeeplineClient.db.query. Rows are intentionally untyped because the schema depends on the caller’s SQL query and selected customer tables.