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

# Run Parse

> Parse a document into Markdown and elements, each with its page and position. Send a `file` or a `file_url`, with `config` or a saved `config_id`. A parse costs 1 credit per page. By default, the call waits for the job to end. With `async: true`, it returns `202` at once. Read the result at `GET /parse/{parse_id}/result`. Uploads are limited to 100 MB, so send a larger PDF or TIFF by `file_url`. The result's `failed_pages` lists any page that couldn't be parsed.



## OpenAPI

````yaml /api-reference/v2/openapi.yml post /parse
openapi: 3.1.0
info:
  title: Pulse API
  description: >-
    Agentic document infrastructure for the enterprise. The Pulse API turns
    complex documents into AI-ready data, such as Markdown, structured JSON and
    bounding boxes.
  version: '2'
servers:
  - url: https://api.runpulse.com
    description: Default Pulse API base URL
security: []
tags:
  - name: Parse
    description: Parse a document's text, tables and figures.
  - name: Batch parse
    description: Parse many documents with one config.
  - name: Extract
    description: Extract structured data from a parsed document.
  - name: Split
    description: Find each topic's pages in a parsed document.
  - name: Tables
    description: Merge a parsed document's tables across pages.
  - name: Charts
    description: Read the charts in a parsed document.
  - name: Classify
    description: Sort a document into the categories you define.
  - name: Pipeline
    description: Run a parse and its follow-on steps as one job.
  - name: Usage
    description: Check the pages and credits your organization has used.
  - name: Webhook
    description: Get notified when your organization's jobs change status.
  - name: Organization settings
    description: Read and change your organization's name, address and default API version.
