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

# Upload Parse Result

> Ingest a pre-computed parse result directly without creating a job.

This endpoint allows direct ingestion of parse results from external tools
while storing them in a dedicated parse_results table for better performance
and indexing.

Args:
    request: Parse result creation request with source document ID and result payload
    storage_gateway: Storage gateway for uploading content to object store

Returns:
    ParseResultEntity representing the stored parse result

Raises:
    HTTPException: If the source document is not found or other errors occur



## OpenAPI

````yaml https://dex.sgp.scale.com/openapi.json post /v1/projects/{project_id}/parse/upload-result
openapi: 3.1.0
info:
  title: Document Understanding API
  description: API for uploading and processing documents
  version: 0.4.5
servers: []
security:
  - ApiKey: []
    AccountId: []
tags:
  - name: Projects
    description: Operations related to project creation and management
  - name: Files
    description: Operations related to file upload and access
  - name: Parse
    description: Operations related to starting parse jobs and accessing their results
  - name: Vector Stores
    description: Operations related to vector store creation and management
  - name: Extract
    description: Operations related to starting extract jobs and accessing their results
  - name: Research
    description: Dex Research agent kickoff and results.
  - name: Jobs
    description: Operations related to monitoring jobs and their status
paths:
  /v1/projects/{project_id}/parse/upload-result:
    post:
      tags:
        - Parse
      summary: Upload Parse Result
      description: >-
        Ingest a pre-computed parse result directly without creating a job.


        This endpoint allows direct ingestion of parse results from external
        tools

        while storing them in a dedicated parse_results table for better
        performance

        and indexing.


        Args:
            request: Parse result creation request with source document ID and result payload
            storage_gateway: Storage gateway for uploading content to object store

        Returns:
            ParseResultEntity representing the stored parse result

        Raises:
            HTTPException: If the source document is not found or other errors occur
      operationId: upload_parse_result_v1_projects__project_id__parse_upload_result_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomParseResultRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParseResultEntity'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CustomParseResultRequest:
      properties:
        content:
          $ref: '#/components/schemas/ParseResultContent-Input'
          description: Array of chunks from parsing
        object:
          type: string
          const: parse_result
          title: Object
          default: parse_result
        source_document_id:
          type: string
          title: Source Document Id
          description: Source document ID that was parsed
        engine:
          type: string
          title: Engine
          description: Engine used for parsing
        parse_metadata:
          $ref: '#/components/schemas/ParseResultMetadata'
          description: Parse result metadata
        vector_store_metadata:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - type: boolean
              type: object
            - type: 'null'
          title: Vector Store Metadata
          description: >-
            Metadata to populate into the vector store to filter on when
            searching
        parameters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parameters
          description: Parameters used during parsing
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message if parsing had issues
        processing_time_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Processing Time Ms
          description: Processing time in milliseconds
      type: object
      required:
        - content
        - source_document_id
        - engine
        - parse_metadata
      title: CustomParseResultRequest
      description: Entity for custom parse results.
    ParseResultEntity:
      properties:
        content:
          anyOf:
            - $ref: '#/components/schemas/ParseResultContent-Output'
            - type: 'null'
          description: Parsed files, returned only if requested
        object:
          type: string
          const: parse_result
          title: Object
          default: parse_result
        source_document_id:
          type: string
          title: Source Document Id
          description: Source document ID that was parsed
        engine:
          type: string
          title: Engine
          description: Engine used for parsing
        parse_metadata:
          $ref: '#/components/schemas/ParseResultMetadata'
          description: Parse result metadata
        vector_store_metadata:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - type: boolean
              type: object
            - type: 'null'
          title: Vector Store Metadata
          description: >-
            Metadata to populate into the vector store to filter on when
            searching
        parameters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parameters
          description: Parameters used during parsing
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message if parsing had issues
        processing_time_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Processing Time Ms
          description: Processing time in milliseconds
        id:
          type: string
          title: Id
          description: ID of the entity
        project_id:
          type: string
          title: Project Id
          description: ID of the project
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the parse result was created
      type: object
      required:
        - source_document_id
        - engine
        - parse_metadata
        - id
        - project_id
        - created_at
      title: ParseResultEntity
      description: Parse result response model representing a completed parse operation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ParseResultContent-Input:
      properties:
        chunks:
          items:
            $ref: '#/components/schemas/ParseChunk-Input'
          type: array
          title: Chunks
          description: Array of chunks from parsing
      type: object
      required:
        - chunks
      title: ParseResultContent
      description: Content for a parse result.
    ParseResultMetadata:
      properties:
        source_id:
          type: string
          title: Source Id
          description: Source file ID
        filename:
          type: string
          title: Filename
          description: Original filename
        pages_processed:
          type: integer
          title: Pages Processed
          description: Number of pages actually processed
      type: object
      required:
        - source_id
        - filename
        - pages_processed
      title: ParseResultMetadata
      description: Metadata for a parse result.
    ParseResultContent-Output:
      properties:
        chunks:
          items:
            $ref: '#/components/schemas/ParseChunk-Output'
          type: array
          title: Chunks
          description: Array of chunks from parsing
      type: object
      required:
        - chunks
      title: ParseResultContent
      description: Content for a parse result.
    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
    ParseChunk-Input:
      properties:
        content:
          type: string
          title: Content
          description: The actual content (text, HTML, etc.)
        blocks:
          items:
            $ref: '#/components/schemas/ParseBlock'
          type: array
          title: Blocks
          description: Blocks within this chunk
      type: object
      required:
        - content
        - blocks
      title: ParseChunk
      description: A chunk containing one or more blocks.
    ParseChunk-Output:
      properties:
        content:
          type: string
          title: Content
          description: The actual content (text, HTML, etc.)
        blocks:
          items:
            $ref: '#/components/schemas/ParseBlock'
          type: array
          title: Blocks
          description: Blocks within this chunk
      type: object
      required:
        - content
        - blocks
      title: ParseChunk
      description: A chunk containing one or more blocks.
    ParseBlock:
      properties:
        type:
          type: string
          title: Type
          description: Block type (text, table, figure, header, etc.)
        content:
          type: string
          title: Content
          description: The actual content (text, HTML, etc.)
        bbox:
          $ref: '#/components/schemas/BoundingBox'
          description: Bounding box locations for this block
        confidence:
          type: number
          title: Confidence
          description: Confidence score (0-1)
        page_number:
          type: integer
          title: Page Number
          description: Page number on the document
          default: 0
      type: object
      required:
        - type
        - content
        - bbox
        - confidence
      title: ParseBlock
      description: A block of content from parsing with location information.
    BoundingBox:
      properties:
        left:
          type: number
          title: Left
          description: Left coordinate
        top:
          type: number
          title: Top
          description: Top coordinate
        width:
          type: number
          title: Width
          description: Width
        height:
          type: number
          title: Height
          description: Height
      type: object
      required:
        - left
        - top
        - width
        - height
      title: BoundingBox
      description: Bounding box information for location in document.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication
    AccountId:
      type: apiKey
      in: header
      name: x-selected-account-id
      description: Selected Account ID

````