Skip to main content

Falai/keys

@webframp/falai/keysv2026.10.21.1· Apache-2.0· 5d agoBEHAVIORS
01README

fal.ai API Keys — key management

02Release Notes

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.

03Behaviors1
@webframp/falai/keysv2026.10.21.1falai/keys.ts

Global Arguments

ArgumentTypeDescription
apiToken?stringfal.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.
fn list_api_keys(limit?: number, cursor?: string, expand?: union)
List API Keys
ArgumentTypeDescription
limit?numberMaximum number of items to return. Actual maximum depends on query type and expansion parameters.
cursor?stringPagination cursor from previous response. Encodes the page number.
expand?unionFields to expand in the response. Available: creator_info (includes creator_nickname and creator_email)
fn create_api_key(alias: string, description?: string, preset?: enum, permissions?: array, expires_at?: string)
Create API Key
ArgumentTypeDescription
aliasstringRequired friendly name for the API key
description?stringOptional description of what the key is for
preset?enumNamed permission preset to apply. Defaults to "API" when neither preset nor p...
permissions?arrayExplicit list of permissions to grant instead of a preset. Mutually exclusive...
expires_at?stringISO8601 timestamp after which the key stops working
fn revoke_api_key(key_id: string)
Revoke API Key
ArgumentTypeDescription
key_idstringUnique identifier of the API key to revoke

Resources

api_keys(infinite)— List API Keys
api_key(infinite)— Create API Key
revoke_api_key(infinite)— Revoke API Key
04Previous Versions6
2026.10.14.3Apache-2.0

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.1Apache-2.0(was none)

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

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

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

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

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.

05Stats
A
100 / 100
Downloads
36
Archive size
15.9 KB
  • 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
06Platforms
07Labels