structuredExtractDocument

7 credits per call

Extract structured data from a document using AI-powered analysis. Define the output keys you want to extract (e.g., invoiceNumber, totalAmount, date) and the tool will automatically extract those fields from the document. These output keys can be used as inputs for other tools to enable tool chaining.

Try it

Open in playground
kirha tools run mistraldocuments_structuredExtractDocument \
  --input '{
    "documentUrl": "<documentUrl>",
    "outputKeys": [
      {
        "key": "<key>",
        "description": "<description>"
      }
    ]
  }'

Uses the key saved by kirha auth login.

  • documentUrlstring, required

    URL of the document to extract data from (supports PDF, PNG, JPEG, AVIF, PPTX, DOCX, max 50MB)

  • outputKeysobject[], required, At least 1 item

    List of fields to extract from the document with their descriptions (e.g., [{ key: 'invoiceNumber', description: 'The unique invoice reference number' }]). The descriptions help the AI understand what to extract.

    Show 2 fields
    • descriptionstring, required

      Description of what this field represents and how to extract it from the document

    • keystring, required

      The field name to extract from the document