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

# [DEPRECATED] Marker

> **DEPRECATED**: Use the new endpoints instead:
- `/convert` for document conversion
- `/extract` for structured data extraction
- `/segment` for document segmentation
- `/custom-pipeline` for custom pipeline execution

This endpoint will be removed in a future version.



## OpenAPI

````yaml https://www.datalab.to/openapi.json post /api/v1/marker
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/marker:
    post:
      summary: '[DEPRECATED] Marker'
      description: |-
        **DEPRECATED**: Use the new endpoints instead:
        - `/convert` for document conversion
        - `/extract` for structured data extraction
        - `/segment` for document segmentation
        - `/custom-pipeline` for custom pipeline execution

        This endpoint will be removed in a future version.
      operationId: marker_api_v1_marker_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:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_marker_api_v1_marker_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'
      deprecated: true
      security:
        - APIKeyHeader: []
components:
  schemas:
    Body_marker_api_v1_marker_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.
        mode:
          type: string
          title: Mode
          description: >-
            Which output mode to use. Valid values: 'fast' (lowest latency,
            great for real-time use cases), 'balanced' (balanced accuracy and
            latency, works well with most documents), 'accurate' (highest
            accuracy and latency, good on the most complex documents).
          default: balanced
          choices:
            - fast
            - balanced
            - accurate
        max_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Pages
          description: The maximum number of pages in the PDF to convert.
        page_range:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Range
          description: >-
            The page range to parse, comma separated like 0,5-10,20. This will
            override max_pages if provided. Example: '0,2-4' will process pages
            0, 2, 3, and 4.
        langs:
          anyOf:
            - type: string
            - type: 'null'
          title: Langs
          description: >-
            Note: This parameter has been deprecated, and will be ignored in the
            current version.  The languages to use if OCR is needed, comma
            separated.  Must be either the names or codes from
            https://github.com/datalab-to/surya/blob/master/surya/languages.py. 
            Any other inputs will be ignored.
        force_ocr:
          type: boolean
          title: Force Ocr
          description: >-
            [DEPRECATED] This parameter is deprecated and has no effect. OCR is
            handled automatically by the parsing pipeline.
          default: false
          deprecated: true
        format_lines:
          type: boolean
          title: Format Lines
          description: >-
            [DEPRECATED] This parameter is deprecated and has no effect. Line
            formatting is handled automatically by the parsing pipeline.
          default: false
          deprecated: true
        paginate:
          type: boolean
          title: Paginate
          description: >-
            Whether to paginate the output.  Defaults to False.  If set to True,
            each page of the output will be separated by a horizontal rule that
            contains the page number (2 newlines, {PAGE_NUMBER}, 48 -
            characters, 2 newlines).
          default: false
        merge_cross_page:
          type: boolean
          title: Merge Cross Page
          description: >-
            Merge content that is split across pages back into single logical
            blocks: tables (long tables continued vertically, and wide tables
            printed as per-page column panels), paragraphs broken mid-sentence,
            and lists continued on the next page (continuation items keep the
            indent level of the list they belong to). Merged blocks carry a
            data-merged-pages attribute listing their source pages. Billed as a
            compute surcharge on the measured merge cost, like agent extraction.
          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
        disable_html_prettify:
          type: boolean
          title: Disable Html Prettify
          description: >-
            Disable pretty-printing of the HTML output. By default the HTML is
            indented with each tag on its own line, which browsers render as
            visible extra spaces around inline tags (e.g. '( 23 )' instead of
            '(23)'). Set to True to receive compact HTML that renders exactly as
            parsed. Only applies when output_format includes 'html'.
          default: false
        exact_transcription:
          type: boolean
          title: Exact Transcription
          description: >-
            Transcribe text exactly as printed, character for character. Typos,
            misspellings, abbreviations, capitalization, punctuation and number
            or date formats in the document are kept instead of being corrected
            or normalized. Recommended when the output must match the source
            exactly (regulated, medical or legal documents).
          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
        strip_existing_ocr:
          type: boolean
          title: Strip Existing Ocr
          description: >-
            [DEPRECATED] This parameter is deprecated and has no effect. OCR
            handling is managed automatically by the parsing pipeline.
          default: false
          deprecated: true
        disable_image_extraction:
          type: boolean
          title: Disable Image Extraction
          description: >-
            Disable image extraction from the PDF.  If use_llm is also set, then
            images will be automatically captioned.  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 or the
            img-description wrapper div. Defaults to False.
          default: false
        fence_synthetic_captions:
          type: boolean
          title: Fence Synthetic Captions
          description: >-
            Wrap synthetic image captions in markdown with HTML comment markers
            (<!-- BEGIN IMAGE CAPTION --> ... <!-- END IMAGE CAPTION -->) for
            easy identification/removal. Only applies to markdown output.
          default: false
        disable_ocr_math:
          type: boolean
          title: Disable Ocr Math
          description: >-
            [DEPRECATED] This parameter is deprecated and has no effect. Math
            recognition is handled automatically by the parsing pipeline.
          default: false
          deprecated: true
        use_llm:
          type: boolean
          title: Use Llm
          description: >-
            [DEPRECATED] This parameter is deprecated. Use the 'mode' parameter
            instead: 'balanced' or 'accurate' modes.
          default: false
          deprecated: true
        output_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Format
          description: >-
            The output format for the text.  Can be 'json', 'html', 'markdown',
            or 'chunks'.  Defaults to 'markdown'.  You can comma separate
            multiple formats, like `markdown,html`.
        token_efficient_markdown:
          type: boolean
          title: Token Efficient Markdown
          description: >-
            When enabled, the markdown output uses token-efficient formatting
            optimized for LLMs (compact tables with single-dash headers,
            single-space list indents).
          default: false
        skip_cache:
          type: boolean
          title: Skip Cache
          description: >-
            Skip the cache and re-run the inference.  Defaults to False.  If set
            to True, the cache will be skipped and the inference will be re-run.
          default: false
        save_checkpoint:
          type: boolean
          title: Save Checkpoint
          description: >-
            Save the checkpoint after processing.  Defaults to False.  This is
            only useful if you're applying custom rules iteratively.
          default: false
        block_correction_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Correction Prompt
          description: >-
            [DEPRECATED] This parameter is deprecated and has no effect. Block
            correction is not currently supported.
          deprecated: true
        page_schema:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Schema
          description: >-
            The schema to use for structured extraction (only used with
            structured extraction endpoint). The ideal way to generate this is
            to create a Pydantic schema, then convert to JSON with
            .model_dump_json().
        segmentation_schema:
          anyOf:
            - type: string
            - type: 'null'
          title: Segmentation Schema
          description: >-
            The schema to use for document segmentation. JSON object (passed as
            a string) with a 'segments' list of {name, description} objects and
            an optional 'segmentation_strategy' ('custom' to honor the provided
            segments, 'document_boundary' for automatic detection). Same format
            as the /segment endpoint's segmentation_schema.
        additional_config:
          anyOf:
            - type: string
            - type: 'null'
          title: Additional Config
          description: >-
            Additional configuration options as a JSON string. Only these keys
            have effect: 'keep_pageheader_in_output' (bool),
            'keep_pagefooter_in_output' (bool), 'keep_spreadsheet_formatting'
            (bool), 'disable_html_prettify' (bool).
        extras:
          anyOf:
            - type: string
            - type: 'null'
          title: Extras
          description: >-
            Comma-separated list of extra features to enable. Currently
            supports: 'track_changes', 'chart_understanding',
            'table_cell_bboxes' (per-cell bounding boxes for each table, instead
            of one box for the whole table; includes word bounding boxes),
            'list_item_bboxes' (per-item bounding boxes for each list or list
            group, instead of one box for the whole list; includes word bounding
            boxes), 'extract_links', 'extract_bookmarks' (PDF outline/bookmark
            tree in metadata.pdf_bookmarks; safety-limit truncation is reported
            by metadata.pdf_bookmarks_truncated), 'infographic',
            'new_block_types'.
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
          description: >-
            Optional webhook URL to call when the request is complete. If
            provided, this will override the webhook URL stored in your account
            settings for this specific request.
        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.
        pipeline_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Pipeline Id
          description: >-
            Optional custom pipeline ID. If provided, will execute the custom
            pipeline configuration associated with this ID.
        word_bboxes:
          type: boolean
          title: Word Bboxes
          description: >-
            When enabled, predict per-word bounding boxes with confidence scores
            for each page. Each word is inlined into the HTML output as a span
            carrying data-bbox and data-confidence attributes (markdown output
            strips these).
          default: false
        file:
          anyOf:
            - type: string
              contentMediaType: application/octet-stream
            - 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_marker_api_v1_marker_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.
        checkpoint_reused:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Checkpoint Reused
          description: >-
            True when this run automatically reused a checkpoint from a previous
            run of the same file, so the conversion step is not re-billed.
            Absent/None otherwise.
      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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

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