Skip to main content
GET
/
v1
/
classifications
/
{classification_id}
from retab import Retab

client = Retab()

classification = client.classifications.get("cls_01G34H8J2K")
print(classification.output.category)
{
  "id": "cls_01G34H8J2K",
  "file": {
    "id": "file_6dd6eb00688ad8d1",
    "filename": "invoice.pdf",
    "mime_type": "application/pdf"
  },
  "model": "retab-small",
  "categories": [
    {"name": "invoice", "description": "Invoice documents"},
    {"name": "receipt", "description": "Receipts"}
  ],
  "n_consensus": 1,
  "output": {
    "category": "invoice",
    "reasoning": "Contains invoice header, line items, and total due."
  },
  "consensus": {
    "choices": [],
    "likelihood": null
  },
  "created_at": "2024-03-15T10:30:00Z",
  "updated_at": "2024-03-15T10:30:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.retab.com/llms.txt

Use this file to discover all available pages before exploring further.

from retab import Retab

client = Retab()

classification = client.classifications.get("cls_01G34H8J2K")
print(classification.output.category)
{
  "id": "cls_01G34H8J2K",
  "file": {
    "id": "file_6dd6eb00688ad8d1",
    "filename": "invoice.pdf",
    "mime_type": "application/pdf"
  },
  "model": "retab-small",
  "categories": [
    {"name": "invoice", "description": "Invoice documents"},
    {"name": "receipt", "description": "Receipts"}
  ],
  "n_consensus": 1,
  "output": {
    "category": "invoice",
    "reasoning": "Contains invoice header, line items, and total due."
  },
  "consensus": {
    "choices": [],
    "likelihood": null
  },
  "created_at": "2024-03-15T10:30:00Z",
  "updated_at": "2024-03-15T10:30:00Z"
}

Path Parameters

classification_id
string
required
The unique identifier of the classification to retrieve.

Authorizations

Api-Key
string
header
required

Path Parameters

classification_id
string
required

Response

Successful Response

Backend-internal classification with organization scoping.

file
FileRef · object
required

Information about the classified file

model
string
required

Model used for classification

categories
Category · object[]
required

Categories the document was classified against

output
ClassificationDecision · object
required

The classification result with reasoning

id
string

Unique identifier of the classification

n_consensus
integer
default:1

Number of consensus votes used

instructions
string | null

Free-form instructions supplied with the classification request.

consensus
ClassificationConsensus · object

Consensus metadata for multi-vote classification runs

origin
ProcessingRequestOrigin · object

Origin of the classification request

usage
RetabUsage · object

Usage information for the classification

created_at
string<date-time> | null
updated_at
string<date-time> | null