capabilities.work

Upload Asset Then Run Inference

A 4-step recipe with fal. We can help you get access.

Recipe · 4 steps

Upload Asset Then Run Inference

with fal · Artificial Intelligence Management
Works with AI assistants

Register an input asset on the fal CDN and feed its URL into a model.

  1. Request a short-lived signed upload URL and the public CDN file_url for the asset. The client PUTs the file bytes to upload_url out of band before the asset can be referenced by a model.
  2. Submit an inference request that references the uploaded asset by its CDN file_url as the model's image_url input.
  3. Poll the request status until the job reaches a terminal COMPLETED state, re-entering itself while still IN_QUEUE or IN_PROGRESS.
  4. Retrieve the final inference output for the completed request.
What you'll need to have ready
  • contentType: MIME type of the asset being uploaded (e.g. "image/png").
  • fileName: Original file name used to derive the CDN object name.
  • modelOwner: Owning organization of the model (e.g. "fal-ai").
  • modelName: Model identifier (e.g. "flux/dev/image-to-image").
  • prompt: Natural-language prompt describing the desired output.
For your developer

Arazzo workflow fal-ai:upload-then-inference, 4 operations: initiateUpload → submitRequest → getRequestStatus → getRequestResult. Specs on APIs.io.