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

# client.pipelines.import()

> Import a pipeline into a project.

Send an exported pipeline document containing `name` and `graph`, up to 2 MiB. Returns the new pipeline. Returns 400 for an invalid graph or a reference to a secret missing from the project.

## Signature

Method signature on `client.pipelines`:

```ts theme={null}
import(args: {
  projectId: string;
  name: string;
  graph: PipelineGraphV1;
}): Promise<Pipeline>;
```

## Parameters

**projectId** `string` *required*

Project ID with prefix `pp.`.

**name** `string` *required*

Name of the pipeline.

**graph** `PipelineGraphV1` *required*

Pipeline graph in version 1 of the public graph format.

**Fields**

**version** `1` *required*

Graph format version; always 1.

**fields** `object[]` *required*

Fields used by the pipeline, with names and JSON Schemas.

See the [HTTP endpoint](https://docs.platform.toloka.ai/docs/api-reference/pipelines/import-pipeline.md) for the complete schema.

**nodes** `(RootNode | CodeNode | GenerationNode | MatchNode | QuorumNode)[]` *required*

Nodes that make up the pipeline.

See the [HTTP endpoint](https://docs.platform.toloka.ai/docs/api-reference/pipelines/import-pipeline.md) for the complete schema.

**connections** `object[]` *required*

Directed connections between node handles.

See the [HTTP endpoint](https://docs.platform.toloka.ai/docs/api-reference/pipelines/import-pipeline.md) for the complete schema.

**layout** `object`

Optional node positions for the visual editor, keyed by node ID and block group; each position is an \[x, y] pair.

**Fields**

**\[key: string]** `object`

## Returns

`Promise<Pipeline>`

A pipeline within a project.

**id** `PipelineId` *required*

Pipeline ID with prefix `pl.`.

**projectId** `ProjectId` *required*

Project ID with prefix `pp.`.

**name** `string` *required*

Name of the pipeline.

**version** `number` *required*

Pipeline version number; copying a pipeline increments the source version.

**createdAt** `string` *required*

Time the pipeline was created, as an ISO 8601 timestamp.

**updatedAt** `string` *required*

Time the pipeline was last updated, as an ISO 8601 timestamp.

## Errors

HTTP errors throw [`PotatoApiError`](https://docs.platform.toloka.ai/docs/sdk/errors). The endpoint documents these error responses:

| Status | Description |
| - | - |
| 400 | Pipeline graph is too large, invalid, or references secrets missing from the project |
| 403 | Trial limit reached. An account that has not completed identity or business verification may hold one project and one pipeline, and cannot start a run. The body message reads "Your trial allows a single pipeline. Verify your account to unlock full access." Complete verification in the web app to lift the limit. |
| 404 | Project not found |
| 429 | Rate limit exceeded |

HTTP endpoint: [`POST /projects/{projectId}/pipelines/import`](https://docs.platform.toloka.ai/docs/api-reference/pipelines/import-pipeline).

```ts import() theme={null}
import { createClient } from "@toloka-platform/sdk";

const client = createClient({
  baseUrl: "https://platform.toloka.ai",
  apiKey: process.env.TOLOKA_API_KEY!,
});

const snapshot = await client.pipelines.getGraph({ pipelineId: "pl.019a0000-0000-7000-8000-000000000001" });

const pipeline = await client.pipelines.import({
  projectId: "pp.019a0000-0000-7000-8000-000000000001",
  name: "Imported pipeline",
  graph: snapshot.graph
});
console.log(pipeline);
```

```json import() theme={null}
{
  "id": "pl.019a0000-0000-7000-8000-000000000001",
  "projectId": "pp.019a0000-0000-7000-8000-000000000001",
  "name": "<string>",
  "version": 0,
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z"
}
```


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