Image to URL

Turn images into public CDN URLs for AI, OCR, and social workflows

Generated images, screenshots, decoded Base64 sources, and app attachments often fail as private or redirecting links. Upload the image bytes and pass the returned CDN URL, `content_type`, `file_id`, and `expires_at` into the next API.

Reviewed by
GetFileURL technical team
Updated
image to URL APIBase64 source workflowcontent_typeexpires_atAI vision URL
Image handoff
Accepted
png, jpg, webp, gif, screenshots, generated images
Response
url, file_id, content_type, size, expires_at
Headers
200 OK with image/png, image/jpeg, or image/webp
Use in
vision APIs, social posts, OCR, CMS imports
Short answer

What this page answers

It can return public image URLs, but the focus is automation handoff rather than galleries, transformations, or media asset management.

Reviewed by
GetFileURL technical team
Last updated
Handoff

One request in, a URL and JSON out

Request
curl -X POST https://api.getfileurl.com/v1/files \
  -H 'Authorization: Bearer $GETFILEURL_KEY' \
  -F 'file=@image.png' \
  -F 'visibility=public'
Response
{
  "url": "https://cdn.getfileurl.com/f/file_8ks41p/image.png",
  "file_id": "file_8ks41p",
  "content_type": "image/png",
  "expires_at": "2026-06-26T10:30:00.000Z"
}
Workflow fit

Image APIs usually need a raw, reachable image URL.

Generated images and app attachments often live behind temporary links. GetFileURL makes the image reachable for the next automation step with a URL that returns image bytes.

01

AI image workflows

Host generated images long enough to pass the returned URL into moderation, vision, OCR, editing, or publishing APIs.

02

Social publishing

Give social tools a direct image URL instead of a Google Drive or app attachment page.

03

Screenshots and support

Attach screenshots to ticket enrichment, OCR, CRM, or internal review workflows.

Input paths

Upload an image file, or decode a Base64 source before upload.

Use multipart upload when you have image bytes. If an AI tool, webhook, or app API only gives you an encoded string, decode it into a Blob, File, or server buffer first, then upload it as the multipart `file` field.

01

Multipart image

Send `file=@image.png` when your app, worker, or automation step can attach the actual file.

02

Base64 image source

Decode the Base64 string, preserve `filename` and `content_type`, then upload the decoded bytes with the same upload API.

03

Recipe

Use the Base64 image recipe when the source payload is JSON but the final GetFileURL request should still be multipart.

Handling

Preserve image metadata where downstream tools care.

The goal is a URL that behaves like an image file: correct content type, predictable size, no redirect page, and a JSON response your workflow can map.

01

content_type

Keep `image/png`, `image/jpeg`, or `image/webp` visible in the response and delivery headers.

02

expires_at

Use shorter retention for one-time AI jobs and longer retention for published assets.

03

file_id

Use the returned file ID to remove images that only existed for a temporary workflow.

Header proof

Check that the URL returns image bytes, not a preview page.

Before sending an image URL to OCR, AI vision, social, or CMS APIs, verify the public URL returns a successful image response.

01

Status

`curl -I <returned-url>` should return `200 OK` without a sign-in page or redirect chain.

02

Content type

The response should show an image MIME type such as `Content-Type: image/png`.

03

Source links

If a Drive or app link returns HTML, upload the image and pass the GetFileURL URL instead.

AI and OCR proof

Use the returned image URL where the next API asks for an image URL.

Vision and OCR APIs commonly accept either an uploaded file, a public image URL, or provider-specific Base64 input. GetFileURL is the URL handoff layer: it makes the image reachable and keeps cleanup metadata beside the job.

01

Vision APIs

Pass the returned `url` into image analysis or moderation calls that accept public image URLs.

02

OCR APIs

Use the returned image URL for OCR tools that fetch the image server-side, then keep `file_id` for cleanup.

03

Base64 sources

When the source gives Base64 but the destination wants a URL, decode first, upload the bytes, and map the returned URL.

Examples

Copy the same upload shape into code

curl -X POST https://api.getfileurl.com/v1/files \
  -H 'Authorization: Bearer $GETFILEURL_KEY' \
  -F 'file=@image.png' \
  -F 'visibility=public'
FAQ

Common questions

Is this an image hosting product?

It can return public image URLs, but the focus is automation handoff rather than galleries, transformations, or media asset management.

Why not use a Google Drive image link?

Drive links often return sharing pages, redirects, or permission behavior. Many APIs need the image bytes at the URL directly.

Can I use this for AI-generated images?

Yes. Upload the generated image file, or decode a Base64 image source and upload the bytes, then pass the returned CDN URL into the next vision, editing, or publishing step.