> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript SDK reference

> Find SDK methods by task, with signatures, parameters, return values, and examples.

Install with `npm install deepline`. Use the SDK from a TypeScript service or to author a Play.

## Start with a task

| Task | Guide |
| - | - |
| Run a saved or prebuilt Play | [Run Plays and view results](https://deepline.com/docs/sdk-v2/calling-plays.md) |
| Process a CSV | [Use a CSV as Play input](https://deepline.com/docs/sdk-v2/batch-csv.md) |
| Write a Play | [Build a Play](https://deepline.com/docs/sdk-v2/plays.md) |
| Handle a failed tool call | [Tool execution recovery](https://deepline.com/docs/sdk-v2/tool-execution-recovery.md) |
| Set up a production service | [Production integration](https://deepline.com/docs/sdk-v2/production-integration.md) |

## Method and type reference

> [accordion] Play configuration
>
> [Open play configuration](https://deepline.com/docs/sdk-v2/reference/authoring.md).
>
> * &#x20;[Durable call keys are
>   static](https://deepline.com/docs/sdk-v2/reference/authoring.md#durable-call-keys-are-static)
> * &#x20;[Durable HTTP
>   batches](https://deepline.com/docs/sdk-v2/reference/authoring.md#durable-http-batches)
> * [`deepline.run.id`](https://deepline.com/docs/sdk-v2/reference/authoring#deeplinerunid)
> * &#x20;[Runtime capabilities](https://deepline.com/docs/sdk-v2/reference/authoring.md#runtime-capabilities)

> [accordion] Runtime Entrypoints
>
> [Open runtime entrypoints](https://deepline.com/docs/sdk-v2/reference/entrypoints.md).
>
> * &#x20;[`Deepline`](https://deepline.com/docs/sdk-v2/reference/entrypoints#deepline)
> * &#x20;[`DeeplineContext`](https://deepline.com/docs/sdk-v2/reference/entrypoints#deeplinecontext)

> [accordion] Play Authoring And In-Play Runtime
>
> [Open play authoring and in-play runtime](https://deepline.com/docs/sdk-v2/reference/runtime.md).
>
> * &#x20;[`deepline`](https://deepline.com/docs/sdk-v2/reference/runtime#deepline)
> * &#x20;[`export const
>   config`](https://deepline.com/docs/sdk-v2/reference/runtime.md#export-const-config)
> * &#x20;[`deepline.csv(path,
>   options)`](https://deepline.com/docs/sdk-v2/reference/runtime.md#deeplinecsvpath-options)
> * &#x20;[`CsvOptions`](https://deepline.com/docs/sdk-v2/reference/runtime#csvoptions)
> * &#x20;[`deepline.dataset(key,
>   items)`](https://deepline.com/docs/sdk-v2/reference/runtime.md#deeplinedatasetkey-items)
> * [`.dataset(...).withColumn(name,
>   resolver).run(options)`](https://deepline.com/docs/sdk-v2/reference/runtime.md#datasetwithcolumnname-resolverrunoptions)
> * [`DatasetColumnRunInput`](https://deepline.com/docs/sdk-v2/reference/runtime#datasetcolumnruninput)
> * [`DatasetColumnDefinition`](https://deepline.com/docs/sdk-v2/reference/runtime#datasetcolumndefinition)
> * [`StepOptions`](https://deepline.com/docs/sdk-v2/reference/runtime#stepoptions)
> * [`PreviousCell`](https://deepline.com/docs/sdk-v2/reference/runtime#previouscell)
> * &#x20;[`deepline.step(id,
>   fn)`](https://deepline.com/docs/sdk-v2/reference/runtime.md#deeplinestepid-fn)
> * &#x20;[`deepline.runPlay(key,
>   playRef, input,
>   options)`](https://deepline.com/docs/sdk-v2/reference/runtime.md#deeplinerunplaykey-playref-input-options)
> * [`deepline.runPlayAsync(key, playRef, input,
>   options)`](https://deepline.com/docs/sdk-v2/reference/runtime.md#deeplinerunplayasynckey-playref-input-options)
> * [`AsyncPlayRunRef`](https://deepline.com/docs/sdk-v2/reference/runtime#asyncplayrunref)
> * [`deepline.tools.execute(request)`](https://deepline.com/docs/sdk-v2/reference/runtime#deeplinetoolsexecuterequest)
> * [`ToolExecutionRequest`](https://deepline.com/docs/sdk-v2/reference/runtime#toolexecutionrequest)
> * &#x20;[`deepline.fetch(key, url,
>   init)`](https://deepline.com/docs/sdk-v2/reference/runtime.md#deeplinefetchkey-url-init)
> * [`deepline.secrets.get(name)`](https://deepline.com/docs/sdk-v2/reference/runtime#deeplinesecretsgetname)
> * [`deepline.secrets.bearer(secret)`](https://deepline.com/docs/sdk-v2/reference/runtime#deeplinesecretsbearersecret)
> * [`deepline.secrets.header(header,
>   secret)`](https://deepline.com/docs/sdk-v2/reference/runtime.md#deeplinesecretsheaderheader-secret)
> * [`SecretAwareRequestInit`](https://deepline.com/docs/sdk-v2/reference/runtime#secretawarerequestinit)
> * [`PlayFetchResponse`](https://deepline.com/docs/sdk-v2/reference/runtime#playfetchresponse)
> * [`SecretHandle`](https://deepline.com/docs/sdk-v2/reference/runtime#secrethandle)
> * &#x20;[`SecretAuth`](https://deepline.com/docs/sdk-v2/reference/runtime#secretauth)
> * [`CtxFetchHttpError`](https://deepline.com/docs/sdk-v2/reference/runtime#ctxfetchhttperror)
> * [`deepline.billing.entitlements()`](https://deepline.com/docs/sdk-v2/reference/runtime#deeplinebillingentitlements)
> * [`deepline.runSteps(program, input,
>   options)`](https://deepline.com/docs/sdk-v2/reference/runtime.md#deeplinerunstepsprogram-input-options)
> * [`deepline.views.list()`](https://deepline.com/docs/sdk-v2/reference/runtime#deeplineviewslist)
> * [`PlayDataset`](https://deepline.com/docs/sdk-v2/reference/runtime#playdataset)
> * &#x20;[`ToolExecuteResult`](https://deepline.com/docs/sdk-v2/reference/runtime#toolexecuteresult)

> [accordion] Errors And Provider Fallthrough
>
> [Open errors and provider fallthrough](https://deepline.com/docs/sdk-v2/reference/errors.md).
>
> * [`DeeplineError`](https://deepline.com/docs/sdk-v2/reference/errors#deeplineerror)
> * [`ToolExecutionErrorOrigin`](https://deepline.com/docs/sdk-v2/reference/errors#toolexecutionerrororigin)
> * [`ToolExecutionErrorCategory`](https://deepline.com/docs/sdk-v2/reference/errors#toolexecutionerrorcategory)
> * [`ToolExecutionNetworkKind`](https://deepline.com/docs/sdk-v2/reference/errors#toolexecutionnetworkkind)
> * [`ToolExecutionNetworkScope`](https://deepline.com/docs/sdk-v2/reference/errors#toolexecutionnetworkscope)
> * [`ProviderTransientErrorCategory`](https://deepline.com/docs/sdk-v2/reference/errors#providertransienterrorcategory)
> * [`ToolExecutionPublicDetails`](https://deepline.com/docs/sdk-v2/reference/errors#toolexecutionpublicdetails)
> * [`ToolExecutionFailureV1`](https://deepline.com/docs/sdk-v2/reference/errors#toolexecutionfailurev1)
> * [`ToolExecutionErrorOptions`](https://deepline.com/docs/sdk-v2/reference/errors#toolexecutionerroroptions)
> * [`ToolUpstreamResponse`](https://deepline.com/docs/sdk-v2/reference/errors#toolupstreamresponse)
> * [`ToolExecutionError`](https://deepline.com/docs/sdk-v2/reference/errors#toolexecutionerror)
> * [`ProviderTransientError`](https://deepline.com/docs/sdk-v2/reference/errors#providertransienterror)
> * [`ProviderRejectionCode`](https://deepline.com/docs/sdk-v2/reference/errors#providerrejectioncode)
> * [`ProviderRejectedError`](https://deepline.com/docs/sdk-v2/reference/errors#providerrejectederror)
> * &#x20;[`AuthError`](https://deepline.com/docs/sdk-v2/reference/errors#autherror)
> * [`RateLimitError`](https://deepline.com/docs/sdk-v2/reference/errors#ratelimiterror)
> * [`ToolRateLimitError`](https://deepline.com/docs/sdk-v2/reference/errors#toolratelimiterror)
> * &#x20;[`ConfigError`](https://deepline.com/docs/sdk-v2/reference/errors#configerror)

> [accordion] Tool And Provider Calls
>
> [Open tool and provider calls](https://deepline.com/docs/sdk-v2/reference/tools.md).
>
> * &#x20;[`DeeplineContext.tools`](https://deepline.com/docs/sdk-v2/reference/tools#deeplinecontexttools)

> [accordion] Remote Plays And Runs
>
> [Open remote plays and runs](https://deepline.com/docs/sdk-v2/reference/plays.md).
>
> * [`DeeplineContext.plays`](https://deepline.com/docs/sdk-v2/reference/plays#deeplinecontextplays)
> * [`DeeplineNamedPlay`](https://deepline.com/docs/sdk-v2/reference/plays#deeplinenamedplay)
> * &#x20;[`PlayJob`](https://deepline.com/docs/sdk-v2/reference/plays#playjob)

[SDK client methods](https://deepline.com/docs/sdk-v2/client-reference.md) cover HTTP calls from services and scripts. [Run event fields](https://deepline.com/docs/sdk-v2/run-events.md) describe event search. [API reference](https://deepline.com/docs/api-reference.md) documents the HTTP endpoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.