Skip to main content

Create Extraction Agent

POST 

/api/v1/extractionv2/extraction_agent

Create Extraction Agent

Request

Query Parameters

    project_id any
    organization_id any

Cookie Parameters

    session any

Body

required

    name Name (string)required

    The name of the extraction schema

    Possible values: non-empty and <= 3000 characters

    data_schema

    object

    required

    The schema of the data.

    property name*

    object

    anyOf

    object

    config

    object

    required

    The configuration parameters for the extraction agent.

    extraction_mode ExtractMode (string)

    The extraction mode specified.

    Possible values: [PER_DOC, PER_PAGE]

    Default value: PER_DOC
    handle_missing Handle Missing (boolean)

    Whether to handle missing fields in the schema.

    Default value: false

    system_prompt

    object

    The system prompt to use for the extraction.

    anyOf

    string

Responses

Successful Response

Schema

    id uuidrequired

    The id of the extraction agent.

    name Name (string)required

    The name of the extraction agent.

    project_id uuidrequired

    The ID of the project that the extraction agent belongs to.

    data_schema

    object

    required

    The schema of the data.

    property name*

    object

    anyOf

    object

    config

    object

    required

    The configuration parameters for the extraction agent.

    extraction_mode ExtractMode (string)

    The extraction mode specified.

    Possible values: [PER_DOC, PER_PAGE]

    Default value: PER_DOC
    handle_missing Handle Missing (boolean)

    Whether to handle missing fields in the schema.

    Default value: false

    system_prompt

    object

    The system prompt to use for the extraction.

    anyOf

    string