Upload a public URL
Store the original bytes of a publicly accessible HTTPS file for review or extraction.
Last updated
/api/v1/upload/urlhttps://api.webcite.coURL and file limits
Send a public HTTPS URL, not a local file path or a private chat attachment. The fetch forwards no caller credentials or headers and checks every redirect for unsafe addresses. Private, loopback, link-local, metadata and reserved addresses are refused. The streamed body is limited to 100 MB and the fetch deadline is 30 seconds.
Supported bytes: PDF, PNG, JPEG, WebP, DOCX, PPTX, XLSX, XLSM, XLSB, XLS, ODS, CSV, TSV, TXT and MD. An optional display filename must have an extension matching the fetched bytes. Hosted MCP upload_url uses this workflow; hosted base64 upload_file retains its separate 20 MB limit.
Request
Free. Uploading from a URL costs 0 credits.
Examples run on your server. Set WEBCITE_API_KEY first. Python examples use the requests package.
curl --fail-with-body -X POST 'https://api.webcite.co/api/v1/upload/url' \
-H "x-api-key: $WEBCITE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/report.pdf"
}'Request body
filenamestringDisplay filename. Its extension must match the fetched bytes.
urlstringrequiredPublic HTTPS URL of the file. Fetched server-side with no caller credentials or headers; private, loopback, link-local and metadata addresses are refused on every redirect.
Response
HTTP 200 returns the same body as Upload a file: data.asset_id and data.source_version_id with operation_id, usage.credits and credit_usage. Keep these owned identifiers for later review and extraction.
200 response
application/json
credit_usageobjectThe charge with a snapshot of the account balance.
Show credit_usage fields
credits_remainingnumber | nullrequiredCredits left in the current billing period after this request.
credits_usednumber | nullrequiredCredits this request deducted. Null when the charge was not recorded.
monthly_allocationnumber | nullrequiredCredits the plan grants each billing period.
operation_idstring | nullrequiredThe same identifier as the top-level operation_id.
overage_enabledboolean | nullrequiredWhether the account continues past its allocation on overage billing.
dataobjectrequiredShow data fields
asset_idstringrequiredIdentifier to pass to POST /extract and the other document endpoints.
asset_urlstringrequiredPrivate storage address of the stored bytes. Not a public web address.
filenamestringrequiredThe filename sent with the upload.
sizenumberrequiredSize of the stored file in bytes.
source_version_idstringrequiredImmutable identifier of exactly these bytes.
messagestringrequiredoperation_idstring | nullrequiredIdentifier of this billed operation.
successCodenumberrequiredThe HTTP status repeated in the body.
usageobjectrequiredWhat the upload was charged: 0 credits. Uploading is free.
Show usage fields
creditsnumber | nullrequiredCredits actually deducted; null when a priced operation was not metered. Zero denotes a genuinely free operation.
Errors
400: unsafe or invalid URL or redirect. 413: more than 100 MB. 415: unsupported bytes or filename mismatch. 422: upstream non-2xx or empty body. 504: fetch timeout. An uncertain outcome is not proof that no upload occurred; retain any operation receipt before retrying.
400- URL not allowed (non-https, private address, credentials, bad redirect)
413- File larger than 100 MB
415- Bytes are not a supported format
422- URL returned a non-2xx status or an empty body
504- Fetch timed out