Turn Base64 file payloads into direct URLs
Use GetFileURL when a webhook, AI model, form tool, or API gives you Base64 content but the next service needs a public HTTPS file URL.
Base64 needs a filename and content type to become a useful URL.
A raw encoded string does not tell the next API what the file is. Send the encoded content with filename, content type, expiry, and metadata.
filename
Provide the extension and human-readable name the destination should see.
content_type
Set the MIME type so OCR, AI, document, or publishing APIs do not reject the URL.
base64
Send only the encoded file content, not a preview page or data URI wrapper unless the API explicitly accepts it.
Use Base64 input when the source system cannot send multipart files.
Multipart is usually better for large files. Base64 is useful when a source API or automation tool exposes the file only as a string.
AI image outputs
Convert generated image strings into public image URLs for moderation, editing, or publishing.
Webhook payloads
Handle small encoded files from webhooks that do not support multipart transfer.
Form and API bridges
Turn encoded attachments into a URL field that downstream systems can fetch.
Validate the encoded file before blaming the destination API.
The URL can only be as useful as the decoded file. Bad padding, wrong MIME type, or missing filename metadata will surface later as fetch failures.
Wrong MIME type
If a PNG is labeled as text, image and social APIs may reject it.
Large payload
Base64 adds overhead. Use multipart upload for larger files or platform limits that reject large JSON bodies.
Data URI prefix
Strip or handle prefixes such as `data:image/png;base64,` according to the final API contract.
Copy the same upload shape into code or workflow steps
Use the same endpoint from a shell, backend route, worker, or automation code step. Upload the file, set expiry, then map the returned URL.
JSON payload
upload examplecurl -X POST https://api.getfileurl.com/v1/files \
-H 'Authorization: Bearer $GETFILEURL_KEY' \
-H 'Content-Type: application/json' \
-d '{
"filename": "image.png",
"content_type": "image/png",
"expires_in": "24h",
"base64": "iVBORw0KGgoAAA..."
}'JavaScript
upload exampleconst res = await fetch("https://api.getfileurl.com/v1/files", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GETFILEURL_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
filename: "image.png",
content_type: "image/png",
expires_in: "24h",
base64,
}),
});
const { url, file_id } = await res.json();
return { url, file_id };Answers before the workflow breaks
When should I use Base64 instead of multipart upload?
Use Base64 when the source tool only gives you an encoded string. Use multipart upload when you have the file bytes available.
What fields are needed to convert Base64 to a URL?
Send the Base64 content plus filename, content type, and optional expiry or metadata so the returned URL behaves like the original file.
Is Base64 good for large files?
Usually no. Base64 increases payload size and can hit JSON limits. Prefer multipart upload for larger files.