paths:
  /parse:
    post:
      tags:
        - Parse
      summary: Run Parse
      description: >-
        Parse a document into Markdown and elements, each with its page and
        position. Send a `file` or a `file_url`, with `config` or a saved
        `config_id`. A parse costs 1 credit per page. By default, the call waits
        for the job to end. With `async: true`, it returns `202` at once. Read
        the result at `GET /parse/{parse_id}/result`. Uploads are limited to 100
        MB, so send a larger PDF or TIFF by `file_url`. The result's
        `failed_pages` lists any page that couldn't be parsed.
      operationId: parseDocument
      parameters:
        - name: Pulse-Version
          in: header
          required: false
          schema:
            type: string
            default: '2'
            title: Pulse-Version
          examples:
            default:
              value: '2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: A document to parse, and the options to parse it with.
              title: ParseRequest
              oneOf:
                - title: Inline config
                  additionalProperties: false
                  type: object
                  properties:
                    async:
                      default: false
                      description: >-
                        Set to `true` to return `202` at once instead of
                        waiting.
                      title: Async
                      type: boolean
                    file_url:
                      description: >-
                        The document's URL: a public `http(s)` URL, a public
                        `s3://` or `gs://` object, or an upload URL Pulse
                        issued.
                      minLength: 1
                      title: File Url
                      type: string
                    config:
                      $ref: '#/components/schemas/ParseConfig'
                      description: This request's options.
                  required:
                    - file_url
                    - config
                - title: Saved config
                  additionalProperties: false
                  type: object
                  properties:
                    async:
                      default: false
                      description: >-
                        Set to `true` to return `202` at once instead of
                        waiting.
                      title: Async
                      type: boolean
                    file_url:
                      description: >-
                        The document's URL: a public `http(s)` URL, a public
                        `s3://` or `gs://` object, or an upload URL Pulse
                        issued.
                      minLength: 1
                      title: File Url
                      type: string
                    config_id:
                      description: A saved config's id, sent in place of `config`.
                      title: Config Id
                      type: string
                  required:
                    - file_url
                    - config_id
          multipart/form-data:
            schema:
              oneOf:
                - title: Inline config
                  type: object
                  properties:
                    async:
                      default: false
                      description: >-
                        Set to `true` to return `202` at once instead of
                        waiting.
                      title: Async
                      type: boolean
                    file:
                      type: string
                      format: binary
                    config:
                      $ref: '#/components/schemas/ParseConfig'
                      description: This request's options.
                  required:
                    - file
                    - config
                - title: Saved config
                  type: object
                  properties:
                    async:
                      default: false
                      description: >-
                        Set to `true` to return `202` at once instead of
                        waiting.
                      title: Async
                      type: boolean
                    file:
                      type: string
                      format: binary
                    config_id:
                      description: A saved config's id, sent in place of `config`.
                      title: Config Id
                      type: string
                  required:
                    - file
                    - config_id
            encoding:
              async:
                contentType: application/json
              config:
                contentType: application/json
      responses:
        '200':
          description: >-
            The parse completed. Read its result at `GET
            /parse/{parse_id}/result`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParseSyncResponse'
        '202':
          description: >-
            The parse started (`async: true`); poll `GET /parse/{parse_id}`
            until it ends.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParseAsyncResponse'
        '400':
          description: >-
            The request is invalid
            ([`REQUEST_INVALID`](https://docs.runpulse.com/errors/request-invalid)):
            an unknown field or query parameter, a value of the wrong type or
            listed twice, both or neither of `file` and `file_url` or of
            `config` and `config_id`, a rule a field states broken (such as
            `folder_id` with `save: false`). A `page_range` is malformed, past
            the document's last page, or selects only hidden sheets
            ([`PAGE_RANGE_INVALID`](https://docs.runpulse.com/errors/page-range-invalid)).
            A `file_url` has no scheme or one other than `http`, `https`, `s3`
            or `gs`; is an `s3://` or `gs://` link that is malformed, names a
            bucket or folder rather than a file, or points at Pulse storage
            Pulse can't read for you; or is an `http` or `https` link that isn't
            public or safe to fetch, or a link into Pulse's own storage that
            Pulse didn't issue
            ([`FILE_URL_INVALID`](https://docs.runpulse.com/errors/file-url-invalid)).
            `Pulse-Version` names a version this API doesn't serve
            ([`UNSUPPORTED_VERSION`](https://docs.runpulse.com/errors/unsupported-version)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - REQUEST_INVALID
            - PAGE_RANGE_INVALID
            - FILE_URL_INVALID
            - UNSUPPORTED_VERSION
        '401':
          description: >-
            No valid API key was sent
            ([`CREDENTIALS_INVALID`](https://docs.runpulse.com/errors/credentials-invalid)),
            or the key is inactive
            ([`API_KEY_INACTIVE`](https://docs.runpulse.com/errors/api-key-inactive)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - CREDENTIALS_INVALID
            - API_KEY_INACTIVE
        '402':
          description: >-
            Your organization's billing blocks the request: payment is required
            ([`PAYMENT_REQUIRED`](https://docs.runpulse.com/errors/payment-required)),
            a payment failed
            ([`PAYMENT_FAILED`](https://docs.runpulse.com/errors/payment-failed))
            or needs authentication
            ([`PAYMENT_AUTHENTICATION_REQUIRED`](https://docs.runpulse.com/errors/payment-authentication-required)),
            the subscription is past due
            ([`SUBSCRIPTION_PAST_DUE`](https://docs.runpulse.com/errors/subscription-past-due))
            or canceled
            ([`SUBSCRIPTION_CANCELED`](https://docs.runpulse.com/errors/subscription-canceled)),
            the trial has expired
            ([`TRIAL_EXPIRED`](https://docs.runpulse.com/errors/trial-expired)),
            your organization or the API key has reached its credit limit
            ([`CREDIT_LIMIT_EXCEEDED`](https://docs.runpulse.com/errors/credit-limit-exceeded)),
            your plan's pages are used up
            ([`PLAN_LIMIT_REACHED`](https://docs.runpulse.com/errors/plan-limit-reached)),
            or a free-plan organization sent `save: false`
            ([`PLAN_UPGRADE_REQUIRED`](https://docs.runpulse.com/errors/plan-upgrade-required)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - PAYMENT_REQUIRED
            - PAYMENT_FAILED
            - PAYMENT_AUTHENTICATION_REQUIRED
            - SUBSCRIPTION_PAST_DUE
            - SUBSCRIPTION_CANCELED
            - TRIAL_EXPIRED
            - CREDIT_LIMIT_EXCEEDED
            - PLAN_LIMIT_REACHED
            - PLAN_UPGRADE_REQUIRED
        '403':
          description: >-
            The account is suspended
            ([`ACCOUNT_SUSPENDED`](https://docs.runpulse.com/errors/account-suspended));
            or an `s3://` or `gs://` `file_url` is in Pulse's storage but
            outside your organization's files, or is a TIFF outside a
            self-hosted install's own bucket
            ([`PERMISSION_DENIED`](https://docs.runpulse.com/errors/permission-denied)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - ACCOUNT_SUSPENDED
            - PERMISSION_DENIED
        '404':
          description: >-
            `config_id` names no `/parse` config your organization saved
            ([`RESOURCE_NOT_FOUND`](https://docs.runpulse.com/errors/resource-not-found);
            `errors` names the field). No endpoint answers this path
            ([`ROUTE_NOT_FOUND`](https://docs.runpulse.com/errors/route-not-found)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - RESOURCE_NOT_FOUND
            - ROUTE_NOT_FOUND
        '409':
          description: >-
            Without `async`, the parse was canceled (`DELETE /parse/{parse_id}`)
            before it ended
            ([`JOB_ALREADY_ENDED`](https://docs.runpulse.com/errors/job-already-ended)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - JOB_ALREADY_ENDED
        '413':
          description: >-
            The document is too large
            ([`FILE_TOO_LARGE`](https://docs.runpulse.com/errors/file-too-large)):
            an uploaded PDF or multi-page TIFF over 100 MB, or on Pulse's hosted
            API another document over 100 MB that can't be processed in parts.
            Or a multipart text part is over 10 MB
            ([`FIELD_TOO_LARGE`](https://docs.runpulse.com/errors/field-too-large)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - FILE_TOO_LARGE
            - FIELD_TOO_LARGE
        '415':
          description: >-
            An unsupported file type
            ([`FILE_TYPE_UNSUPPORTED`](https://docs.runpulse.com/errors/file-type-unsupported)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - FILE_TYPE_UNSUPPORTED
        '422':
          description: >-
            A file that can't be read
            ([`FILE_CORRUPT`](https://docs.runpulse.com/errors/file-corrupt));
            an empty file
            ([`FILE_EMPTY`](https://docs.runpulse.com/errors/file-empty)); a
            `file_url` that couldn't be downloaded
            ([`FILE_DOWNLOAD_FAILED`](https://docs.runpulse.com/errors/file-download-failed)),
            such as an object that can't be read publicly, a link that leads to
            a Google, Microsoft or AWS sign-in page (`reason`:
            `sign_in_required`), or a share link from a service such as Google
            Drive, Dropbox, Box, OneDrive or SharePoint that opens a page for
            viewing the file rather than the file itself (`viewer_page`), or a
            link into your Pulse storage that names no file (`not_found`); a PDF
            with active content that can't be removed
            ([`FILE_UNSAFE`](https://docs.runpulse.com/errors/file-unsafe)); or
            a workbook whose contents can't be read
            ([`DOCUMENT_UNPROCESSABLE`](https://docs.runpulse.com/errors/document-unprocessable)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - FILE_CORRUPT
            - FILE_EMPTY
            - FILE_DOWNLOAD_FAILED
            - FILE_UNSAFE
            - DOCUMENT_UNPROCESSABLE
        '500':
          description: >-
            The document couldn't be processed
            ([`PROCESSING_FAILED`](https://docs.runpulse.com/errors/processing-failed));
            or an unexpected error occurred
            ([`SERVER_ERROR`](https://docs.runpulse.com/errors/server-error)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - PROCESSING_FAILED
            - SERVER_ERROR
        '503':
          description: >-
            A service the request needs was unavailable for a moment, or an
            `async` job couldn't be started
            ([`SERVICE_UNAVAILABLE`](https://docs.runpulse.com/errors/service-unavailable));
            retry. Processing is at capacity
            ([`CAPACITY_EXCEEDED`](https://docs.runpulse.com/errors/capacity-exceeded)),
            so the parse was canceled; retry after the seconds in `Retry-After`.
            On a self-hosted install, its licence is invalid or expired
            ([`LICENSE_INVALID`](https://docs.runpulse.com/errors/license-invalid))
            or not yet activated
            ([`LICENSE_NOT_ACTIVATED`](https://docs.runpulse.com/errors/license-not-activated)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: string
          x-pulse-errors:
            - SERVICE_UNAVAILABLE
            - CAPACITY_EXCEEDED
            - LICENSE_INVALID
            - LICENSE_NOT_ACTIVATED
        '504':
          description: >-
            Downloading the `file_url` timed out
            ([`FILE_DOWNLOAD_TIMEOUT`](https://docs.runpulse.com/errors/file-download-timeout)).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              description: The request's id; the problem's `request_id`.
              schema:
                type: string
          x-pulse-errors:
            - FILE_DOWNLOAD_TIMEOUT
      security:
        - ApiKey: []
components:
  schemas:
    ParseConfig:
      additionalProperties: false
      description: The options for a parse.
      properties:
        model:
          description: The model to parse with.
          enum:
            - ultra-2
          title: Model
          type: string
        storage:
          $ref: '#/components/schemas/Storage'
          description: Whether the result is saved, and where.
        page_range:
          description: >-
            The pages to parse, listed as numbers and ranges from 1, such as
            `1-3, 6, 8-end` (`end` is the last page). Defaults to every page. A
            spreadsheet's pages are its sheets, hidden ones included.
          pattern: ^ *[0-9]+ *(- *([0-9]+|end) *)?(, *[0-9]+ *(- *([0-9]+|end) *)?)*$
          title: Page Range
          type: string
        prompt:
          description: Extra instructions for reading the document, added to Pulse's own.
          minLength: 1
          title: Prompt
          type: string
        extensions:
          $ref: '#/components/schemas/Extensions'
          default:
            additional_formats: []
            footnotes: false
            document_metadata: false
            word_level_bounding_boxes: false
            chunking:
              strategies: []
          description: Extra outputs to add to the result.
        enhancements:
          $ref: '#/components/schemas/Enhancements'
          default:
            detect: []
            figures:
              describe: []
              include: false
              prompt: null
            refine:
              modes: []
            spreadsheet:
              cell_formatting: false
              include_hidden: []
              raw_values: false
              trim_empty: []
      required:
        - model
      title: ParseConfig { model, storage, page_range, 3 more }
      type: object
    ParseSyncResponse:
      properties:
        parse_id:
          type: string
          title: Parse Id
          description: The parse's id, `parse-<uuid>`.
        created_at:
          type: string
          title: Created At
          description: When the job was created.
        completed_at:
          type: string
          title: Completed At
          description: When the job ended.
        expires_at:
          type: string
          title: Expires At
          description: >-
            When the result will be deleted. Absent when the result is kept with
            no expiry.
      additionalProperties: false
      type: object
      required:
        - parse_id
        - created_at
        - completed_at
      title: ParseSyncResponse
      description: A completed parse. Read its result at `GET /parse/{parse_id}/result`.
    ParseAsyncResponse:
      properties:
        parse_id:
          type: string
          title: Parse Id
          description: The parse's id, `parse-<uuid>`.
        created_at:
          type: string
          title: Created At
          description: When the job was created.
      additionalProperties: false
      type: object
      required:
        - parse_id
        - created_at
      title: ParseAsyncResponse
      description: A parse that has started. Check `GET /parse/{parse_id}` until it ends.
    Problem:
      additionalProperties: false
      description: >-
        Why the request or the job failed. Branch on `code`; quote `request_id`
        to support.
      properties:
        type:
          description: 'This code''s page: what it means and what to do.'
          title: Type
          type: string
        title:
          description: A short summary of the code, the same for every occurrence.
          title: Title
          type: string
        status:
          description: The HTTP status the code answers with.
          title: Status
          type: integer
        detail:
          description: What happened this time.
          title: Detail
          type: string
        instance:
          description: 'This occurrence: the request''s URN, `urn:pulse:request:<id>`.'
          title: Instance
          type: string
        code:
          description: The stable error code, e.g. `REQUEST_INVALID`. Branch on it.
          title: Code
          type: string
        request_id:
          description: >-
            The request that failed, as `X-Request-Id` named it; for a failed
            job, the request that created it. Quote it to support.
          title: Request Id
          type: string
        retryable:
          description: Whether the same request may succeed if sent again.
          title: Retryable
          type: boolean
        retry_after:
          description: Seconds to wait before retrying, as `Retry-After` says.
          title: Retry After
          type: integer
        errors:
          description: Each refused part of the request.
          items:
            $ref: '#/components/schemas/FieldIssue'
          title: Errors
          type: array
        resource:
          description: 'What wasn''t found: `job`, `batch`, `webhook`, `config`, …'
          title: Resource
          type: string
        reason:
          description: The cause within the code.
          title: Reason
          type: string
        parse_id:
          description: The parse the request recorded.
          title: Parse Id
          type: string
        extract_id:
          description: The extraction it recorded.
          title: Extract Id
          type: string
        split_id:
          description: The split it recorded.
          title: Split Id
          type: string
        classify_id:
          description: The classification it recorded.
          title: Classify Id
          type: string
        tables_id:
          description: The tables job it recorded.
          title: Tables Id
          type: string
        charts_id:
          description: The charts job it recorded.
          title: Charts Id
          type: string
        pipeline_id:
          description: The pipeline it recorded.
          title: Pipeline Id
          type: string
        batch_id:
          description: The batch it recorded.
          title: Batch Id
          type: string
        filename:
          description: The file refused.
          title: Filename
          type: string
        declared_type:
          description: The type its name declared.
          title: Declared Type
          type: string
        detected:
          description: The type its contents are.
          title: Detected
          type: string
        supported_types:
          description: The types accepted.
          items:
            type: string
          title: Supported Types
          type: array
        supported:
          description: The values accepted.
          items:
            type: string
          title: Supported
          type: array
        max_size_mb:
          anyOf:
            - type: integer
            - type: number
          description: The largest size accepted.
          title: Max Size Mb
        file_size_mb:
          anyOf:
            - type: integer
            - type: number
          description: The file's size.
          title: File Size Mb
        plan_name:
          description: Your organization's plan.
          title: Plan Name
          type: string
        pages_used:
          anyOf:
            - type: integer
            - type: number
          description: Pages used this period.
          title: Pages Used
        page_allowance:
          anyOf:
            - type: integer
            - type: number
          description: Pages the plan allows.
          title: Page Allowance
        upgrade_url:
          description: Where to change your plan.
          title: Upgrade Url
          type: string
        action_required:
          description: What to do to continue.
          title: Action Required
          type: string
        billing_info:
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          description: Your organization's billing state, as the gate read it.
          title: Billing Info
          type: object
      required:
        - type
        - title
        - status
        - code
        - retryable
      title: Problem
      type: object
    Storage:
      additionalProperties: false
      description: >-
        Whether the result is saved to your organization's Pulse dashboard, and
        in which folder.
      properties:
        save:
          description: >-
            `true` saves the result, and `false` keeps it only until
            `expires_at`, 24 hours by default. If omitted, it's saved unless
            your organization turned saving off, which also overrides `true`.
            Free plans can't send `false`.
          title: Save
          type: boolean
        folder_id:
          description: >-
            The dashboard folder to save the result in. Sending it saves the
            result, so it's refused with `save: false`. Another organization's
            folder is ignored.
          minLength: 1
          title: Folder Id
          type: string
      title: Storage { save, folder_id }
      type: object
    Extensions:
      additionalProperties: false
      description: >-
        Extra outputs to add to the result, each under the result's
        `extensions`.
      properties:
        additional_formats:
          default: []
          description: >-
            Other formats to return the document in, under
            `extensions.additional_formats`. Choose from `html` (the Markdown as
            HTML), `xml` (the elements, by page) and `tagged_md` (the Markdown
            with element ids).
          items:
            enum:
              - html
              - xml
              - tagged_md
            type: string
          title: Additional Formats
          type: array
        footnotes:
          default: false
          description: >-
            Set to `true` to find the document's footnotes and link each one to
            the elements that cite it, in `extensions.footnotes`.
          title: Footnotes
          type: boolean
        document_metadata:
          default: false
          description: >-
            Set to `true` to return the metadata the file carries, such as its
            title, authors or a PDF's form fields, in
            `extensions.document_metadata`.
          title: Document Metadata
          type: boolean
        word_level_bounding_boxes:
          default: false
          description: >-
            Set to `true` to return every word with its outline, as `Word`
            elements in `extensions.word_level_bounding_boxes`. This option must
            be enabled for your organization.
          title: Word Level Bounding Boxes
          type: boolean
        chunking:
          $ref: '#/components/schemas/Chunking'
          default:
            strategies: []
      title: Extensions { additional_formats, footnotes, document_metadata, 2 more }
      type: object
    Enhancements:
      additionalProperties: false
      description: Optional passes that add to the parse or correct it.
      properties:
        detect:
          default: []
          description: >-
            Send `["selections"]` to detect checkboxes, radio buttons and
            similar controls, and mark each ticked one `selected: true`.
          items:
            const: selections
            type: string
          title: Detect
          type: array
        figures:
          $ref: '#/components/schemas/Figures'
          default:
            describe: []
            include: false
            prompt: null
          description: Descriptions and images of the document's figures.
        refine:
          $ref: '#/components/schemas/Refine'
          default:
            modes: []
          description: Passes that correct the parse.
        spreadsheet:
          $ref: '#/components/schemas/Spreadsheet'
          default:
            include_hidden: []
            trim_empty: []
            raw_values: false
            cell_formatting: false
          description: Options for spreadsheets.
      title: Enhancements { detect, figures, refine, 1 more }
      type: object
    FieldIssue:
      additionalProperties: false
      description: One refused part of the request.
      properties:
        field:
          description: >-
            The part as sent: a body field's path
            (`config.enhancements.detect[1]`), or `query.<name>` /
            `header.<name>`.
          title: Field
          type: string
        pointer:
          description: >-
            A body field as a JSON Pointer (RFC 6901), e.g.
            `#/config/enhancements/detect/1`. Absent for a query parameter or
            header.
          title: Pointer
          type: string
        issue:
          description: What is wrong with it.
          title: Issue
          type: string
      required:
        - field
        - issue
      title: FieldIssue
      type: object
    JsonValue: {}
    Chunking:
      additionalProperties: false
      properties:
        strategies:
          default: []
          items:
            $ref: '#/components/schemas/SemanticStrategy'
          title: Strategies
          type: array
      title: Chunking
      type: object
    Figures:
      additionalProperties: false
      description: >-
        What to return for the document's figures: its charts, diagrams, photos
        and other pictures.
      properties:
        describe:
          default: []
          description: >-
            Send `["all"]` to describe every figure in its `description`. A
            figure that can't be described gets none, with a
            `FIGURE_DESCRIPTIONS_SKIPPED` warning on the result.
          items:
            const: all
            type: string
          title: Describe
          type: array
        include:
          default: false
          description: >-
            Set to `true` to return each figure's image, base64-encoded, in its
            `figure_base64`.
          title: Include
          type: boolean
        prompt:
          description: >-
            Extra instructions for the figure descriptions. Used only with
            `describe`.
          minLength: 1
          title: Prompt
          type: string
      title: Figures { describe, include, prompt }
      type: object
    Refine:
      additionalProperties: false
      description: Passes that check the parse against the page images and correct it.
      properties:
        modes:
          default: []
          description: >-
            The passes to run, each mode at most once. A page they can't correct
            is returned as parsed, with a `REFINE_SKIPPED` warning on the
            result.
          items:
            $ref: '#/components/schemas/RefineMode'
          title: Modes
          type: array
      title: Refine
      type: object
    Spreadsheet:
      additionalProperties: false
      description: Options for spreadsheets. Other documents ignore them.
      properties:
        include_hidden:
          default: []
          description: >-
            The hidden `rows`, `columns` or `sheets` to read. By default, hidden
            parts are skipped.
          items:
            enum:
              - rows
              - columns
              - sheets
            type: string
          title: Include Hidden
          type: array
        trim_empty:
          default: []
          description: >-
            Send `rows`, `columns` or both to drop empty but formatted ones past
            a sheet's last value. Some exported workbooks carry thousands of
            them. Kept cells keep their addresses. Applies to `.xlsx` and
            `.xlsm` files only.
          items:
            enum:
              - rows
              - columns
            type: string
          title: Trim Empty
          type: array
        raw_values:
          default: false
          description: >-
            Set to `true` to add each cell's underlying value as its
            `raw_value`, such as `1201.67` where `content` shows `$1,202`.
          title: Raw Values
          type: boolean
        cell_formatting:
          default: false
          description: >-
            Set to `true` to add each cell's formatting (font, fill, borders and
            alignment) as its `style`.
          title: Cell Formatting
          type: boolean
      title: Spreadsheet { include_hidden, trim_empty, raw_values, 1 more }
      type: object
    SemanticStrategy:
      additionalProperties: false
      description: >-
        Chunks cut where the meaning of neighboring sentences drifts apart. A
        chunk longer than

        `max_characters` is cut again. Without `max_characters`, chunk length
        has no cap.
      properties:
        strategy:
          const: semantic
          title: Strategy
          type: string
        max_characters:
          maximum: 100000
          minimum: 20
          title: Max Characters
          type: integer
      required:
        - strategy
      title: SemanticStrategy { strategy, max_characters }
      type: object
    RefineMode:
      additionalProperties: false
      description: >-
        One pass that checks the parsed content against the page images and
        corrects it.
      properties:
        mode:
          description: >-
            `tables` fixes cells and structure. `formatting` fixes bold,
            headings, lists and math, not words. `text` fixes misread words and
            numbers, not formatting. `layout` fixes a figure or table read as
            the wrong kind.
          enum:
            - tables
            - formatting
            - text
            - layout
          title: Mode
          type: string
        prompt:
          description: >-
            Extra instructions for this pass. A prompt sent with `layout` is
            refused (`REQUEST_INVALID`).
          minLength: 1
          title: Prompt
          type: string
      required:
        - mode
      title: RefineMode { mode, prompt }
      type: object
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````

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