POST
/
v1
/
projects
/
{project_id}
/
documents
from retab import Retab

client = Retab()
response = client.projects.documents.create(
    project_id="<project_id>",
    document="Invoice.pdf",
    annotation={
        "invoice_number": "12345"
    }
)
{
  "mime_data": {
    "filename": "file.pdf",
    "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..."
  },
  "annotation": {},
  "annotation_metadata": {
    "extraction_id": "<string>",
    "likelihoods": {},
    "field_locations": {},
    "agentic_field_locations": {},
    "consensus_details": [
      {}
    ],
    "api_cost": {
      "value": 123,
      "currency": "<string>"
    }
  },
  "id": "<string>",
  "ocr_file_id": "<string>"
}
from retab import Retab

client = Retab()
response = client.projects.documents.create(
    project_id="<project_id>",
    document="Invoice.pdf",
    annotation={
        "invoice_number": "12345"
    }
)

Authorizations

Api-Key
string
header
required

Path Parameters

project_id
string
required

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.