> ## 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 Custom Processor

> Execute a custom processor configuration. The pipeline_id must reference a completed custom processor ID or a template ID.



## OpenAPI

````yaml https://www.datalab.to/openapi.json post /api/v1/custom-processor
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/custom-processor:
    post:
      summary: Run Custom Processor
      description: >-
        Execute a custom processor configuration. The pipeline_id must reference
        a completed custom processor ID or a template ID.
      operationId: custom_pipeline_api_v1_custom_processor_post
      parameters:
        - 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:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_custom_pipeline_api_v1_custom_processor_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitialResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Body_custom_pipeline_api_v1_custom_processor_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.
        pipeline_id:
          type: string
          title: Pipeline Id
          description: >-
            The custom pipeline ID or template ID to execute. Must be a
            completed pipeline created via the custom pipeline API, or a valid
            template slug.
          dashboard:
            description: The ID or template ID of the custom pipeline to execute.
        version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version
          description: >-
            Optional version number to use. If not provided, the active version
            of the pipeline will be used.
        run_eval:
          type: boolean
          title: Run Eval
          description: Run evaluation rules defined for this custom pipeline.
          default: false
          dashboard: {}
        mode:
          type: string
          title: Mode
          description: Output mode for the underlying parsing step.
          default: fast
          choices:
            - fast
            - balanced
            - accurate
        max_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Pages
          description: The maximum number of pages to process.
        page_range:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Range
          description: The page range to process, comma separated like 0,5-10,20.
        output_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Format
          description: >-
            The output format. Can be 'json', 'html', 'markdown', or 'chunks'.
            Defaults to 'markdown'.
        paginate:
          type: boolean
          title: Paginate
          description: >-
            Whether to paginate the output. If set to True, each page of the
            output will be separated by a horizontal rule that contains the page
            number.
          default: false
        add_block_ids:
          type: boolean
          title: Add Block Ids
          description: >-
            Add data-block-id attributes to HTML elements for citation tracking.
            Only applies when output_format includes 'html'.
          default: false
        include_markdown_in_chunks:
          type: boolean
          title: Include Markdown In Chunks
          description: >-
            Include markdown field in chunks and JSON output. When enabled, each
            chunk will have a 'markdown' field with the markdown representation
            of that block. Only applies when output_format includes 'json' or
            'chunks'.
          default: false
        disable_image_extraction:
          type: boolean
          title: Disable Image Extraction
          description: Disable image extraction from the PDF. Defaults to False.
          default: false
        disable_image_captions:
          type: boolean
          title: Disable Image Captions
          description: >-
            Disable synthetic image captions/descriptions in output. Images will
            be rendered as plain img tags without alt text. Defaults to False.
          default: false
        skip_cache:
          type: boolean
          title: Skip Cache
          description: Skip the cache and re-run.
          default: false
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
          description: Optional webhook URL to call when the request is complete.
        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.
        workflowstepdata_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Workflowstepdata Id
          description: Optional workflow step data ID to associate with this request.
        model_override_settings:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Override Settings
        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
      required:
        - pipeline_id
      title: Body_custom_pipeline_api_v1_custom_processor_post
    InitialResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether the request was successful.
          default: true
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: >-
            If the request was not successful, this will contain an error
            message.
        request_id:
          type: string
          title: Request Id
          description: >-
            The ID of the request. This ID can be used to check the status of
            the request.
        request_check_url:
          type: string
          title: Request Check Url
          description: The URL to check the status of the request and get results.
        versions:
          anyOf:
            - additionalProperties: true
              type: object
            - type: string
            - type: 'null'
          title: Versions
          description: A dictionary of the versions of the libraries used in the request.
      type: object
      required:
        - request_id
        - request_check_url
      title: InitialResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````