Falai/keys
fal.ai API Keys — key management
2026.10.21.1
Changed: create_api_key now keeps the new key. The one-time key_secret
and the combined key were previously dropped before the api_key resource was
written, so the secret fal.ai returns only once was lost. Both fields are now
marked sensitive in the resource schema: swamp stores each value in a vault and
the resource holds a vault.get(...) reference in its place.
Changed: The README, the apiToken description and the missing-key error
now direct you to store the fal.ai API key in a vault
(swamp vault put falai API_KEY) and wire it with
--global-arg 'apiToken=${{ vault.get("falai", "API_KEY") }}'. The FAL_KEY
environment variable is still read as a fallback, but it is not redacted and is
not recommended.
Upgrade note: Because the model now declares sensitive output, swamp refuses
to run any of its methods (list_api_keys, create_api_key and
revoke_api_key) until a vault exists; create one with
swamp vault create local_encryption falai. create_api_key is refused before
any key is created. Stored resources need no migration.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| apiToken? | string | fal.ai API key. Wire it with ${{ vault.get("falai", "API_KEY") }}; never pass the literal value. The FAL_KEY environment variable is read as a fallback, but it is not redacted and is not recommended. |
| Argument | Type | Description |
|---|---|---|
| limit? | number | Maximum number of items to return. Actual maximum depends on query type and expansion parameters. |
| cursor? | string | Pagination cursor from previous response. Encodes the page number. |
| expand? | union | Fields to expand in the response. Available: creator_info (includes creator_nickname and creator_email) |
| Argument | Type | Description |
|---|---|---|
| alias | string | Required friendly name for the API key |
| description? | string | Optional description of what the key is for |
| preset? | enum | Named permission preset to apply. Defaults to "API" when neither preset nor p... |
| permissions? | array | Explicit list of permissions to grant instead of a preset. Mutually exclusive... |
| expires_at? | string | ISO8601 timestamp after which the key stops working |
| Argument | Type | Description |
|---|---|---|
| key_id | string | Unique identifier of the API key to revoke |
Resources
2026.10.14.3
Changed (breaking): delete_api_key is removed. The fal.ai API now revokes
keys with POST /keys/{key_id}/revoke, and the generated method is
revoke_api_key, which takes the same key_id argument. Revoking is a
different operation from deleting: the API may keep a revoked key in listings.
The model keeps no delete_api_key alias. Workflows and scripts that call
delete_api_key must switch to revoke_api_key.
Fixed: revoke_api_key writes the API response to a revoke_api_key
resource keyed by key_id, so revoking several keys keeps a record of each
instead of overwriting one -current instance. The resource schema keeps the
fields the API returns rather than storing an empty object. delete_api_key
wrote no data.
Added: create_api_key accepts optional description, preset
(FULL, AGENT, API, DEPLOY, READONLY, BILLING, COMPUTE,
SERVERLESS; the API defaults to API), permissions (an explicit list, used
instead of a preset), and expires_at (ISO8601). The model does not enforce
that preset and permissions are exclusive; the API decides. Listed keys now
report description, mode, preset, permissions, and expires_at, and
scope may be ADMIN in addition to API.
Upgrade note: The new key fields are optional, so stored resources remain valid and the model's upgrade chain gains identity steps. Only the method rename needs action.
Modified 1 behaviors
2026.10.14.1
Added: The manifest now declares license: Apache-2.0 (SPDX). The registry quality rubric scores a declared license separately from the bundled LICENSE.md.
Upgrade note: Metadata only. No code, schema, or behavioral changes.
2026.10.07.1
Fixed: A stalled fal.ai request no longer hangs the method. Every request now has a 60-second deadline that covers the response body, and a timeout raises an error naming the HTTP method and URL.
Fixed: An empty 2xx response body (such as a 202 or 204) is handled
explicitly. Paginated list calls treat it as an empty page instead of failing
with a bare SyntaxError. Methods that must return data (get, create, update,
and unpaginated list) raise an error naming the HTTP method and path instead of
failing later with a TypeError. Delete and action methods still accept an
empty body. A malformed JSON body now raises an error that names the HTTP
method, path, and status code.
Changed: A Retry-After header on a 429 response is capped at 30 seconds
per retry, so a large value can no longer stall a call for minutes. Retry count
is unchanged.
No methods, arguments, or resource schemas changed. Apart from the hardening above, behavior is the same as the previous version.
2026.09.18.1
Upgrade note: Normalized npm:zod dependency version to 4.6.5 across the
repo. No behavioral changes in this extension.
2026.09.17.1
Response schema fields are now generated as optional/nullable-optional regardless of the spec's required list, so reading a resource stored under an older model version no longer throws Required when the live API adds a new required field. No API surface change for this extension.
2026.09.15.1
Changed: Bump zod 4.4.3 → 4.6.5
2026.09.10.4
Fixed:
- Resource instance names for get/update methods with two or more path
parameters (e.g.
get_app_queue_info(owner, name),get_workflow(username, workflow_name)) were built by joining raw values with"_". Two distinct owner/name pairs that split differently around an underscore (e.g."john"/"doe_app"and"john_doe"/"app") produced the identical instance name and collided. Multi-param instance names are now derived from a hash of the JSON-encoded parameter tuple, which delimits each part unambiguously.
Upgrade note: No schema changes. All fixes are internal to method execution; existing stored resources are unaffected.
2026.09.10.4
Fixed:
- Resource instance names for get/update methods with two or more path
parameters (e.g.
get_app_queue_info(owner, name),get_workflow(username, workflow_name)) were built by joining raw values with"_". Two distinct owner/name pairs that split differently around an underscore (e.g."john"/"doe_app"and"john_doe"/"app") produced the identical instance name and collided. Multi-param instance names are now derived from a hash of the JSON-encoded parameter tuple, which delimits each part unambiguously.
Upgrade note: No schema changes. All fixes are internal to method execution; existing stored resources are unaffected.
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned