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

# Extract Key Value

> This API endpoint extracts key-value pairs from the uploaded file and returns the content in json format.



## OpenAPI

````yaml POST /extract_key_value
openapi: 3.0.1
info:
  title: AnyParser RT API
  description: >-
    A real-time parser designed to extract content from various file formats,
    including PDFs and DOCX files.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://public-api.cambio-ai.com
security:
  - apiKeyAuth: []
paths:
  /extract_key_value:
    post:
      summary: Extract Key-value pairs from a file
      description: >-
        This API endpoint extracts key-value pairs from the uploaded file and
        returns the content in json format.
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          description: Your API key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                file_content:
                  type: string
                  description: The base64 encoded content of the file to be parsed.
                file_type:
                  type: string
                  description: The type of the file. Supported values are 'pdf' and 'docx'.
                  enum:
                    - pdf
                    - docx
                extract_args:
                  type: object
                  description: The key-value extraction instructions.
                  properties:
                    extract_instruction:
                      type: object
                      description: >-
                        Dictionary with the key as the names of the key to
                        extract, and the value being a description of that key.
                      additionalProperties:
                        type: string
                        description: A user-defined key name and description of the key.
                  required:
                    - extract_instruction
              required:
                - file_content
                - file_type
                - extract_args
      responses:
        '200':
          description: Key-value extracted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  json:
                    type: object
                    description: The extracted key-value pairs in json format.
                  pageCount:
                    type: integer
                    description: The number of pages processed.
        '429':
          description: Rate limit exceeded. Only 1 request per second is allowed.
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````