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

# Run Pipeline

> Execute a pipeline on a file, creating an execution DAG with per-step tracking and billing.



## OpenAPI

````yaml https://www.datalab.to/openapi.json post /api/v1/pipelines/{pipeline_id}/run
openapi: 3.1.0
info:
  title: Datalab API
  version: 0.0.1
servers:
  - url: https://www.datalab.to
    description: Datalab API
security: []
paths:
  /api/v1/pipelines/{pipeline_id}/run:
    post:
      tags:
        - pipelines
      summary: Run Pipeline
      description: >-
        Execute a pipeline on a file, creating an execution DAG with per-step
        tracking and billing.
      operationId: run_pipeline_api_v1_pipelines__pipeline_id__run_post
      parameters:
        - name: pipeline_id
          in: path
          required: true
          schema:
            type: string
            title: Pipeline Id
        - name: wos-session
          in: cookie
          required: false
          schema:
            type: string
            title: Wos-Session
        - name: datalab_active_team
          in: cookie
          required: false
          schema:
            type: string
            title: Datalab Active Team
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_run_pipeline_api_v1_pipelines__pipeline_id__run_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineExecutionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Body_run_pipeline_api_v1_pipelines__pipeline_id__run_post:
      properties:
        file_url:
          anyOf:
            - type: string
            - type: 'null'
          title: File Url
          description: >-
            Optional file URL (http/https). If provided, the server will
            download and process it.
        page_range:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Range
          description: Page range to process, e.g. '0,2-4'.
        output_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Format
          description: 'Output format: json, html, markdown, or chunks.'
        run_evals:
          type: boolean
          title: Run Evals
          description: Whether to run evaluation steps.
          default: false
        skip_cache:
          type: boolean
          title: Skip Cache
          description: Skip the executor cache and re-run all steps.
          default: false
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
          description: URL to POST when the execution completes.
        processing_location:
          anyOf:
            - type: string
            - type: 'null'
          title: Processing Location
          description: >-
            Optional residency region override (e.g. us, eu). When provided, use
            file_url or direct-upload; multipart uploads are rejected. When
            omitted, the request uses the team's configured residency and
            profile.
        version:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Version
          description: >-
            Pipeline version to execute. 0 = use draft steps. Omit to use the
            active published version (or draft if unpublished).
        file:
          anyOf:
            - type: string
              format: binary
            - type: 'null'
          title: File
          description: >-
            Input PDF, word document, powerpoint, or image file, uploaded as
            multipart form data.  Images must be png, jpg, or webp format.
      type: object
      title: Body_run_pipeline_api_v1_pipelines__pipeline_id__run_post
    PipelineExecutionResponse:
      properties:
        execution_id:
          type: string
          title: Execution Id
        pipeline_id:
          type: string
          title: Pipeline Id
        pipeline_version:
          type: integer
          title: Pipeline Version
        status:
          type: string
          title: Status
        steps:
          items:
            $ref: '#/components/schemas/PipelineExecutionStepResponse'
          type: array
          title: Steps
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        created:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created
        config_snapshot:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config Snapshot
        input_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input Config
        rate_breakdown:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Rate Breakdown
      type: object
      required:
        - execution_id
        - pipeline_id
        - pipeline_version
        - status
        - steps
      title: PipelineExecutionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PipelineExecutionStepResponse:
      properties:
        step_index:
          type: integer
          title: Step Index
        step_type:
          type: string
          title: Step Type
        status:
          type: string
          title: Status
        lookup_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Lookup Key
        result_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Result Url
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        finished_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finished At
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        source_step_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Step Type
        checkpoint_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Checkpoint Id
      type: object
      required:
        - step_index
        - step_type
        - status
      title: PipelineExecutionStepResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````