Set up your custom API

Set up your API

Once you have signed up and logged in at https://platform.mindee.com, navigate to the docTI tab and press the Create a new API button, as shown below:

First, we need some basic information about your new, custom document processing API. That info will help us highlight your API under the tab My APIs . The requested properties are:

Document type

This field is used to define your API name and endpoint url.

To ensure best performances:

  • use words that describe your document the best, i.e "ID card" if you aim at processing ID cards;
  • avoid using generic names that do not correspond to a document type, i.e. "Test API".

API name

The resource name of your API URL. We automatically generate one for you based on your Document type but you can customize it at your own convenience. Note however that you can’t use special or accented characters. The format of your API URL complies with the following scheme: https://api.mindee.net/v1/[username]/[API_name]/v1/predict

Description:

An optional, short blurb aimed at conveying the purpose of the API. This description will appear below the image under my APIs tab (and others if you choose to share your API with other users). We suggest you make it as clear and concise as possible to maximize its effectiveness.

Image:

An uploaded image that appropriately illustrates your API. Other users may see it in their API Store if you choose to share it with them.

Once you’re done setting up your API, press Next to begin defining your data model.

Define your document data model

It is recommended to have a document nearby to choose the Field name and examples.

You can add fields by clicking on the corresponding card:

  • String: This ****field is the most generic one. You can use it to extract a specific text from a document, i.e. a First Name from an Id card.
  • Number: A number field can be any decimal number or integer, such as amounts, percentages, quantities…
  • Date: Date can extract both Date and / or Time. Dates can be written in any format and will be returned in ISO formats yyyy-mm-dd.
  • Phone number: A phone number can be any phone number (any countries).
  • Email address : to extract email addresses.
  • URL: URL can be any kind of URLs, websites, links, …
  • Classification: Define the set of possible classes the documents can belong to. Each class must be exclusive: a document must belong to one class and cannot belong to many classes. If the document belongs to none of the proposed classes, the output will be Null.
  • Object: Define a composite field which includes one or several items of different types. Can be used to extract tables from documents.

Once you select a field type, the following information is required for each field:

  • Field Name: For each field, define a name that will be used to create the corresponding API JSON response key.
    To ensure maximum extraction performances:
    - use descriptive and explicit words, i.e. “First Name”, “Last Name” or “Full Name” instead of “Name”;
    - avoid names that do not correspond with what you are trying to extract, i.e. "Field 1";
    - when applicable, use words that are used in the document for describing the value you want to extract, i.e. “Date Of Birth: 01/01/2000” use the name “Date Of Birth”

  • API response key: is directly defined from the Field Name and cannot be edited.

  • Example: Examples are very important to describe:

    • formatting instructions (respect case);
    • example of data the model should extract.
      To improve performances:
    • use a real world example from a document;
    • respect the case and the format you want for your output;
    • don’t describe the field.
  • The answer can have multiple values: Check the box if you need the model to extract several values in the documents. The values will be outputted as a list.

Once you’re done setting up your data model, press the Create API button at the bottom of the screen.

Questions?
Slack Logo Icon  Join our Slack