---
title: "Execute a pipeline"
method: POST
path: "/v1/pipelines/execute"
---

# Execute a pipeline

`POST /v1/pipelines/execute`

Executes a specified pipeline. A pipeline allows you to chain multiple queries and materialized view refreshes together and execute them as a single unit.

## Query parameters

- `api_key` string

## Headers

- `X-Dune-Api-Key` string, required

## Request body

- ModelsExecutePipelineRequest
  - `pipeline` ModelsPipeline
    - `nodes` ModelsPipelineNode[] — List of nodes in the pipeline. Nodes are executed in dependency order.
      - `dependencies` integer[] — List of node IDs that this node depends on. Nodes are executed in dependency order.
      - `id` integer — Unique identifier of the node in the pipeline
      - `materialized_view_refresh` ModelsPipelineMaterializedViewRefreshNode
        - `name` string — Name of the materialized view to refresh
        - `performance` 'small' | 'medium' | 'large' — The performance engine tier the refresh will be run on. Can be `small`, `medium`, or `large`.
      - `query_execution` ModelsPipelineQueryExecutionNode
        - `performance` 'small' | 'medium' | 'large' — The performance engine tier the execution will be run on. Can be `small`, `medium`, or `large`.
        - `query_id` integer — Unique identifier of the query to execute
        - `query_parameters` object — SQL Query parameters in json key-value pairs. Each parameter is to be provided in key-value pairs. This enables you to execute a parameterized query with the provided values for your parameter keys.

## Response `200`

OK

- ModelsExecutePipelineResponse
  - `pipeline_execution_id` string — Unique identifier for the pipeline execution. Use this ID to check the status and retrieve results of the pipeline execution.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/dune/apis/duneapi.md) · [All operations](https://skmtc.dev/dune/apis/duneapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dune/duneapi/revisions/f3a7a865f95b/schema)
