POST request to /api/v1/generations. Your job is dispatched asynchronously to fal.ai, and the output is saved directly to the vault you specify once processing completes. This guide covers every major generation scenario with complete, ready-to-run curl examples.
Generate an image
Send aPOST /api/v1/generations request with generationType: "image" and a fal.ai modelId. The request requires the prompts:write scope. The example below uses Recraft v4.1:
202 Accepted to confirm your job is queued:
42 once the fal.ai job completes. Use the statusUrl from the response to check progress.
Generate a video
UsegenerationType: "video" and a video-capable fal.ai endpoint. Everything else works the same as an image generation:
statusUrl to check progress, or wait for the asset to appear in your vault.
Image-to-image
To use an existing image as the base for a new generation, provide its URL in theimageInput field. For models that accept multiple inputs, use imageInputs (up to 7 URLs):
Single input:
Batch generation
SetbatchCount to generate multiple variations from the same prompt in one job. Accepted values are 1 through 4:
Saving to a specific vault
Supply an integervaultId in your request to direct the output to a particular vault. If you omit vaultId, the output is saved to your General vault — the system vault created automatically for every account:
GET /api/v1/prompts?vaultId=99.
Tracking the generation
The202 Accepted response includes a statusUrl you can poll to check the state of your job:
statusUrl until the job reaches a terminal state, or simply wait for the generated asset to appear in your vault.
Next steps
- Need to upload reference images before generating? See the Upload Images guide.
- Learn how outputs are organized in Vaults.

