Upload from URL
Create a document packet by importing 1–10 HTTPS URLs server-side, all-or-nothing
Content-Disposition, else by the URL’s path — see File names.
Each fetch is bounded by a 10-second timeout and a 20 MB per-file cap. A failed, non-2xx, or timed-out fetch surfaces as 422 with the distinct failure reasons in detail. URLs resolving to non-globally-routable addresses (loopback, private ranges, link-local, cloud-metadata) are refused before any connection opens.
The response is final — the packet is fully imported when you receive 201. If the server-side import takes longer than the gateway’s 6-minute polling ceiling, the request fails with a 504 (retryable: true); it is safe to retry with the same request body. Trigger extraction with POST /v3/document-packets/{document_packet_id}/run/.
on_conflict body field:error(default) — if a file’s name matches a file already in the workflow, the request fails with409once the fetches settle, listing the conflict and its suggested rename.rename— the file is auto-renamed server-side (april.pdf→april (1).pdf). Each returnednameis then the name it was actually stored under, andoriginal_nameholds the name it was fetched under.
metadata body field. Optional; a JSON object stapled to the packet. Echoed back on GET /v3/document-packets/{document_packet_id}/; a top-level key whose name matches an extract-schema field is surfaced to the LLM and used as the extracted value. See Attaching metadata for the full contract.File names
A from-url file is named from the response, not from the request. The name matters twice: it carries the extension the import requires (a URL whose path is an opaque key, such as a presigned object GET, has none), and it is the name you and your users see everywhere the file is listed, so a file called by its storage key is a poor experience. Precedence:- The
Content-Dispositionfilename on the response (RFC 6266;filename*=UTF-8''…wins overfilename=, and any path is cut to its last segment). - Else the URL path’s last segment:
https://example.com/invoices/april.pdfimports asapril.pdf. - Else the slot mint’s extension error, as today: the import fails with
422.
urls in length and order. On S3, ResponseContentDisposition signs it in:
response-content-disposition on a V4 signed URL) and Azure (rscd on a SAS) offer the same override.
Whichever name applies must end in a supported extension (.pdf, .docx, .png, …): a bare key such as uploads/7c1f3e9a names the file 7c1f3e9a, which has none, and the import fails with 422. The on_conflict policy applies to this name; on a rename, original_name in the response holds it.
Authorizations
API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.
Path Parameters
Body
Body for POST /v3/workflows/{workflow_id}/upload/from-url/.
Every URL imports into a single packet atomically — any fetch or validation failure means nothing is persisted.
HTTPS URLs the backend fetches server-side (1..10). The filename is derived from each URL's path.
1 - 10 elementsFree-form JSON to attach to the packet. No schema is enforced; the extract operator may source datapoints from a top-level key whose name matches a schema field.
How to handle an uploaded filename that already exists in the workflow (filenames are unique within a workflow). error (the default) rejects the whole request with 409 and lists the conflicting names, so a rename is never silent — the caller must opt in. rename accepts the collision and lets the server auto-rename the file by inserting a (n) counter before the extension (invoice.pdf → invoice (1).pdf).
error, rename Response
Successful Response
Response for the packet-creating uploads (multipart and from-url).
Unique identifier of the newly created document packet (hyphenated UUID).
"069dcc2c-e14c-7606-8000-2ee4fb17b4e1"
The workflow the packet was created under (hyphenated UUID).
"0686bb97-8c30-70f0-8000-97669e000eb8"
Files in the packet, in the order they were provided.

