Skip to Content
🚀 Welcome to Ikalas documentation! Discover our complete API and AI functions.
ExamplesExample: Document Analysis with AI

Example: Document Analysis with AI

This example shows you how to use the Ikalas document analysis API to extract and analyze content from your documents.

Features

  • Document Analysis: Automatic extraction and summarization
  • Customizable Prompts: Ask specific questions about your documents
  • Multilingual Support: Analysis in French, English and other languages
  • Secure Processing: Your documents are processed securely

Prerequisites

  • A valid Ikalas API key

Code Example

const axios = require('axios'); const FormData = require('form-data'); const fs = require('fs'); let data = new FormData(); data.append('file', fs.createReadStream('/Users/ikalas/samples/test-medical-report.pdf')); data.append('prompt', 'resume'); let config = { method: 'post', maxBodyLength: Infinity, url: 'https://ikalas.com/api/v1/ask-document', headers: { 'accept': 'application/json', 'apikey': 'YOUR_API_KEY_HERE', ...data.getHeaders() }, data : data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });

API Parameters

ParameterTypeDescriptionRequired
fileFileThe document to analyze✅
promptStringThe question or instruction for analysis✅
apikeyStringYour Ikalas API key✅

Prompt Examples

Here are some examples of prompts you can use:

  • "resume" - Generates a summary of the document
  • "What are the key points?" - Extracts important points
  • "Analyze the risks mentioned" - Identifies risks in the document
  • "Translate to English" - Translates the content
  • "Extract important dates" - Identifies key dates

API Response

{ "success": true, "id": "wor-700b29048f", "date": "2025-08-11T10:11:58+00:00", "typeOutput": "markup", "result": "YOUR RESULT DISPLAYS HERE", "__meta": {}, "creditsUser": 23, "uuidLogFunction": "b0f066e6-aa5d-4a5e-9c6f-e0e53ec133fa", "ika_conversationId": "98ddc758-70e6-48bf-9310-c30a9231d88e" }

Error Handling

Here are the steps to resolve common issues:

1. Verify Your API Key

Make sure your API key is valid and active in your Ikalas account. You can verify your API key in the dashboard 

2. Check File Size

Accepted sizes depend on your subscription. See details on the pricing  page

Common Use Cases

  • Medical Report Analysis: Extraction of diagnoses and recommendations
  • Contract Analysis: Identification of important clauses
  • Financial Report Analysis: Extraction of key financial data
  • Document Translation: Automatic content translation
  • Long Document Summarization: Automatic summary generation

Support

If you encounter difficulties:

  1. Complete Documentation: Consult our API documentation 
  2. Technical Support: Contact us via contact@ikalas.com
Last updated on