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

# Synchronous Extraction

> Extract structured data from a document image or PDF synchronously.



## OpenAPI

````yaml POST /v1/extract
openapi: 3.1.0
info:
  title: Kiriku API
  description: >-
    Intelligent Document Processing API for West Africa. Extract structured data
    from ID cards, passports, and more.
  version: 1.0.0
  contact:
    email: contact@kiriku.sn
servers:
  - url: https://api.kiriku.app
    description: Production API
security:
  - bearerAuth: []
paths:
  /v1/extract:
    post:
      summary: Extract Data (Synchronous)
      description: Extract structured data from a document image or PDF synchronously.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The document file (JPEG, PNG, WEBP, PDF). Max 10MB.
                fileBack:
                  type: string
                  format: binary
                  description: Optional back side of the document.
                documentType:
                  type: string
                  description: Slug of the template to use (e.g. 'cni-senegal') or 'auto'.
                fraudCheck:
                  type: boolean
                  default: false
                returnConfidence:
                  type: boolean
                  default: false
                returnRawText:
                  type: boolean
                  default: false
              required:
                - file
                - documentType
      responses:
        '200':
          description: Successful extraction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractionResult'
components:
  schemas:
    ExtractionResult:
      type: object
      properties:
        referenceId:
          type: string
        status:
          type: string
          enum:
            - completed
            - failed
        documentType:
          type: string
        result:
          type: object
          properties:
            extractedData:
              type: object
            globalConfidence:
              type: number
        creditsUsed:
          type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT/API Key

````