页面简介
Add a request for a model endpoint path to the queue. Use this operation when the model ID has more than two segments, for example blackforestlabs/flux-3-max/text-to-video. The response contains the request ID and the URLs for status, result, and cancellation. The queue keeps the request until a runner is available. The queue has no size limit unless you send fal_max_queue_length.
正文摘录
POST/{owner}/{app}/{path}Try itSubmit a request to an endpoint pathcURLcurl --request POST \ --url https://queue.fal.run/{owner}/{app}/{path} \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "prompt": "a red fox in the snow" } '200400401403404429500{ "status": "IN_QUEUE", "request_id": "019a1b2c-3d4e-7f80-9a1b-2c3d4e5f6a7b", "response_url": "https://queue.fal.run/blackforestlabs/flux-3-max/requests/019a1b2c-3d4e-7f80-9a1b-2c3d4e5f6a7b", "status_url": "https://queue.fal.run/blackforestlabs/flux-3-max/requests/019a1b2c-3d4e-7f80-9a1b-2c3d4e5f6a7b/status", "cancel_url": "https://queue.fal.run/blackforestlabs/flux-3-max/requests/019a1b2c-3d4e-7f80-9a1b-2c3d4e5f6a7b/cancel", "queue_position": 0, "logs": null, "metrics": {} }AuthorizationsAuthorizationstringheaderrequiredSend your fal API key in the Authorization header with the Key prefix, for example Authorization: Key $FAL_KEY. Public models also accept requests without a key. See Authentication.HeadersX-Fal-Request-Start-TimeoutnumberThe maximum time in seconds for the request to start on a runner. The time starts when fal receives the request and includes queue time and retries. The value must be greater than 0.1. If the request does not start in this time, the API returns 504 with X-Fal-Request-Timeout-Type: user. This header does not limit the run time on the runner. There is no default.X-Fal-Request-TimeoutnumberDeprecated. Use X-Fal-Request-Start-Timeout. If you send both headers, the API uses X-Fal-Request-Start-Timeout.X-Fal-Queue-Priorityenum<string>The queue priority for this request. The default is normal. Use low for background work. This header can only lower the priority of your account. It cannot raise it. The API ignores values that it does not recognize.Available options: normal, low X-Fal-Runner-HintstringA routing hint. fal tries to send requests with the same hint to the same runner. Use it when a runner keeps state in memory, for example a loaded LoRA.X-Fal-No-Retryenum<string>Set to 1, true, or yes to turn off automatic retries for this queue request. See Reliability.Available options: 1, true, yes X-Fal-Retry-ConfigstringA JSON object that sets the number of retries for each retry condition. The keys are timeout, connection_error, and server_error. Each value is {"retries": N}, where N is from 0 to 10. The API uses this header only when you own the app.X-Fal-Store-IOstringControls if fal stores the request and response payloads. Set to 0 to turn off storage. Set to 1 to store the payloads for the default period. If you do not send this header, fal uses your account setting.X-Fal-Object-Lifecycle-PreferencestringA JSON object that sets the expiration and access rules for the files that the model creates. See Platform Headers.x-app-fal-disable-fallbackenum<string>Set to true to ask the model app not to send the request to a fallback model. fal forwards this header to the app.Available options: true Path ParametersownerstringrequiredThe owner of the model, for example blackforestlabs.appstringrequiredThe model app name, for example flux-3-max.pathstringrequiredThe endpoint path inside the app. For the model ID blackforestlabs/flux-3-max/text-to-video, the owner is blackforestlabs, the app is flux-3-max, and the path is text-to-video. The path can contain more than one segment.Query Parametersfal_webhookstring<uri>An http or https URL. fal sends a POST request to this URL when the request completes. See Webhooks.fal_max_queue_lengthintegerThe maximum number of queued requests. If the queue for this endpoint already has this number of requests, the API rejects the request with 429.Bodyapplication/jsonThe model input. Each model has its own input schema. See the model page in the Model API Reference.Response200application/jsonThe request is in the queue.The state of a queue request.statusenum<string>requiredCOMPLETED is the final state. A failed or cancelled request also has the status COMPLETED.Available options: IN_QUEUE, IN_PROGRESS, COMPLETED request_idstringrequiredresponse_urlstring<uri> | nullThe URL of the result.status_urlstring<uri> | nullcancel_urlstring<uri> | nullqueue_positionintegerThe number of requests in front of this request. Present only when the status is IN_QUEUE.logsobject[] | nullThe runner logs. The value is null unless you send logs=1.Hide child attributeslogs.messagestringrequiredlogs.timestampstring<date-time>requiredlogs.labelsobjectmetricsobjectPresent when the status is COMPLETED. Empty in other states.Hide child attributesmetrics.inference_timenumberThe run time on the runner, in seconds.errorstringThe error message. Present only when the request failed.error_typestringThe error category. Present only when the request failed. See Request Error Types.Was this page helpful?YesNo⌘ISubmit a request to an endpoint pathcURLcurl --request POST \ --url https://queue.fal.run/{owner}/{app}/{path} \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "prompt": "a red fox in the snow" } '200400401403404429500{ "status": "IN_QUEUE", "request_id": "019a1b2c-3d4e-7f80-9a1b-2c3d4e5f6a7b", "response_url": "https://queue.fal.run/blackforestlabs/flux-3-max/requests/019a1b2c-3d4e-7f80-9a1b-2c3d4e5f6a7b", "status_url": "https://queue.fal.run/blackforestlabs/flux-3-max/requests/019a1b2c-3d4e-7f80-9a1b-2c3d4e5f6a7b/status", "cancel_url": "https://queue.fal.run/blackforestlabs/flux-3-max/requests/019a1b2c-3d4e-7f80-9a1b-2c3d4e5f6a7b/cancel", "queue_position": 0, "logs": null, "metrics": {} }