v1
latestOpenAPI 3.0.22026-07-173834119.9 KBChunking
Create Chunking Job
Endpoint to Create a Chunking Job
This endpoint creates a chunking job and returns the job ID that can be used to get the status of the job.
Request Body
| Field | Type | Description |
|---|---|---|
| extraction_job_id | str | The ID of the extraction job. |
| chunking_strategy | str | The chunking strategy to use. |
| chunking_params | Optional[ChunkingParams] | Optional parameters for the chunking strategy. |
Chunking Strategies
- fixed_size: Chunks the file into fixed-size segments.
- recursive: Recursively splits the file into smaller segments based on a delimiter.
Chunking Parameters
| Field | Type | Description |
|---|---|---|
| chunk_size | int | The size of each chunk in character. |
| chunk_overlap | int | The number of overlapping characters between chunks. |
Example Request Body
{
"extraction_job_id": "123456",
"chunking_strategy": "fixed_size",
"chunking_params": {
"chunk_size": 1000,
"chunk_overlap": 100
}
}
Response Body
| Field | Type | Description |
|---|---|---|
| chunking_job_id | str | The ID of the created job. |
| extraction_job_id | str | The ID of the extraction job. |
| status | str | The status of the created job. Returns WAITING_QUEUE_ALLOCATION if the job is created successfully. |
| total_file_count | int | The total number of files to be chunked. |
Errors
- 400 Bad Request: If a chunking job with status 'WAITING_QUEUE_ALLOCATION' already exists.
- 400 Bad Request: If the extraction job is not in COMPLETED or COMPLETED_WITH_ERRORS state.
- 500 Internal Server Error: If there is an unexpected error during the creation of the chunking job.
post/document/chunking/create_job
Request body
Response
Successful Response