Generated from the SDK route registry and public SDK types by
scripts/generate-play-sdk-reference.ts. Do not edit this file manually.scripts/generate-play-sdk-reference.ts. Do not edit this file manually.
Version And Coverage
Best Current Pattern
Strong runtime API references lead with base URL, auth, version/contract metadata, language examples, and exact generated route tables. Deepline follows that shape here: use the quick call flows first, then the generated route and type tables below for contract details.Quick Call Flow
POST /api/v2/plays/runwith a saved/prebuiltnameand JSONinput.- Read
workflowIdfrom the response. Treat it as the public run id. - Poll
GET /api/v2/runs/:runIdor streamGET /api/v2/runs/:runId/tail. - Stop when
statusiscompleted,failed, orcancelled. - Read final user output from
resultor the compactpackage.outputsobject.
Tool And Provider Call Flow
GET /api/v2/tools/search?q=...to discover ranked provider/tool candidates.GET /api/v2/integrations/:toolId/getto inspect input schema, pricing, extractors, and examples.POST /api/v2/integrations/:toolId/executewithpayloadto execute the provider-backed tool.- Read normalized data from
toolResponse.raw,extractedValues, andextractedLists. Do not expose provider spend; customer-visible billing is Deepline credits/USD only.
ctx.tools.execute(...) so calls are durable, idempotent, and recorded in run progress. From a regular SDK process, use Deepline.connect().tools.execute(...) or client.executeTool(...).
Authentication
Use the Deepline host plus a workspace API key from a trusted backend environment.Start A Named Or Prebuilt Play
Poll Status
completed, failed, and cancelled. queued, running, and waiting are non-terminal.
Stream Events
Stop A Run
Python Caller
This example is copied fromdocs-examples/sdk-v2/http-python/run_prebuilt.py and compiled by bun run docs:sdk-v2:check.
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 insrc/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, and extraction guidance before executing.
Fields
ToolSearchOptions
Query options for ranked tool/provider discovery.
Fields
ToolSearchResult
Ranked tool/provider discovery response.
Includes matching tools plus render/action hints used by the CLI and agents.
Fields
ToolExecution
Standard provider/tool execution envelope returned by low-level SDK calls.
toolResponse.raw contains the provider result. extractedValues and
extractedLists contain Deepline-normalized getters when the tool exposes
them. Billing fields are Deepline-facing and must not expose provider spend.
Fields
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.
Fields
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.
Fields
PlayStatus
Current status of a play execution, returned by DeeplineClient.getPlayStatus.
Poll this until status reaches a terminal state:
'completed' | 'failed' | 'cancelled'.
Fields
PlayRunPackage
Compact canonical package for an inspected play run.
This object is designed for SDK/CLI/API consumers that need stable run
metadata, output handles, and follow-up actions without reading dashboard
internals.
Fields
PlayRunListItem
Summary of a single play run, returned by DeeplineClient.listPlayRuns.
Fields
StopPlayRunResult
Result returned by DeeplineClient.stopPlay.
Fields
RunsNamespace
Public runs namespace exposed as client.runs.
This namespace mirrors the canonical /api/v2/runs resource family and is
the preferred low-level surface for polling, streaming, stopping, reading
logs, and exporting durable dataset rows.
Fields
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.