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

# Extract Schema File Endpoint

> Schema extraction from a ``multipart/form-data`` upload (PHI-capable).



## OpenAPI

````yaml /openapi.json post /v1/extract/schema/file
openapi: 3.1.0
info:
  title: extract
  summary: Parse documents into structured data. Text, tables, and figures in one call.
  version: 0.1.0
servers:
  - url: https://api.extract.page
    description: production
security:
  - APIKeyHeader: []
paths:
  /v1/extract/schema/file:
    post:
      tags:
        - v1
      summary: Extract Schema File Endpoint
      description: Schema extraction from a ``multipart/form-data`` upload (PHI-capable).
      operationId: extract_schema_file_v1
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_extract_schema_file_v1'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaExtractResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Body_extract_schema_file_v1:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
          description: PDF, PPTX, or DOCX document.
        schema:
          anyOf:
            - type: string
            - type: 'null'
          title: Schema
          description: User JSON schema as a JSON string; omit when auto_schema=true.
        strict:
          type: boolean
          title: Strict
          default: true
        extract_images:
          type: boolean
          title: Extract Images
          default: true
        auto_schema:
          type: boolean
          title: Auto Schema
          default: false
      type: object
      required:
        - file
      title: Body_extract_schema_file_v1
    SchemaExtractResponse:
      properties:
        values:
          additionalProperties: true
          type: object
          title: Values
        evidence:
          additionalProperties:
            items:
              $ref: '#/components/schemas/FieldEvidence'
            type: array
          type: object
          title: Evidence
        ungrounded_fields:
          items:
            type: string
          type: array
          title: Ungrounded Fields
        page_count:
          type: integer
          title: Page Count
        generated_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Generated Schema
      type: object
      required:
        - values
        - evidence
        - page_count
      title: SchemaExtractResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FieldEvidence:
      properties:
        page:
          type: integer
          title: Page
        bbox:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: Bbox
        text:
          type: string
          title: Text
      type: object
      required:
        - page
        - text
      title: FieldEvidence
      description: One grounding citation for an extracted value.
    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

````