Skip to main content
GET
/
v1
/
edits
/
{edit_id}
from retab import Retab

client = Retab()
edit = client.edits.get("edit_01G34H8J2K")
print(edit.output.form_data)
{
  "id": "edit_01G34H8J2K",
  "file": {
    "id": "file_6dd6eb00688ad8d1",
    "filename": "form.pdf",
    "mime_type": "application/pdf"
  },
  "model": "retab-small",
  "instructions": "Name: John Doe",
  "template_id": null,
  "config": { "color": "#000080" },
  "output": {
    "form_data": [
      {
        "key": "full_name",
        "type": "text",
        "value": "John Doe",
        "description": "Full name",
        "bbox": {
          "left": 0.15,
          "top": 0.2,
          "width": 0.35,
          "height": 0.03,
          "page": 1
        }
      }
    ],
    "filled_document": {
      "filename": "form_filled.pdf",
      "url": "data:application/pdf;base64,..."
    }
  },
  "usage": { "page_count": 1, "credits": 1.0 },
  "created_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()
edit = client.edits.get("edit_01G34H8J2K")
print(edit.output.form_data)
{
  "id": "edit_01G34H8J2K",
  "file": {
    "id": "file_6dd6eb00688ad8d1",
    "filename": "form.pdf",
    "mime_type": "application/pdf"
  },
  "model": "retab-small",
  "instructions": "Name: John Doe",
  "template_id": null,
  "config": { "color": "#000080" },
  "output": {
    "form_data": [
      {
        "key": "full_name",
        "type": "text",
        "value": "John Doe",
        "description": "Full name",
        "bbox": {
          "left": 0.15,
          "top": 0.2,
          "width": 0.35,
          "height": 0.03,
          "page": 1
        }
      }
    ],
    "filled_document": {
      "filename": "form_filled.pdf",
      "url": "data:application/pdf;base64,..."
    }
  },
  "usage": { "page_count": 1, "credits": 1.0 },
  "created_at": "2024-03-15T10:30:00Z"
}

Authorizations

Api-Key
string
header
required

Path Parameters

edit_id
string
required

Query Parameters

include_output
boolean
default:true

When false, returns a cheap status-only projection (no output), served from cache for in-flight background runs.

Response

Successful Response

An edit result: form-field values written onto a document or template PDF.

id
string
required

Unique identifier of the edit.

file
FileRef · object
required

Information about the source file (input document or template PDF).

model
string
required

Model used for the edit operation.

config
EditConfig · object
required

Configuration used for the edit operation.

instructions
string | null

Free-form instructions supplied with the edit request.

template_id
string | null

Template id used when the edit was created from a template; null for direct-document edits.

output
EditResult · object

The edit result: filled form fields and the rendered PDF. An empty sentinel until status == 'completed'; gate reads on status.

status
enum<string>
default:pending

Lifecycle status. The synchronous path returns 'completed'. Background runs progress pending -> queued -> in_progress -> completed | failed | cancelled.

Available options:
pending,
queued,
in_progress,
completed,
failed,
cancelled
error
PrimitiveError · object

Error details when a background run fails; null otherwise. Always present so consumers can read it without an existence check.

filled_document_ref
FileRef · object

Durable file reference for the filled document, when materialized.

usage
RetabUsage · object

Usage information for the edit operation.

created_at
string<date-time> | null