How to send PNG binary files to Fal.ai?

Hi everyone,
I’m building a workflow in n8n and need to send three PNG files to Fal.ai:

  • source image
  • mask image
  • reference image
    All files are available in n8n as binary data.
    I’m not sure what is the correct way to pass them to Fal.ai.
    Should I:
  • upload the files first and send public URLs?
  • convert the binary data to Base64?
  • use multipart/form-data in the HTTP Request node?
  • use another approach?
    If anyone has an example of a working n8n workflow or HTTP Request configuration for Fal.ai image inputs, I would really appreciate it.
    Thanks!

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi, for Fal.ai I would not send the PNG binaries directly to the model request.

The safest approach is:

  1. Upload the images first, or store them somewhere public/presigned.
  2. Get URLs for the source image, mask image, and reference image.
  3. Send those URLs in the Fal.ai JSON request.

Fal’s docs say model file inputs are normally URLs. Some models also accept data:image/png;base64,..., but this is not recommended for larger files because it makes the request much bigger.

In n8n, the final Fal.ai request should usually be JSON, for example:

{
  "image_url": "SOURCE_IMAGE_URL",
  "mask_url": "MASK_IMAGE_URL",
  "reference_image_url": "REFERENCE_IMAGE_URL"
}

The exact field names depend on the Fal.ai model you are using, so it is best to copy the JSON example from that model’s API page.

Useful references:

For storage, you can use any service that gives you a direct public URL or a presigned URL to the PNG file.

Good options are:

  • Cloudinary: good for images, returns an image URL after upload.
  • Supabase Storage: good if you already use Supabase. You can use a public bucket or signed URL.
  • AWS S3: upload the image and create a presigned URL.
  • Cloudflare R2: similar to S3, can use public buckets or signed URLs.
  • Google Cloud Storage: also works if the file URL is public or signed.

I would avoid normal Google Drive sharing links unless you convert them into a direct file URL. Fal.ai needs a URL that the model runner can download directly, without login, cookies, or extra authorization headers.

So the flow can be:

n8n binary image → upload to Cloudinary/Supabase/S3/R2 → get URL → send URL to Fal.ai JSON request

Example JSON:

{
  "image_url": "https://res.cloudinary.com/your-cloud/image/upload/source.png",
  "mask_url": "https://your-project.supabase.co/storage/v1/object/public/images/mask.png",
  "reference_image_url": "https://your-bucket.s3.amazonaws.com/reference.png?signature=..."
}

Useful refs: Fal CDN docs, Cloudinary uploads, Supabase Storage serving files, AWS S3 presigned URLs, Cloudflare R2 public buckets.

1 Like