curl -X POST 'https://api.anyformat.ai/v3/parse/from-url/' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com/invoices/april.pdf"}'
import requests
url = "https://api.anyformat.ai/v3/parse/from-url/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
body = {"url": "https://example.com/invoices/april.pdf"}
triggered = requests.post(url, headers=headers, json=body).json()
print(triggered["run_id"])
{
"run_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4fa",
"document_packet_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e1",
"workflow_id": "0686bb97-8c30-70f0-8000-97669e000eb8",
"status": "queued"
}
{
"error": "The request failed validation.",
"detail": [{ "type": "value_error", "loc": ["body"], "msg": "Remote server returned 404" }],
"error_code": "VALIDATION_ERROR",
"retryable": false,
"request_id": "a1b2c3d4e5f67890abcdef1234567890"
}
Parse
Parse a Document from a URL
Parse one document fetched from a URL with the platform’s fast lite parse
POST
/
v3
/
parse
/
from-url
/
curl -X POST 'https://api.anyformat.ai/v3/parse/from-url/' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com/invoices/april.pdf"}'
import requests
url = "https://api.anyformat.ai/v3/parse/from-url/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
body = {"url": "https://example.com/invoices/april.pdf"}
triggered = requests.post(url, headers=headers, json=body).json()
print(triggered["run_id"])
{
"run_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4fa",
"document_packet_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e1",
"workflow_id": "0686bb97-8c30-70f0-8000-97669e000eb8",
"status": "queued"
}
{
"error": "The request failed validation.",
"detail": [{ "type": "value_error", "loc": ["body"], "msg": "Remote server returned 404" }],
"error_code": "VALIDATION_ERROR",
"retryable": false,
"request_id": "a1b2c3d4e5f67890abcdef1234567890"
}
Rate limit tier: submission, 60 requests/min. See Rate limits.
The platform fetches one document server-side from a URL and parses it with the fast lite parse. This endpoint is the URL analogue of
GCS offers the same override through
POST /v3/parse/. It runs on your organization’s system parse workflow, which the platform provisions on first use.
Provide one HTTPS URL. The response’s Content-Disposition names the file, and the URL’s path names it otherwise. See File names. The response references a run. Poll GET /v3/runs/{run_id}/ until status is processed. The parsed markdown sits at results.parse.markdown. A failed, non-2xx, or timed-out fetch returns 400 VALIDATION_ERROR with the reason in the detail list.
The results envelope carries the first file’s parse output. To import several URLs into one packet, use upload from URL and document-packets/run directly.
File names
The response names a from-url file, not the request. The name matters twice. It carries the extension the import requires, and a URL whose path is an opaque key carries none. It is also the name you and your users see wherever the file is listed. The precedence is:- The
Content-Dispositionfilename on the response, per 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 import fails with
400VALIDATION_ERROR.
urls in length and order. On S3, ResponseContentDisposition signs it in:
boto3
import boto3
s3 = boto3.client("s3")
url = s3.generate_presigned_url(
"get_object",
Params={
"Bucket": "my-bucket",
"Key": "uploads/7c1f3e9a",
"ResponseContentDisposition": 'attachment; filename="april-invoice.pdf"',
},
ExpiresIn=900,
)
response-content-disposition on a V4 signed URL, and Azure through rscd on a SAS.
Whichever name applies must end in a supported extension, such as .pdf, .docx or .png. A bare key such as uploads/7c1f3e9a names the file 7c1f3e9a, which has no extension, so the import fails with 400 VALIDATION_ERROR. A name that collides with a file already in the parse workflow is renamed: april.pdf becomes april (1).pdf.
curl -X POST 'https://api.anyformat.ai/v3/parse/from-url/' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com/invoices/april.pdf"}'
import requests
url = "https://api.anyformat.ai/v3/parse/from-url/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
body = {"url": "https://example.com/invoices/april.pdf"}
triggered = requests.post(url, headers=headers, json=body).json()
print(triggered["run_id"])
{
"run_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4fa",
"document_packet_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e1",
"workflow_id": "0686bb97-8c30-70f0-8000-97669e000eb8",
"status": "queued"
}
{
"error": "The request failed validation.",
"detail": [{ "type": "value_error", "loc": ["body"], "msg": "Remote server returned 404" }],
"error_code": "VALIDATION_ERROR",
"retryable": false,
"request_id": "a1b2c3d4e5f67890abcdef1234567890"
}
Authorizations
Body
application/json
Body for POST /v3/parse/from-url/.
The document arrives one of two ways: a fetchable HTTPS url, or the
object_id of a file staged via POST /v3/blobs/slots/ — the id is a
few characters where the staged file's presigned read_url is kilobytes,
so an id-carrying caller (an MCP agent spending a context window) never has
to round-trip the long URL.
Response
Successful Response
202 response for the parse triggers (parse/ and parse/from-url/).
The workflow run triggers use WorkflowRunTriggeredV3.

