curl --request GET \
--url https://api.chunkr.ai/tasks/{task_id}/extract \
--header 'Authorization: <api-key>'import requests
url = "https://api.chunkr.ai/tasks/{task_id}/extract"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.chunkr.ai/tasks/{task_id}/extract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chunkr.ai/tasks/{task_id}/extract",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chunkr.ai/tasks/{task_id}/extract"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chunkr.ai/tasks/{task_id}/extract")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chunkr.ai/tasks/{task_id}/extract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"completed": true,
"configuration": {
"schema": {},
"parse_configuration": {
"chunk_processing": {
"ignore_headers_and_footers": null,
"target_length": 4096,
"tokenizer": {
"Enum": "Word"
}
},
"error_handling": "Fail",
"ocr_strategy": "All",
"pipeline": "Chunkr",
"segment_processing": {
"Caption": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Footnote": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"FormRegion": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Formula": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"GraphicalItem": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Legend": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"LineNumber": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"ListItem": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Page": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"PageFooter": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"PageHeader": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"PageNumber": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Picture": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Table": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Text": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Title": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Unknown": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
}
},
"segmentation_strategy": "LayoutAnalysis"
},
"system_prompt": "You are an expert at structured data extraction. You will be given parsed text from a document and should convert it into the given structure."
},
"created_at": "2023-11-07T05:31:56Z",
"file_info": {
"url": "<string>",
"mime_type": "<string>",
"name": "<string>",
"page_count": 1,
"ss_cell_count": 1
},
"message": "<string>",
"status": "Starting",
"task_id": "<string>",
"task_type": "Parse",
"version_info": {
"client_version": "Legacy",
"server_version": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"input_file_url": "<string>",
"output": {
"citations": "<unknown>",
"metrics": "<unknown>",
"results": "<unknown>"
},
"parse_task_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"task_url": "<string>"
}"<string>""<string>""<string>""<string>"Get Extract Task
Retrieves the current state of an extract task.
Returns task details such as processing status, configuration, output (when available), file metadata, and timestamps.
Typical uses:
- Poll a task during processing
- Retrieve the final output once processing is complete
- Access task metadata and configuration
curl --request GET \
--url https://api.chunkr.ai/tasks/{task_id}/extract \
--header 'Authorization: <api-key>'import requests
url = "https://api.chunkr.ai/tasks/{task_id}/extract"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.chunkr.ai/tasks/{task_id}/extract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chunkr.ai/tasks/{task_id}/extract",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chunkr.ai/tasks/{task_id}/extract"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chunkr.ai/tasks/{task_id}/extract")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chunkr.ai/tasks/{task_id}/extract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"completed": true,
"configuration": {
"schema": {},
"parse_configuration": {
"chunk_processing": {
"ignore_headers_and_footers": null,
"target_length": 4096,
"tokenizer": {
"Enum": "Word"
}
},
"error_handling": "Fail",
"ocr_strategy": "All",
"pipeline": "Chunkr",
"segment_processing": {
"Caption": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Footnote": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"FormRegion": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Formula": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"GraphicalItem": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Legend": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"LineNumber": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"ListItem": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Page": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"PageFooter": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"PageHeader": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"PageNumber": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Picture": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Table": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Text": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Title": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
},
"Unknown": {
"crop_image": "All",
"description": null,
"extended_context": null,
"format": "Html",
"llm": "<string>",
"strategy": "LLM"
}
},
"segmentation_strategy": "LayoutAnalysis"
},
"system_prompt": "You are an expert at structured data extraction. You will be given parsed text from a document and should convert it into the given structure."
},
"created_at": "2023-11-07T05:31:56Z",
"file_info": {
"url": "<string>",
"mime_type": "<string>",
"name": "<string>",
"page_count": 1,
"ss_cell_count": 1
},
"message": "<string>",
"status": "Starting",
"task_id": "<string>",
"task_type": "Parse",
"version_info": {
"client_version": "Legacy",
"server_version": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"input_file_url": "<string>",
"output": {
"citations": "<unknown>",
"metrics": "<unknown>",
"results": "<unknown>"
},
"parse_task_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"task_url": "<string>"
}"<string>""<string>""<string>""<string>"Authorizations
Path Parameters
Id of the task to retrieve
Query Parameters
Whether to return base64 encoded URLs. If false, the URLs will be returned as presigned URLs.
Whether to include chunks in the output response
Response
Task details.
True when the task reaches a terminal state i.e. status is Succeeded or Failed or Cancelled
Show child attributes
Show child attributes
The date and time when the task was created and queued.
Information about the input file.
Show child attributes
Show child attributes
A message describing the task's status or any errors that occurred.
The status of the task.
Starting, Processing, Succeeded, Failed, Cancelled The unique identifier for the task.
Parse, Extract Version information for the task.
Show child attributes
Show child attributes
The date and time when the task will expire.
The date and time when the task was finished.
The presigned URL of the input file.
Deprecated use file_info.url instead.
The processed results of a document extraction task.
Shapes:
results: JSON matching the user-provided schema.citations: mirror ofresults; only leaf positions (primitive or array-of-primitives) contain aVec<Citation>supporting that field.metrics: mirror ofresults; only leaf positions contain aMetricsobject for that field.
Show child attributes
Show child attributes
The ID of the source parse task that was used for extraction
The date and time when the task was started.
The presigned URL of the task.