Guides
Migrating from fal
Map an integration written for fal's queue API onto Minu's Task API. Each call and its equivalent, the result and the webhook, and what has no equivalent.
Minu does not serve fal's routes and does not work with fal's client libraries. Moving an integration over means rewriting the few calls that talk to the API: submit, status, result and the webhook handler. This page maps each of them onto Minu's Task API and says, just as plainly, what has no equivalent.
What this page says about fal's API is taken from fal's public documentation as it stood on 3 December 2026.
At a glance
| fal | Minu | |
|---|---|---|
| Base URL | https://queue.fal.run | https://api.minu.ai |
| Key | Authorization: Key $FAL_KEY | Authorization: Bearer $MINU_API_KEY |
| Which model | In the URL: POST /{owner}/{app} | In the body: "model" |
| The model's parameters | The JSON body itself | The input object of the body |
| Submit | POST /{owner}/{app} | POST /v1/tasks |
| ID of the request | request_id | id, starting with task_ |
| Status | GET /{owner}/{app}/requests/{request_id}/status | GET /v1/tasks/{id} |
| Result | GET /{owner}/{app}/requests/{request_id} | The same call: outputs on the task |
| Cancel | PUT /{owner}/{app}/requests/{request_id}/cancel | POST /v1/tasks/{id}/cancel |
| Webhook | The query parameter fal_webhook | callback_url in the body, or an endpoint set up in the console |
| Upload a file | fal.storage.upload, fal_client.upload_file | POST /v1/files |
| Client library | @fal-ai/client, fal-client | None. Plain HTTP |
Before you switch
- Create a Minu account, top up, and create an API key. Minu bills in US dollars from a prepaid balance and charges a task for the results it delivered.
- Check that the models you use are in the catalog, and compare their parameters with the ones you send today. The model reference lists them.
- If you receive webhooks, create a signing secret in the console under Webhooks.
Submit a request
The model moves from the URL into the body, and the parameters move one level down, into input:
# Before
curl -X POST https://queue.fal.run/fal-ai/nano-banana-2 \
-H "Authorization: Key $FAL_KEY" \
-H "Content-Type: application/json" \
-d '{ "prompt": "A paper boat on a rain puddle", "aspect_ratio": "16:9" }'
# After
curl https://api.minu.ai/v1/tasks \
-H "Authorization: Bearer $MINU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana-2",
"input": { "prompt": "A paper boat on a rain puddle", "aspect_ratio": "16:9" }
}'fal answers with request_id and three URLs: status_url, response_url and cancel_url. Minu answers with the task object: its id, "status": "queued" and estimated_cost_usd, the amount reserved for it. There are no URLs to store; every later call is built from the id.
Two things to know when you rewrite this call:
- The request is checked before it is accepted. A parameter the model does not list, or a value it does not take, is refused at once with
400 invalid_request, andparamnames the field. Nothing is ignored silently. - A retry can be made safe. Send an
Idempotency-Keyheader and a repeated request returns the task you already created.
In place of subscribe
fal.subscribe and fal_client.subscribe submit a request and wait for its result. Minu has no client library, so that becomes a small function of your own: create the task, read it until its status is final, return it.
const API = 'https://api.minu.ai';
const headers = {
Authorization: `Bearer ${process.env.MINU_API_KEY}`,
'Content-Type': 'application/json',
};
const FINAL = new Set(['succeeded', 'partially_succeeded', 'failed', 'canceled', 'expired']);
async function call(path, init) {
const response = await fetch(`${API}${path}`, { ...init, headers });
const body = await response.json();
if (!response.ok) throw new Error(`${response.status} ${body.error?.code}: ${body.error?.message}`);
return body;
}
/** Creates a task, waits for it to end and returns it. */
export async function runTask(model, input) {
let task = await call('/v1/tasks', { method: 'POST', body: JSON.stringify({ model, input }) });
while (!FINAL.has(task.status)) {
await new Promise((resolve) => setTimeout(resolve, 3000));
task = await call(`/v1/tasks/${task.id}`);
}
if (task.outputs.length === 0) throw new Error(`${task.status} ${task.error?.code}: ${task.error?.message}`);
return task;
}
// Before:
// const result = await fal.subscribe('fal-ai/nano-banana-2', { input: { prompt } });
// const url = result.data.images[0].url;
const task = await runTask('google/nano-banana-2', { prompt: 'A paper boat on a rain puddle' });
const url = task.outputs[0].url;import os
import time
import requests
API = "https://api.minu.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['MINU_API_KEY']}"}
FINAL = {"succeeded", "partially_succeeded", "failed", "canceled", "expired"}
def call(method: str, path: str, **kwargs) -> dict:
response = requests.request(method, f"{API}{path}", headers=HEADERS, timeout=30, **kwargs)
body = response.json()
if not response.ok:
raise RuntimeError(f"{response.status_code} {body['error']['code']}: {body['error']['message']}")
return body
def run_task(model: str, input: dict) -> dict:
"""Creates a task, waits for it to end and returns it."""
task = call("POST", "/v1/tasks", json={"model": model, "input": input})
while task["status"] not in FINAL:
time.sleep(3)
task = call("GET", f"/v1/tasks/{task['id']}")
if not task["outputs"]:
error = task.get("error") or {}
raise RuntimeError(f"{task['status']} {error.get('code')}: {error.get('message')}")
return task
# Before:
# result = fal_client.subscribe("fal-ai/nano-banana-2", arguments={"prompt": prompt})
# url = result["images"][0]["url"]
task = run_task("google/nano-banana-2", {"prompt": "A paper boat on a rain puddle"})
url = task["outputs"][0]["url"]Every read of a task counts against the rate limit of 20 requests per 10 seconds. With many tasks in flight, use a webhook instead of a loop.
Status
One call returns both the status and, once the task has ended, the result. There is no separate result URL.
fal status | Minu status |
|---|---|
IN_QUEUE | queued |
IN_PROGRESS | running, finalizing |
COMPLETED, without error | succeeded, partially_succeeded |
COMPLETED, with error | failed, expired |
| A canceled request | canceled |
At fal, COMPLETED covers a request that failed, and the error field tells the two apart. At Minu the status itself says how the task ended, and error holds a code and a message when it did not succeed. Write the loop against the five final statuses, as the function above does: the API can report other in-progress values, such as preparing.
partially_succeeded has no counterpart at fal. It means that some of the results you asked for were delivered, for example three images of four, and that you are charged for those only.
The result
At fal the shape of the result depends on the model: an image model returns images, a video model returns video. At Minu every task model returns the same list, outputs:
"outputs": [
{ "index": 0, "type": "image", "url": "https://…", "mime": "image/png", "bytes": 1482113 }
]| fal | Minu |
|---|---|
images[0].url | outputs[0].url |
video.url | outputs[0].url |
content_type | mime |
file_size | bytes |
file_name, width, height | Not part of an output. Read them from the file. |
Result files are served from Minu's storage and are kept for 14 days by default; an owner or an admin can set the period between 1 and 30 days in the console. Copy what you need to keep.
Model IDs and parameters
fal addresses a model by an endpoint ID in the URL, and often gives one model several endpoints: one to generate, one to edit, one for text to video, one for image to video. At Minu a model has one ID. Whether a request generates or edits is decided by what you send: reference images go in image_urls on the same model.
These are the fal endpoints of three image models and the Minu model that takes their place:
| fal endpoint | Minu model |
|---|---|
fal-ai/nano-banana-2, fal-ai/nano-banana-2/edit | google/nano-banana-2 |
fal-ai/nano-banana-pro, fal-ai/nano-banana-pro/edit | google/nano-banana-pro |
openai/gpt-image-2, openai/gpt-image-2/edit | openai/gpt-image-2 |
For every other model, look it up in the catalog. A model that is not there cannot be called.
Parameter names are often the same, but each model's list is its own. The common ones:
| fal parameter | At Minu |
|---|---|
prompt | prompt |
image_urls on an /edit endpoint | image_urls on the model itself |
num_images | n, on the models that list it. On the others, create one task per image. |
aspect_ratio | aspect_ratio, with the values the model lists |
image_size, as a name such as landscape_4_3 or as a width and a height | aspect_ratio and resolution |
resolution | resolution, on the models that list it |
output_format | output_format, on the models that list it |
seed | seed, on the models that list it |
duration as a string, such as "8" | duration as a number of seconds |
generate_audio | generate_audio, on the models that list it |
quality, sync_mode, safety_tolerance, enable_web_search | No equivalent. Leave them out. |
Files
At fal you upload a local file with fal.storage.upload or fal_client.upload_file and pass the URL you get back. Minu works the same way with one HTTP call: POST /v1/files with a multipart form returns a url to put in the task's input.
curl https://api.minu.ai/v1/files \
-H "Authorization: Bearer $MINU_API_KEY" \
-F file=@product.jpg- A file that is already at a public
httpsURL needs no upload. Pass that URL. - An upload is one file of at most 30 MB: an image, a video or an audio file.
- An input is always an
httpsURL. Adata:URI is refused.
Webhooks
At fal the webhook URL is the query parameter fal_webhook of the submit call. At Minu it is the field callback_url in the body of POST /v1/tasks. You can also set up an endpoint once in the console and receive the events of every task; see Webhooks.
The delivery has another shape:
| fal delivery | Minu delivery |
|---|---|
request_id | data.id |
status: "OK" | type: "task.succeeded" or "task.partially_succeeded" |
status: "ERROR" | type: "task.failed", "task.expired" or "task.canceled" |
payload, the model's result | data.outputs; data is the whole task object |
error | data.error.code and data.error.message |
The signature changes as well, so the verification code has to be replaced, not adjusted:
| fal | Minu | |
|---|---|---|
| Headers | X-Fal-Webhook-Request-Id, X-Fal-Webhook-User-Id, X-Fal-Webhook-Timestamp, X-Fal-Webhook-Signature | minu-webhook-id, minu-webhook-timestamp, minu-signature |
| Signature | Ed25519, checked against public keys fetched from fal | HMAC-SHA256 with your organization's signing secret |
| Signed text | The request ID, the user ID, the timestamp and the SHA-256 of the body | id.timestamp.body |
Verify the signature has the code for Node.js and Python. Answer each delivery with a 2xx status within 10 seconds. One that fails is retried on a fixed schedule: eight attempts over about 33 hours.
Errors
Minu uses HTTP statuses with one error shape, { "error": { "code", "message", "param" } }. Branch on code. The full list is in Errors and rate limits.
| At fal | At Minu |
|---|---|
422 with a detail list of loc, msg and type | 400 invalid_request. param names the field. |
422 with the type content_policy_violation | 400 content_blocked on the request, or a task that ends failed with the error code content_blocked. Not charged. |
401 | 401 invalid_api_key or key_revoked |
403 | 403 model_not_allowed, ip_not_allowed or organization_suspended |
A request that failed while running: COMPLETED with error | A task that ends failed or expired. Not charged. |
Three answers your code may not handle yet:
402 insufficient_balance: the available balance does not cover the task. No task is created.429 rate_limited: more than 20 requests in 10 seconds. TheRetry-Afterheader says how long to wait.429 queue_full: tasks beyond your concurrency limit wait in a queue, as they do at fal, but the queue is bounded. When too many of your tasks are waiting, new ones are refused until some have ended.
What has no equivalent
| At fal | At Minu |
|---|---|
The client libraries @fal-ai/client and fal-client | None. You call the HTTP API directly, as on this page. |
Synchronous requests: fal.run, https://fal.run/… | Not offered for images, video and music. Every generation is a task. Chat, transcription and speech are synchronous, through the OpenAI-compatible API. |
Streaming: the status stream, fal.stream | Not offered. Poll the task or use a webhook. |
queue_position, logs, metrics | Not returned. A task has created_at, started_at and completed_at. |
A first frame for a video: image_url and end_image_url on an image-to-video endpoint | No equivalent. Images sent with a video request are reference images of people or objects the video should keep, not its first or last frame. |
| Canceling a request that is running | Only a task that is still queued can be canceled. Once started, it runs to its end, and the call answers 409 not_cancelable. |
Inputs as data: URIs | Refused. Upload the file, or pass an https URL. |
The headers X-Fal-Store-IO and X-Fal-Object-Lifecycle-Preference | Ignored. How long files are kept is a setting of the organization, in the console. |
| Your own models and apps, and compute by the hour | Not offered. Minu serves the models in its catalog. |
| Models that are not in Minu's catalog | Refused with 404 model_not_found. |
Check your migration
- Create one task per model you use, with a real prompt and the parameters your application sends.
- Read each task until it ends, and confirm that your code finds the files in
outputs. - Send a request you expect to be refused, such as an aspect ratio the model does not list, and confirm that your code reads
error.code. - If you use webhooks, confirm that a delivery arrives and that your signature check passes with the Minu signing secret.
- Open Logs in the console and check the cost of each task. It is on the task as well, as
cost_usd.