curl -X GET 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY'
from pathlib import Path
import requests
document_packet_id = "069dcc2c-e14c-7606-8000-2ee4fb17b4e1"
url = f"https://api.anyformat.ai/v3/document-packets/{document_packet_id}/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
packet = requests.get(url, headers=headers).json()
print(packet["status"], packet["latest_run_id"])
downloads = Path("downloads")
downloads.mkdir(exist_ok=True)
for file in packet["files"]:
if file["download_url"]:
# `name` is the name as uploaded: it may hold a path, repeat within a packet, and run to 255
# characters. Its last 50 keep the extension and fit the filesystem's 255-byte limit after the id.
name = Path(file["name"].replace("\\", "/")).name[-50:]
with open(downloads / f"{file['id']}-{name}", "wb") as out:
out.write(requests.get(file["download_url"]).content)
{
"id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e1",
"workflow_id": "0686bb97-8c30-70f0-8000-97669e000eb8",
"name": "contract-bundle",
"status": "processed",
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:05:00.000Z",
"files": [
{
"id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e2",
"name": "contract.pdf",
"content_type": "application/pdf",
"download_url": "https://storage.anyformat.ai/files/069dcc2ce14c760680002ee4fb17b4e2?X-Amz-Signature=...",
"download_url_expires_at": "2026-07-01T13:00:00Z"
},
{
"id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e3",
"name": "annex-a.pdf",
"content_type": "application/pdf",
"download_url": "https://storage.anyformat.ai/files/069dcc2ce14c760680002ee4fb17b4e3?X-Amz-Signature=...",
"download_url_expires_at": "2026-07-01T13:00:00Z"
}
],
"latest_run_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4f9",
"metadata": { "customer_reference": "CR-2026-99001-ZTX" }
}
Document packets
Get Document Packet
Retrieve one document packet: status, files with download links, and its latest run id
GET
/
v3
/
document-packets
/
{document_packet_id}
/
curl -X GET 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY'
from pathlib import Path
import requests
document_packet_id = "069dcc2c-e14c-7606-8000-2ee4fb17b4e1"
url = f"https://api.anyformat.ai/v3/document-packets/{document_packet_id}/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
packet = requests.get(url, headers=headers).json()
print(packet["status"], packet["latest_run_id"])
downloads = Path("downloads")
downloads.mkdir(exist_ok=True)
for file in packet["files"]:
if file["download_url"]:
# `name` is the name as uploaded: it may hold a path, repeat within a packet, and run to 255
# characters. Its last 50 keep the extension and fit the filesystem's 255-byte limit after the id.
name = Path(file["name"].replace("\\", "/")).name[-50:]
with open(downloads / f"{file['id']}-{name}", "wb") as out:
out.write(requests.get(file["download_url"]).content)
{
"id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e1",
"workflow_id": "0686bb97-8c30-70f0-8000-97669e000eb8",
"name": "contract-bundle",
"status": "processed",
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:05:00.000Z",
"files": [
{
"id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e2",
"name": "contract.pdf",
"content_type": "application/pdf",
"download_url": "https://storage.anyformat.ai/files/069dcc2ce14c760680002ee4fb17b4e2?X-Amz-Signature=...",
"download_url_expires_at": "2026-07-01T13:00:00Z"
},
{
"id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e3",
"name": "annex-a.pdf",
"content_type": "application/pdf",
"download_url": "https://storage.anyformat.ai/files/069dcc2ce14c760680002ee4fb17b4e3?X-Amz-Signature=...",
"download_url_expires_at": "2026-07-01T13:00:00Z"
}
],
"latest_run_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4f9",
"metadata": { "customer_reference": "CR-2026-99001-ZTX" }
}
Rate limit tier: general, 600 requests/min. A read counts as one request plus one per file in the packet, up to your limit. See Rate limits.
Returns one document packet flat: extraction status, timestamps, the files it groups,
latest_run_id, and any metadata supplied at creation.
latest_run_id names the packet’s most recent run, and is null until the packet has run. It is the hop to results: follow it with GET /v3/runs/{run_id}/. The response embeds no run history. List a workflow’s runs with GET /v3/workflows/{workflow_id}/runs/.
Each entry in files carries download_url, a presigned link to the file’s original bytes as uploaded, and content_type. The bytes are never served through the API: download them from download_url before download_url_expires_at, with no Authorization header. Anyone holding download_url can read the file until then, so treat it as you would the file. Every read signs fresh links, so read the packet again rather than storing one. A file whose stored bytes cannot be linked keeps its id and name and answers null in content_type, download_url and download_url_expires_at.
Because every read signs a link per file, poll the run with GET /v3/runs/{run_id}/ to follow its progress, and read the packet when you want its files.
metadata is the free-form JSON object the caller attached on create, and is null when the caller attached none. See Attaching metadata for how it flows through extraction.
An unknown id returns 404, as does a packet belonging to another organization.
curl -X GET 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY'
from pathlib import Path
import requests
document_packet_id = "069dcc2c-e14c-7606-8000-2ee4fb17b4e1"
url = f"https://api.anyformat.ai/v3/document-packets/{document_packet_id}/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
packet = requests.get(url, headers=headers).json()
print(packet["status"], packet["latest_run_id"])
downloads = Path("downloads")
downloads.mkdir(exist_ok=True)
for file in packet["files"]:
if file["download_url"]:
# `name` is the name as uploaded: it may hold a path, repeat within a packet, and run to 255
# characters. Its last 50 keep the extension and fit the filesystem's 255-byte limit after the id.
name = Path(file["name"].replace("\\", "/")).name[-50:]
with open(downloads / f"{file['id']}-{name}", "wb") as out:
out.write(requests.get(file["download_url"]).content)
{
"id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e1",
"workflow_id": "0686bb97-8c30-70f0-8000-97669e000eb8",
"name": "contract-bundle",
"status": "processed",
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:05:00.000Z",
"files": [
{
"id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e2",
"name": "contract.pdf",
"content_type": "application/pdf",
"download_url": "https://storage.anyformat.ai/files/069dcc2ce14c760680002ee4fb17b4e2?X-Amz-Signature=...",
"download_url_expires_at": "2026-07-01T13:00:00Z"
},
{
"id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e3",
"name": "annex-a.pdf",
"content_type": "application/pdf",
"download_url": "https://storage.anyformat.ai/files/069dcc2ce14c760680002ee4fb17b4e3?X-Amz-Signature=...",
"download_url_expires_at": "2026-07-01T13:00:00Z"
}
],
"latest_run_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4f9",
"metadata": { "customer_reference": "CR-2026-99001-ZTX" }
}
Authorizations
Response
Successful Response
A packet with its per-file breakdown and latest run reference.

