Get Started

Step 1: Create an extraction template

You can either create an empty template or use one of our pre-defined templates.

Step 2: Define JSON schema

You can define the JSON schema using our UI. JSON schema is a way to define the structure of the data you want to extract.

Supported data types are:

  • string
  • number
  • boolean
  • array
  • object
  • enum

You can also define descriptions for the fields to help the model understand the data you want to extract.

Step 3: Run extraction

You can run extraction by uploading a document. The extracted fields will be returned on the right side of the UI.

You can also view markdown output of the extracted data, as well as the raw JSON output.

Step 4: Save the template

You can save the template by clicking on the save button.

Step 5: Use the API to process documents

After JSON schemas are defined, you can now use the API to process multiple documents.

You can retrieve your API keys in the settings page.

Here are some examples of how to use the API to process documents.

import axios from 'axios';

const options = {
    headers: {
        'x-api-key': '<your-api-key>',
        'Content-Type': 'application/json',
    }
};

const data = {
    url: '<file-url>',
    schema: {}, // copy your JSON schema here
};

axios.post('https://api.getomni.ai/extract', data, options)
    .then(response => console.log(response.data))
    .catch(error => console.error(error));

🎉 You’ve now successfully extracted data from a document!