curl --request GET \
--url https://agents.nanonets.com/api/v1/tasks/{task_id}/predictions \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.nanonets.com/api/v1/tasks/{task_id}/predictions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.nanonets.com/api/v1/tasks/{task_id}/predictions', 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://agents.nanonets.com/api/v1/tasks/{task_id}/predictions",
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: Bearer <token>"
],
]);
$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://agents.nanonets.com/api/v1/tasks/{task_id}/predictions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://agents.nanonets.com/api/v1/tasks/{task_id}/predictions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agents.nanonets.com/api/v1/tasks/{task_id}/predictions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"moderated_images_count": 123,
"unmoderated_images_count": 123,
"moderated_images": [
{
"page": 123,
"size": {
"width": 123,
"height": 123,
"normalized_width": 123,
"normalized_height": 123
},
"rotation": 123,
"url": "<string>",
"file_url": "<string>",
"status": "success",
"original_file_name": "<string>",
"request_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_moderated": true,
"request_metadata": "<string>",
"predicted_boxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"ocr_text": "<string>",
"status": "<string>",
"type": "field",
"page": 123,
"is_edited": true,
"lookup_edited": true,
"lookup_parent_box_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"validation_status": "<string>",
"validation_message": "<string>",
"cells": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"row": 123,
"col": 123,
"row_span": 123,
"col_span": 123,
"label": "<string>",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"text": "<string>",
"row_label": "<string>",
"status": "<string>",
"verification_status": "<string>",
"failed_validation": true,
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lookup_edited": true,
"is_edited": true
}
]
}
],
"moderated_boxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"ocr_text": "<string>",
"status": "<string>",
"type": "field",
"page": 123,
"is_edited": true,
"lookup_edited": true,
"lookup_parent_box_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"validation_status": "<string>",
"validation_message": "<string>",
"cells": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"row": 123,
"col": 123,
"row_span": 123,
"col_span": 123,
"label": "<string>",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"text": "<string>",
"row_label": "<string>",
"status": "<string>",
"verification_status": "<string>",
"failed_validation": true,
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lookup_edited": true,
"is_edited": true
}
]
}
]
}
],
"unmoderated_images": [
{
"page": 123,
"size": {
"width": 123,
"height": 123,
"normalized_width": 123,
"normalized_height": 123
},
"rotation": 123,
"url": "<string>",
"file_url": "<string>",
"status": "success",
"original_file_name": "<string>",
"request_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_moderated": true,
"request_metadata": "<string>",
"predicted_boxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"ocr_text": "<string>",
"status": "<string>",
"type": "field",
"page": 123,
"is_edited": true,
"lookup_edited": true,
"lookup_parent_box_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"validation_status": "<string>",
"validation_message": "<string>",
"cells": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"row": 123,
"col": 123,
"row_span": 123,
"col_span": 123,
"label": "<string>",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"text": "<string>",
"row_label": "<string>",
"status": "<string>",
"verification_status": "<string>",
"failed_validation": true,
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lookup_edited": true,
"is_edited": true
}
]
}
],
"moderated_boxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"ocr_text": "<string>",
"status": "<string>",
"type": "field",
"page": 123,
"is_edited": true,
"lookup_edited": true,
"lookup_parent_box_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"validation_status": "<string>",
"validation_message": "<string>",
"cells": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"row": 123,
"col": 123,
"row_span": 123,
"col_span": 123,
"label": "<string>",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"text": "<string>",
"row_label": "<string>",
"status": "<string>",
"verification_status": "<string>",
"failed_validation": true,
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lookup_edited": true,
"is_edited": true
}
]
}
]
}
],
"signed_urls": {}
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}Get task predictions
Returns the agent’s extraction predictions with visual coordinates for each extracted value. Includes both predicted values and human-reviewed corrections. Coordinates are in the document’s native units (PDF points, 72 per inch) by default, or scaled to pixels if a DPI is specified.
Each box represents either a field extraction or a table cell location on a specific page. Unlocated fields are returned with coordinates (0,0,0,0). Review edits carry a score of 0.
curl --request GET \
--url https://agents.nanonets.com/api/v1/tasks/{task_id}/predictions \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.nanonets.com/api/v1/tasks/{task_id}/predictions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.nanonets.com/api/v1/tasks/{task_id}/predictions', 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://agents.nanonets.com/api/v1/tasks/{task_id}/predictions",
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: Bearer <token>"
],
]);
$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://agents.nanonets.com/api/v1/tasks/{task_id}/predictions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://agents.nanonets.com/api/v1/tasks/{task_id}/predictions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agents.nanonets.com/api/v1/tasks/{task_id}/predictions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"moderated_images_count": 123,
"unmoderated_images_count": 123,
"moderated_images": [
{
"page": 123,
"size": {
"width": 123,
"height": 123,
"normalized_width": 123,
"normalized_height": 123
},
"rotation": 123,
"url": "<string>",
"file_url": "<string>",
"status": "success",
"original_file_name": "<string>",
"request_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_moderated": true,
"request_metadata": "<string>",
"predicted_boxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"ocr_text": "<string>",
"status": "<string>",
"type": "field",
"page": 123,
"is_edited": true,
"lookup_edited": true,
"lookup_parent_box_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"validation_status": "<string>",
"validation_message": "<string>",
"cells": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"row": 123,
"col": 123,
"row_span": 123,
"col_span": 123,
"label": "<string>",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"text": "<string>",
"row_label": "<string>",
"status": "<string>",
"verification_status": "<string>",
"failed_validation": true,
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lookup_edited": true,
"is_edited": true
}
]
}
],
"moderated_boxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"ocr_text": "<string>",
"status": "<string>",
"type": "field",
"page": 123,
"is_edited": true,
"lookup_edited": true,
"lookup_parent_box_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"validation_status": "<string>",
"validation_message": "<string>",
"cells": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"row": 123,
"col": 123,
"row_span": 123,
"col_span": 123,
"label": "<string>",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"text": "<string>",
"row_label": "<string>",
"status": "<string>",
"verification_status": "<string>",
"failed_validation": true,
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lookup_edited": true,
"is_edited": true
}
]
}
]
}
],
"unmoderated_images": [
{
"page": 123,
"size": {
"width": 123,
"height": 123,
"normalized_width": 123,
"normalized_height": 123
},
"rotation": 123,
"url": "<string>",
"file_url": "<string>",
"status": "success",
"original_file_name": "<string>",
"request_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_moderated": true,
"request_metadata": "<string>",
"predicted_boxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"ocr_text": "<string>",
"status": "<string>",
"type": "field",
"page": 123,
"is_edited": true,
"lookup_edited": true,
"lookup_parent_box_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"validation_status": "<string>",
"validation_message": "<string>",
"cells": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"row": 123,
"col": 123,
"row_span": 123,
"col_span": 123,
"label": "<string>",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"text": "<string>",
"row_label": "<string>",
"status": "<string>",
"verification_status": "<string>",
"failed_validation": true,
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lookup_edited": true,
"is_edited": true
}
]
}
],
"moderated_boxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"ocr_text": "<string>",
"status": "<string>",
"type": "field",
"page": 123,
"is_edited": true,
"lookup_edited": true,
"lookup_parent_box_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"validation_status": "<string>",
"validation_message": "<string>",
"cells": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"row": 123,
"col": 123,
"row_span": 123,
"col_span": 123,
"label": "<string>",
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123,
"score": 0.5,
"text": "<string>",
"row_label": "<string>",
"status": "<string>",
"verification_status": "<string>",
"failed_validation": true,
"label_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lookup_edited": true,
"is_edited": true
}
]
}
]
}
],
"signed_urls": {}
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}Authorizations
Workspace API key issued from the web app. Pass as
Authorization: Bearer YOUR_API_KEY.
Path Parameters
UUID of the task.
Query Parameters
Optional DPI for coordinate scaling. If omitted, all coordinates and page sizes are in native units. If given (36..1200), coordinates and sizes are multiplied by dpi/72 and rounded to pixels.
36 <= x <= 1200Response
Task with predictions and box coordinates.
Lifecycle status of a task.
pending— created, not yet picked upqueued— held back by admission control (agent at concurrent-task limit)running— being processed by the workerwaiting_for_input— agent calledask_user; reply withPOST /tasks/{id}/messageawaiting_review— agent is paused for human approval of a sensitive stepcompleted— terminal: finished successfullyfailed— terminal: errored outstopped— terminal: cancelled by a user or system
pending, queued, running, waiting_for_input, awaiting_review, completed, failed, stopped Count of pages with human review edits.
Count of pages without human review edits.
Pages that have been human-reviewed (edits applied).
Show child attributes
Show child attributes
Pages awaiting human review.
Show child attributes
Show child attributes
Map of original file names to signed download URLs.
Show child attributes
Show child attributes