from retab import Retab
client = Retab()
edit = client.edits.get("edit_01G34H8J2K")
print(edit.output.form_data)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.get("edit_01G34H8J2K");
console.log(edit.output.formData);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
edit, err := client.Edits.Get(ctx, "edit_01G34H8J2K", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Output.FormData)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.get(edit_id: 'edit_01G34H8J2K')
puts edit.output.form_data
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let edit = client.edits().get("edit_01G34H8J2K", retab::resources::edits::GetParams::default()).await?;
println!("{:?}", edit.output.as_ref().unwrap().form_data);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->get(
editId: 'edit_id_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Edits.GetAsync("edit_id_abc123");
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.edits().get("edit_abc123", null);
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/edit_01G34H8J2K' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"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"
}
{
"detail": "Edit edit_01G34H8J2K not found"
}
Get Edit
Retrieve an edit.
Fetches a single edit by its edit_id. Returns the edit with its filled
form data and rendered document; responds with 404 if no edit with that
id exists.
from retab import Retab
client = Retab()
edit = client.edits.get("edit_01G34H8J2K")
print(edit.output.form_data)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.get("edit_01G34H8J2K");
console.log(edit.output.formData);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
edit, err := client.Edits.Get(ctx, "edit_01G34H8J2K", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Output.FormData)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.get(edit_id: 'edit_01G34H8J2K')
puts edit.output.form_data
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let edit = client.edits().get("edit_01G34H8J2K", retab::resources::edits::GetParams::default()).await?;
println!("{:?}", edit.output.as_ref().unwrap().form_data);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->get(
editId: 'edit_id_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Edits.GetAsync("edit_id_abc123");
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.edits().get("edit_abc123", null);
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/edit_01G34H8J2K' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"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"
}
{
"detail": "Edit edit_01G34H8J2K not found"
}
from retab import Retab
client = Retab()
edit = client.edits.get("edit_01G34H8J2K")
print(edit.output.form_data)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.get("edit_01G34H8J2K");
console.log(edit.output.formData);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
edit, err := client.Edits.Get(ctx, "edit_01G34H8J2K", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Output.FormData)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.get(edit_id: 'edit_01G34H8J2K')
puts edit.output.form_data
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let edit = client.edits().get("edit_01G34H8J2K", retab::resources::edits::GetParams::default()).await?;
println!("{:?}", edit.output.as_ref().unwrap().form_data);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->get(
editId: 'edit_id_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Edits.GetAsync("edit_id_abc123");
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.edits().get("edit_abc123", null);
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/edit_01G34H8J2K' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"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"
}
{
"detail": "Edit edit_01G34H8J2K not found"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
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.
Unique identifier of the edit.
Information about the source file (input document or template PDF).
Show child attributes
Show child attributes
Model used for the edit operation.
Configuration used for the edit operation.
Show child attributes
Show child attributes
Free-form instructions supplied with the edit request.
Template id used when the edit was created from a template; null for direct-document edits.
The edit result: filled form fields and the rendered PDF. An empty sentinel until status == 'completed'; gate reads on status.
Show child attributes
Show child attributes
Lifecycle status. The synchronous path returns 'completed'. Background runs progress pending -> queued -> in_progress -> completed | failed | cancelled.
pending, queued, in_progress, completed, failed, cancelled Error details when a background run fails; null otherwise. Always present so consumers can read it without an existence check.
Show child attributes
Show child attributes
Durable file reference for the filled document, when materialized.
Show child attributes
Show child attributes
Usage information for the edit operation.
Show child attributes
Show child attributes