Create Extraction Agent
POST/api/v1/extractionv2/extraction_agent
Create Extraction Agent
Request
Query Parameters
Cookie Parameters
- application/json
Body
required
- MOD1
- MOD2
- MOD3
- MOD4
- MOD5
- MOD6
Array [
]
- MOD1
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
string
integer
number
boolean
config
object
required
The configuration parameters for the extraction agent.
The extraction mode specified.
Possible values: [PER_DOC
, PER_PAGE
]
PER_DOC
Whether to handle missing fields in the schema.
false
system_prompt
object
The system prompt to use for the extraction.
anyOf
string
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
- MOD3
- MOD4
- MOD5
- MOD6
Array [
]
- MOD1
The id of the extraction agent.
The name of the extraction agent.
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
string
integer
number
boolean
config
object
required
The configuration parameters for the extraction agent.
The extraction mode specified.
Possible values: [PER_DOC
, PER_PAGE
]
PER_DOC
Whether to handle missing fields in the schema.
false
system_prompt
object
The system prompt to use for the extraction.
anyOf
string
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"data_schema": {},
"config": {
"extraction_mode": "PER_DOC",
"handle_missing": false,
"system_prompt": "string"
}
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}