API Documentation

CV Parser & OCR Services

CV Parser API Reference
Use this API endpoint to integrate CV parsing into your applications

CV Parser API Endpoint

POST

Request Format

Method: POST

Content-Type: multipart/form-data

Parameters:

  • file (required) - PDF file to parse
  • model (required) - LLM model name (e.g., "llama3.1:latest")

Example Usage

JavaScriptcv-parser.js
const formData = new FormData();formData.append('file', pdfFile);formData.append('model', 'llama3.1:latest');const response = await fetch('', {  method: 'POST',  body: formData});const result = await response.json();console.log(result);

Response Format

JSONcv-response.json
{  "success": true,  "data": {    "cv": {      "personalInfo": {        "firstName": "John",        "lastName": "Doe",        "fullName": "John Doe",        "email": "john.doe@example.com",        "phone": "+1-234-567-8900",        "location": "San Francisco, CA",        "linkedin": "https://linkedin.com/in/johndoe",        "github": "https://github.com/johndoe"      },      "summary": "Experienced software engineer with 5+ years...",      "experience": [        {          "company": "Tech Corp",          "position": "Senior Software Engineer",          "startDate": "2020-01",          "endDate": "2023-12",          "current": false,          "location": "San Francisco, CA",          "description": "Led development of...",          "achievements": ["Improved performance by 40%", "Led team of 5"]        }      ],      "education": [        {          "institution": "University of Technology",          "degree": "Bachelor of Computer Science",          "field": "Computer Science",          "startDate": "2016-09",          "endDate": "2020-05",          "gpa": "3.8"        }      ],      "skills": {        "technical": ["JavaScript", "Python", "React", "Node.js"],        "languages": ["English", "Spanish"],        "certifications": ["AWS Certified Developer"]      },      "projects": [        {          "name": "E-commerce Platform",          "description": "Full-stack e-commerce solution",          "technologies": ["React", "Node.js", "MongoDB"],          "url": "https://github.com/johndoe/ecommerce"        }      ]    },    "document": {      "filename": "john_doe_cv.pdf",      "pageCount": 2,      "processingMethod": "text-extraction",      "processingTime": 2500,      "confidence": 95.5    },    "rawText": "John Doe\nSoftware Engineer\n...",    "processingInfo": {      "ocrService": "http://localhost:8080",      "documentType": "CV",      "confidence": 95.5,      "cvRelevanceScore": 0.92,      "cvCompleteness": {        "completeness": 0.88,        "missingSections": ["volunteer"],        "suggestions": ["Add volunteer experience"]      }    }  }}

C# Model Classes

public class CVParserResult
{
    public string Name { get; set; }
    public string Email { get; set; }
    public string Phone { get; set; }
    public List<Experience> Experience { get; set; }
    public List<Education> Education { get; set; }
    public List<string> Skills { get; set; }
}

public class Experience
{
    public string Company { get; set; }
    public string Position { get; set; }
    public string Duration { get; set; }
}

public class Education
{
    public string Institution { get; set; }
    public string Degree { get; set; }
    public string Year { get; set; }
}

Important Notes:

  • • The API requires a valid Ollama server connection
  • • The specified model must be installed on your Ollama server
  • • Only PDF files are supported
  • • Response format may vary based on CV content and model used
OCR Service API Reference
Standalone PDF text extraction and OCR processing service

OCR Service API Endpoint

POST

Request Format

Method: POST

Content-Type: multipart/form-data

Parameters:

  • file (required) - PDF file to extract text from

Example Usage

JavaScriptocr-service.js
const formData = new FormData();formData.append('file', pdfFile);const response = await fetch('', {  method: 'POST',  body: formData});const result = await response.json();console.log(result);

Response Format

JSONocr-response.json
{  "method": "text-extraction",  "text": "Extracted text content from the PDF",  "confidence": 95.5,  "pageCount": 2,  "processingTime": 1250}

C# Model Classes

public class OCRResult
{
    public string Method { get; set; }
    public string Text { get; set; }
    public double Confidence { get; set; }
    public int PageCount { get; set; }
    public long ProcessingTime { get; set; }
}

OCR Service Features:

  • • Automatic text extraction from PDFs with selectable text
  • • OCR processing for scanned PDFs and images
  • • Confidence scoring for OCR results
  • • Multi-page PDF support
  • • Processing time tracking
  • • Runs as standalone service on port 8080