Skip to main content

Extract a custom object from a given text.

POST 

/ai/extract-from-text

This function takes a text input, a context for added relevance, and a list of fields with their descriptions. It leverages an LLM to extract the specified information from the text and organizes it into a structured object.

Request

Header Parameters

    ipaas string

Bodyrequired

    textstringrequired

    The text in which the information will be searched.

    Example: Greetings! I am Zog, an alien from planet Blip, 142 years old, and a passionate collector of cosmic dust.
    contextstringrequired

    Prompt that contextualizes the text.

    Example: A brief self-introduction from an alien applying for an intergalactic research role.
    fields object[]required
  • Array [
  • namestringrequired

    Name (key) of the field.

    Example: age
    descriptionstringrequired

    Prompt describing the kind of information that this field should contain.

    Example: Age of the alien. Just a number, no other text.
    validationRegexstring

    A regular expression that will be used to validate the value.

    Example: ^(?:[1-9][0-9]?|1[0-9]{2}|200)$
  • ]

Responses

Success

Schema
    property name* object
    anyOf
    string