fal.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
New to Corsair? See API access, authentication, and error handling.
Account
billing
account.billing
The account’s credit balance (needs a key with billing read access)
Risk: read
credits full type
credits full type
Files
upload
files.upload
Upload a file to fal storage and get a public URL to pass as a model input
Risk: write
Output
Models
estimateCost
models.estimateCost
Estimate what a number of calls or output units will cost
Risk: read
endpoints full type
endpoints full type
pricing
models.pricing
Unit price of fal models (per image, megapixel, second…)
Risk: read
Output
prices full type
prices full type
run
models.run
Run a model and wait up to waitSeconds (default 10) for its output; spends fal credits. SUCCEEDED and FAILED are final. IN_QUEUE or IN_PROGRESS is a job to follow with queue.status; video, audio and training usually take longer than the wait.
Risk: write
Goes through fal’s queue, so a run that outlasts
waitSeconds is not lost. It answers with the same fields as queue.status. SUCCEEDED and FAILED are final; only IN_QUEUE or IN_PROGRESS need following, with queue.status({ responseUrl }).
Output
logs full type
logs full type
metrics full type
metrics full type
search
models.search
Find fal models by text, category or endpoint id; includeOpenApi returns their input and output fields
Risk: read
Output
models full type
models full type
Queue
cancel
queue.cancel
Cancel a queued request: removed if still waiting, asked to stop if running
Risk: write
Pass
endpointId and requestId, or the responseUrl that queue.submit returned. A request that already finished answers ALREADY_COMPLETED instead of an error.
Output
result
queue.result
The output of a completed queued request
Risk: read
Pass
endpointId and requestId, or the responseUrl that queue.submit returned. Errors with the model’s own error (422 for bad input) when the request failed.
Output: Record<string, any>
status
queue.status
Where a queued request stands. Once done it returns state SUCCEEDED with the output, or FAILED with the error.
Risk: read
Pass
endpointId and requestId, or the responseUrl that queue.submit returned. fal marks failed requests COMPLETED as well, so once it does this reads the result and answers state SUCCEEDED with output, or FAILED with error.
Output
logs full type
logs full type
metrics full type
metrics full type
submit
queue.submit
Queue a model run (image, video, audio, 3D…) and get a request id back at once; spends fal credits. Follow it with queue.status until state is SUCCEEDED or FAILED, or pass webhookUrl.
Risk: write
Output
logs full type
logs full type
metrics full type
metrics full type
Requests
deletePayloads
requests.deletePayloads
Delete a request’s stored input and output payloads and the files it generated on fal’s CDN (files it took as input stay)
Risk: destructive · Irreversible
Needs a full-access fal key; inference-only keys get 403. Deletes the request’s stored input and output payloads and the files it generated, for good. Files the request took as input (uploads, shared URLs) stay on fal’s CDN. A file fal could not delete comes back with a non-null
exception in cdn_delete_results rather than an error, so check each entry.
Output
cdn_delete_results full type
cdn_delete_results full type
list
requests.list
Past requests to given endpoints, with timing and status; optionally their inputs and outputs
Risk: read
Output
items full type
items full type
Usage
billingEvents
usage.billingEvents
Billed requests one by one, with their cost
Risk: read
Needs a fal key with billing read access (the BILLING, READONLY or FULL preset); other keys get 403.
Output
billing_events full type
billing_events full type
get
usage.get
Usage and cost by endpoint over a date range
Risk: read
Needs a fal key with billing read access (the BILLING, READONLY or FULL preset); other keys get 403.
Output
time_series full type
time_series full type
summary full type
summary full type