Skip to main content

List Runs

GET /documents
List all generated document runs, sorted by most recent. Returns up to 50 runs.

Response

Array of run objects:
run_id
string
Unique run identifier
files
string[]
List of file names in this run (recursive)

Example

curl http://localhost:8000/documents
Response
[
  {
    "run_id": "a1b2c3d4e5",
    "files": [
      "guia_despacho_00054321.html",
      "guia_despacho_00054321.png",
      "guia_despacho_00054321.pdf",
      "photo_full_picture.png",
      "photo_blurry.png"
    ]
  }
]

Download File

GET /documents/{run_id}/{filename}
Download a specific file from a generation run. Searches recursively within the run directory.
run_id
string
required
The run ID returned from a generation endpoint.
filename
string
required
File name to download (e.g. photo_full_picture.png).

Example

curl -o photo.png http://localhost:8000/documents/a1b2c3d4e5/photo_full_picture.png
Returns the file with appropriate content type, or 404 if not found.