1. Set up the Extractors Client

Create an Extractors client using your API key. You will need to generate an API key to access the services.

from latentforce-extractors import Extractors

# Create client
client = Extractors(api_key="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")  # Your API key here!

2. Process Files

Load and process your input files (supports jpg/jpeg/png/pdf formats):

# Load input file
file_path = "sample.jpg"  # Path to your input file
file = client.load_input_file(file_path=file_path)

# Create API input
inputs = {
    "input_file": file,
    "query": {}
}

3. Available Extractors

Choose from the following extractor options:

  • pdf-to-excel

  • pdf-to-markdown

  • image-to-excel

  • image-to-docx

  • key-value

# Specify extractor type
extractor_name = "pdf-to-excel"

# Process the file
response = client.process(extractor_name=extractor_name, extractor_inputs=inputs)

4. Save Results

Save the processed output to your desired location:

# Save the response
client.save_response(
    output_file_path="",  # Specify output directory
    output_filename=""    # Specify filename without extension
)