Workflow recipe

Host an AI-generated image long enough for the next APIURL

The file starts as AI image output. Upload image with short retention. Map image url for the next ai or social api to the next step and keep the file ID beside the run for cleanup.

Reviewed by
GetFileURL technical team
Updated
AI imagesimage URLvision APIsocial24h expiry
Recipe shape
Input
AI image output
Action
Upload image with short retention
Output
Image URL for the next AI or social API
Short answer

What this page answers

It turns a file already inside a workflow into a direct public URL that another API can fetch.

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=@workflow-output.pdf' \
  -F 'visibility=public'
Response
{
  "file_id": "file_8ks41p",
  "url": "https://cdn.getfileurl.com/f/file_8ks41p/workflow-output.pdf",
  "content_type": "application/pdf",
  "expires_at": "2026-05-29T10:30:00Z"
}
Steps

Make the file handoff visible.

A useful recipe shows four things: file in, upload request, returned URL, and cleanup handle.

01

Capture the file

Start from AI image output and keep the original content type when possible.

02

Upload and parse JSON

Keep the upload response visible as workflow data, not hidden inside a side effect.

03

Send onward

Pass the returned URL to image url for the next ai or social api and store the file ID for cleanup.

Checks

Validate the URL before the destination retries.

Most automation file issues are caused by a URL that looks fine in a browser but fails from a server-side API call.

01

Direct response

The URL should return file bytes, not an app preview, permission page, or redirect loop.

02

Useful headers

Content type, size, and disposition should match what the destination expects.

03

Enough retention

Expiry should account for queue delays, async processing, and retry branches.

Examples

Copy the same upload shape into code

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

Common questions

What does this recipe solve?

It turns a file already inside a workflow into a direct public URL that another API can fetch.

Should the URL be permanent?

Not by default. Use the shortest retention window that gives the destination enough time to fetch the file.

What should I log?

Log the returned URL, file ID, content type, size, expiry, and destination response status.