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": {}
}
]
}Document Processing
Edit
POST
/
edit
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
Body
application/json
Response
Successful Response
Was this page helpful?