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

# Get Document Intelligence

> Retrieve the results of a document intelligence extraction job.

Retrieve the results of a document intelligence extraction job.

<Tip>
  The `results` object contains the extracted field values with the same keys you specified when creating the job. Values are automatically typed based on the field type (text, number, or date).
</Tip>


## OpenAPI

````yaml GET /document_intelligence/{id}
openapi: 3.0.0
info:
  title: Penbox API
  version: '1.0'
  description: >-
    The Penbox API provides programmatic access to Penbox's form management,
    case management, and document processing capabilities. Authenticate using
    Bearer tokens created at https://app.penbox.io/workspace/settings/api
servers:
  - url: https://connect.penbox.io/v1
    description: Production
  - url: https://connect.aiboov.com/v1
    description: Staging
security:
  - BearerAuth: []
paths:
  /document_intelligence/{id}:
    get:
      summary: Get Document Intelligence
      description: Retrieve the results of a document intelligence extraction job.
      operationId: get-document-intelligence
      parameters:
        - name: id
          in: path
          required: true
          description: Document intelligence job UUID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentIntelligence'
components:
  schemas:
    DocumentIntelligence:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Document intelligence job UUID
        created_at:
          type: string
          format: date-time
          description: Job creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
        attachments:
          type: array
          description: Array of processed documents
          items:
            type: object
            properties:
              name:
                type: string
                description: File name
              type:
                type: string
                description: MIME type
              id:
                type: string
                format: uuid
                description: Attachment UUID
        results:
          type: object
          description: >-
            Extraction results: the extracted fields, a validation assessment,
            and the detected document type.
          properties:
            fields:
              type: array
              description: Extracted fields. Each entry corresponds to a requested field.
              items:
                type: object
                properties:
                  key:
                    type: string
                    description: >-
                      Field key (as requested in the input, or derived from the
                      name)
                  name:
                    type: string
                    description: Field name
                  hint:
                    type: string
                    description: Extraction hint provided in the request, if any
                  type:
                    type: string
                    enum:
                      - text
                      - number
                      - date
                      - list
                    description: Field type
                  value:
                    description: >-
                      Extracted value. A string, number or date for scalar
                      fields, or an array of sub-fields when `type` is `list`.
                  confidence:
                    type: string
                    enum:
                      - high
                      - medium
                      - low
                    description: Model confidence in the extracted value
            validation:
              type: object
              description: Document-level validation assessment.
              properties:
                is_valid:
                  type: boolean
                  description: Whether the document is considered valid and exploitable
                is_blurry:
                  type: boolean
                  description: Whether the document image is too blurry to read reliably
                user_explanation:
                  type: string
                  description: Human-readable justification for the validation result
            document_type:
              type: string
              description: Detected document type
          example:
            fields:
              - key: firstname
                name: firstname
                type: text
                value: Jane
                confidence: high
              - key: lastname
                name: lastname
                type: text
                value: Doe
                confidence: high
              - key: number
                name: id card number
                type: text
                value: 000-0000000-00
                confidence: high
              - key: birthday
                name: date de naissance
                hint: DD MMM YYYY
                type: text
                value: 01 JAN 1990
                confidence: high
            validation:
              is_valid: true
              is_blurry: false
              user_explanation: >-
                All required fields were successfully extracted from the
                document.
            document_type: ID Card
        language:
          type: string
          description: Document language detected or specified
        level:
          type: string
          enum:
            - fast
            - advanced
          nullable: true
          description: >-
            The quality level this extraction ran at, and therefore the rate it
            was billed at per page ('fast' 3 credits per page, 'advanced' 6).
            Null for extractions created before levels existed.
        creator:
          type: object
          description: User who created the job
          properties:
            id:
              type: string
              format: uuid
            email:
              type: string
              format: email
        usage:
          type: object
          description: Token usage statistics for the AI processing
          properties:
            input:
              type: integer
              description: Number of input tokens (prompt tokens)
            output:
              type: integer
              description: Number of output tokens (candidate tokens)
            total:
              type: integer
              description: Total number of tokens used
            pages:
              type: integer
              description: Number of document pages processed
      required:
        - id
        - created_at
        - attachments
        - results
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: >-
        API token (starts with pnbx_). Create at
        https://app.penbox.io/workspace/settings/api. Include as: Authorization:
        Bearer {token}

````