import requests
url = "https://platform.reducto.ai/edit"
payload = {
"document_url": "<string>",
"edit_instructions": "<string>",
"edit_options": {
"color": "#FF0000",
"enable_overflow_pages": False,
"flatten": False
},
"form_schema": [
{
"bbox": {
"left": 123,
"top": 123,
"width": 123,
"height": 123,
"page": 123,
"original_page": 123
},
"description": "<string>",
"fill": True,
"value": "<string>",
"font_size": 36.5
}
],
"priority": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document_url: '<string>',
edit_instructions: '<string>',
edit_options: {color: '#FF0000', enable_overflow_pages: false, flatten: false},
form_schema: [
{
bbox: {left: 123, top: 123, width: 123, height: 123, page: 123, original_page: 123},
description: '<string>',
fill: true,
value: '<string>',
font_size: 36.5
}
],
priority: true
})
};
fetch('https://platform.reducto.ai/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.reducto.ai/edit"
payload := strings.NewReader("{\n \"document_url\": \"<string>\",\n \"edit_instructions\": \"<string>\",\n \"edit_options\": {\n \"color\": \"#FF0000\",\n \"enable_overflow_pages\": false,\n \"flatten\": false\n },\n \"form_schema\": [\n {\n \"bbox\": {\n \"left\": 123,\n \"top\": 123,\n \"width\": 123,\n \"height\": 123,\n \"page\": 123,\n \"original_page\": 123\n },\n \"description\": \"<string>\",\n \"fill\": true,\n \"value\": \"<string>\",\n \"font_size\": 36.5\n }\n ],\n \"priority\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"document_url": "<string>",
"response_type": "edit",
"job_id": "<string>",
"form_schema": [
{
"bbox": {
"left": 123,
"top": 123,
"width": 123,
"height": 123,
"page": 123,
"original_page": 123
},
"description": "<string>",
"type": "text",
"fill": true,
"value": "<string>",
"font_size": 36.5
}
],
"usage": {
"num_pages": 123,
"credits": 123,
"credit_breakdown": {},
"page_billing_breakdown": {},
"non_empty_cell_count": 123,
"usage_breakdown": {
"parse_model": "R-1",
"tier": "Default",
"parse_pages": 0,
"parse_native_pages": 0,
"legacy_parse_credits": 0,
"ocr_pages": 0,
"charts": 0,
"prompted_blocks": 0
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Edit
import requests
url = "https://platform.reducto.ai/edit"
payload = {
"document_url": "<string>",
"edit_instructions": "<string>",
"edit_options": {
"color": "#FF0000",
"enable_overflow_pages": False,
"flatten": False
},
"form_schema": [
{
"bbox": {
"left": 123,
"top": 123,
"width": 123,
"height": 123,
"page": 123,
"original_page": 123
},
"description": "<string>",
"fill": True,
"value": "<string>",
"font_size": 36.5
}
],
"priority": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document_url: '<string>',
edit_instructions: '<string>',
edit_options: {color: '#FF0000', enable_overflow_pages: false, flatten: false},
form_schema: [
{
bbox: {left: 123, top: 123, width: 123, height: 123, page: 123, original_page: 123},
description: '<string>',
fill: true,
value: '<string>',
font_size: 36.5
}
],
priority: true
})
};
fetch('https://platform.reducto.ai/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.reducto.ai/edit"
payload := strings.NewReader("{\n \"document_url\": \"<string>\",\n \"edit_instructions\": \"<string>\",\n \"edit_options\": {\n \"color\": \"#FF0000\",\n \"enable_overflow_pages\": false,\n \"flatten\": false\n },\n \"form_schema\": [\n {\n \"bbox\": {\n \"left\": 123,\n \"top\": 123,\n \"width\": 123,\n \"height\": 123,\n \"page\": 123,\n \"original_page\": 123\n },\n \"description\": \"<string>\",\n \"fill\": true,\n \"value\": \"<string>\",\n \"font_size\": 36.5\n }\n ],\n \"priority\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"document_url": "<string>",
"response_type": "edit",
"job_id": "<string>",
"form_schema": [
{
"bbox": {
"left": 123,
"top": 123,
"width": 123,
"height": 123,
"page": 123,
"original_page": 123
},
"description": "<string>",
"type": "text",
"fill": true,
"value": "<string>",
"font_size": 36.5
}
],
"usage": {
"num_pages": 123,
"credits": 123,
"credit_breakdown": {},
"page_billing_breakdown": {},
"non_empty_cell_count": 123,
"usage_breakdown": {
"parse_model": "R-1",
"tier": "Default",
"parse_pages": 0,
"parse_native_pages": 0,
"legacy_parse_credits": 0,
"ocr_pages": 0,
"charts": 0,
"prompted_blocks": 0
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The URL of the document to be processed. You can provide one of the following:
- A publicly available URL
- A presigned S3 URL
- A reducto:// prefixed URL obtained from the /upload endpoint after directly uploading a document
The instructions for the edit.
Show child attributes
Show child attributes
Form schema for PDF forms. List of widgets with their types, descriptions, and bounding boxes. Only works for PDFs.
Show child attributes
Show child attributes
Workers poll the priority queue ahead of the standard queue, so priority jobs start sooner when there is queued work; sync jobs are prioritized above async jobs by default.
Response
Successful Response
Presigned URL to download the edited document.
"edit"The unique identifier for the edit job.
Form schema for PDF forms. List of widgets with their types, descriptions, and bounding boxes.
Show child attributes
Show child attributes
Usage information for the edit operation, including number of pages and credits charged.
Show child attributes
Show child attributes
Was this page helpful?