Skip to content

API Option

Introduction

The Lettria API Parser endpoint provides an input type option that allow you to customize the behavior of the API. This option is included in the options key, when making requests.

Warning : the value of the options key must be stringified like so : "{'type': 'text'}"

Available Input types

1. text

  • Description: This is the default input type. Nothing special is done.

2. rapport

  • Description: This is the input type for structured documents, with chapters for example. It will try to detect and return the document's structure by analyzing the content.

3. conversational

  • Description: This is the input type for audio conversations. Lettria API Parser can take a .mp3 as input file. After an external Speech to Text processing, we will attribute a speaker to each document chunk.

4. narrative

  • Description: For this input type, the document's structure will also be searched, along to the dialogues. For example, in a book, there are chapters (structure) and alternating dialogue and narration.

5. review

  • Description: This is the input type for reviews, unstructured text in which someone gives their opinion on something.

Next step