POST
/
pipeline
Pipeline
import requests

url = "https://platform.reducto.ai/pipeline"

payload = {
    "document_url": "<string>",
    "pipeline_id": "<string>"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
{
  "job_id": "<string>",
  "usage": {
    "num_pages": 123,
    "credits": 123
  },
  "result": {
    "parse": {
      "job_id": "<string>",
      "duration": 123,
      "pdf_url": "<string>",
      "studio_link": "<string>",
      "usage": {
        "num_pages": 123,
        "credits": 123
      },
      "result": {
        "type": "<string>",
        "chunks": [
          {
            "content": "<string>",
            "embed": "<string>",
            "enriched": "<string>",
            "enrichment_success": false,
            "blocks": [
              {
                "type": "Header",
                "bbox": {
                  "left": "<any>",
                  "top": "<any>",
                  "width": "<any>",
                  "height": "<any>",
                  "page": "<any>",
                  "original_page": "<any>"
                },
                "content": "<string>",
                "image_url": "<string>",
                "confidence": "<string>",
                "granular_confidence": {}
              }
            ]
          }
        ],
        "ocr": {
          "words": [
            {
              "text": "<string>",
              "bbox": {
                "left": "<any>",
                "top": "<any>",
                "width": "<any>",
                "height": "<any>",
                "page": "<any>",
                "original_page": "<any>"
              },
              "confidence": 123,
              "chunk_index": 123
            }
          ],
          "lines": [
            {
              "text": "<string>",
              "bbox": {
                "left": "<any>",
                "top": "<any>",
                "width": "<any>",
                "height": "<any>",
                "page": "<any>",
                "original_page": "<any>"
              },
              "confidence": 123,
              "chunk_index": 123
            }
          ]
        },
        "custom": "<any>"
      }
    },
    "extract": [
      {
        "split_name": "<string>",
        "page_range": [
          123
        ],
        "partition": "<string>",
        "result": {
          "job_id": "<string>",
          "usage": {
            "num_pages": 123,
            "num_fields": 123,
            "credits": 123
          },
          "studio_link": "<string>",
          "result": [
            "<any>"
          ],
          "citations": [
            "<any>"
          ]
        }
      }
    ],
    "split": {
      "usage": {
        "num_pages": 123,
        "credits": 123
      },
      "result": {
        "section_mapping": {},
        "splits": [
          {
            "name": "<string>",
            "pages": [
              123
            ],
            "conf": "low",
            "partitions": [
              {
                "name": "<string>",
                "pages": [
                  123
                ],
                "conf": "low"
              }
            ]
          }
        ]
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
document_url
required

The URL of the document to be processed. You can provide one of the following: 1. A publicly available URL 2. A presigned S3 URL 3. A reducto:// prefixed URL obtained from the /upload endpoint after directly uploading a document

pipeline_id
string
required

The ID of the pipeline to use for the document.

Response

Successful Response

job_id
string
required
usage
object
required
result
object
required