ai
fal.ai CLI for Coding Agents
Use the fal.ai CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 5 read 2 write API key auth
fal.ai CLI for Coding Agents
Let coding agents discover schemas and execute integration functions through CLI commands or MCP.
Use this pattern when another coding agent needs exact commands and schema discovery. The fal.ai CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# fal.ai CLI for Coding Agents
kosmokrator integrations:configure fal --set api_key="$FAL_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call fal.fal_list_models '{}' --json Discovery Before Execution
Agents and scripts can inspect fal.ai docs and schemas before choosing a function.
kosmo integrations:docs fal --json
kosmo integrations:docs fal.fal_list_models --json
kosmo integrations:schema fal.fal_list_models --json
kosmo integrations:search "fal.ai" --json
kosmo integrations:list --json Useful fal.ai CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
fal.fal_list_models | Read | none | List available fal.ai models. Returns model IDs, descriptions, and capabilities. |
fal.fal_submit_request | Write | model_id, input, webhook_url | Submit a generation request to a fal.ai model. Returns the request ID for tracking. Poll get_request_status for progress. |
fal.fal_get_request_status | Read | model_id, request_id | Get the status of a submitted fal.ai request. Returns queue position and processing state. |
fal.fal_get_result | Read | model_id, request_id | Get the result of a completed fal.ai request. Returns generated media URLs and metadata. |
fal.fal_list_files | Read | none | List files stored in fal.ai storage. Returns file names, URLs, and metadata. |
fal.fal_upload_file | Write | file_path, file_name | Upload a file to fal.ai storage for use as model input. Returns the file URL. |
fal.fal_get_current_user | Read | none | Get current fal.ai user profile and account information. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.