fal-platform
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesefal.ai Platform
fal.ai平台
Platform APIs for model management, pricing, usage tracking, and cost estimation.
平台API,用于模型管理、定价、使用跟踪和成本估算。
Scripts
脚本
| Script | Purpose |
|---|---|
| Setup FAL_KEY and configuration |
| Get model pricing information |
| Check usage and billing |
| Estimate costs for operations |
| List and manage requests |
| 脚本 | 用途 |
|---|---|
| 设置FAL_KEY及配置 |
| 获取模型定价信息 |
| 查看使用情况与账单 |
| 估算操作成本 |
| 列出并管理请求 |
Setup & Configuration
设置与配置
Add FAL_KEY
添加FAL_KEY
bash
undefinedbash
undefinedInteractive setup
交互式设置
bash /mnt/skills/user/fal-platform/scripts/setup.sh --add-fal-key
bash /mnt/skills/user/fal-platform/scripts/setup.sh --add-fal-key
Set key directly
直接设置密钥
bash /mnt/skills/user/fal-platform/scripts/setup.sh --add-fal-key "your_key_here"
bash /mnt/skills/user/fal-platform/scripts/setup.sh --add-fal-key "your_key_here"
Show current config
显示当前配置
bash /mnt/skills/user/fal-platform/scripts/setup.sh --show-config
This adds FAL_KEY to your `.env` file for persistent use.bash /mnt/skills/user/fal-platform/scripts/setup.sh --show-config
这会将FAL_KEY添加到你的`.env`文件中,以便持久使用。Model Pricing
模型定价
Get pricing for any model:
bash
undefined获取任意模型的定价:
bash
undefinedSingle model pricing
单个模型定价
bash /mnt/skills/user/fal-platform/scripts/pricing.sh --model "fal-ai/flux/dev"
bash /mnt/skills/user/fal-platform/scripts/pricing.sh --model "fal-ai/flux/dev"
Multiple models
多个模型
bash /mnt/skills/user/fal-platform/scripts/pricing.sh --model "fal-ai/flux/dev,fal-ai/kling-video/v2.1/pro"
bash /mnt/skills/user/fal-platform/scripts/pricing.sh --model "fal-ai/flux/dev,fal-ai/kling-video/v2.1/pro"
All pricing for a category
某一分类的所有定价
bash /mnt/skills/user/fal-platform/scripts/pricing.sh --category "text-to-image"
**Output:**fal-ai/flux/dev
Price: $0.025 per image
Unit: image
fal-ai/kling-video/v2.1/pro
Price: $0.50 per second
Unit: video_second
undefinedbash /mnt/skills/user/fal-platform/scripts/pricing.sh --category "text-to-image"
**输出:**fal-ai/flux/dev
Price: $0.025 per image
Unit: image
fal-ai/kling-video/v2.1/pro
Price: $0.50 per second
Unit: video_second
undefinedUsage Tracking
使用情况跟踪
Check your usage and spending:
bash
undefined查看你的使用情况与支出:
bash
undefinedCurrent period usage
当前周期使用情况
bash /mnt/skills/user/fal-platform/scripts/usage.sh
bash /mnt/skills/user/fal-platform/scripts/usage.sh
Filter by model
按模型筛选
bash /mnt/skills/user/fal-platform/scripts/usage.sh --model "fal-ai/flux/dev"
bash /mnt/skills/user/fal-platform/scripts/usage.sh --model "fal-ai/flux/dev"
Date range
日期范围
bash /mnt/skills/user/fal-platform/scripts/usage.sh --start "2024-01-01" --end "2024-01-31"
bash /mnt/skills/user/fal-platform/scripts/usage.sh --start "2024-01-01" --end "2024-01-31"
Specific timeframe
指定时间范围
bash /mnt/skills/user/fal-platform/scripts/usage.sh --timeframe "day"
**Timeframes:** `minute`, `hour`, `day`, `week`, `month`bash /mnt/skills/user/fal-platform/scripts/usage.sh --timeframe "day"
**时间范围选项:** `minute`, `hour`, `day`, `week`, `month`Estimate Cost
成本估算
Estimate costs before running:
bash
undefined在运行前估算成本:
bash
undefinedEstimate by API calls (historical pricing)
根据API调用次数估算(基于历史定价)
bash /mnt/skills/user/fal-platform/scripts/estimate-cost.sh
--model "fal-ai/flux/dev"
--calls 100
--model "fal-ai/flux/dev"
--calls 100
bash /mnt/skills/user/fal-platform/scripts/estimate-cost.sh
--model "fal-ai/flux/dev"
--calls 100
--model "fal-ai/flux/dev"
--calls 100
Estimate by units
根据使用单位估算
bash /mnt/skills/user/fal-platform/scripts/estimate-cost.sh
--model "fal-ai/kling-video/v2.1/pro"
--units 60
--type "unit_price"
--model "fal-ai/kling-video/v2.1/pro"
--units 60
--type "unit_price"
**Output:**Cost Estimate for fal-ai/flux/dev
Quantity: 100 calls
Estimated Cost: $2.50
undefinedbash /mnt/skills/user/fal-platform/scripts/estimate-cost.sh
--model "fal-ai/kling-video/v2.1/pro"
--units 60
--type "unit_price"
--model "fal-ai/kling-video/v2.1/pro"
--units 60
--type "unit_price"
**输出:**Cost Estimate for fal-ai/flux/dev
Quantity: 100 calls
Estimated Cost: $2.50
undefinedRequest Management
请求管理
List and manage requests:
bash
undefined列出并管理请求:
bash
undefinedList recent requests
列出近期请求
bash /mnt/skills/user/fal-platform/scripts/requests.sh --model "fal-ai/flux/dev" --limit 10
bash /mnt/skills/user/fal-platform/scripts/requests.sh --model "fal-ai/flux/dev" --limit 10
Delete request payloads (cleanup)
删除请求负载(清理)
bash /mnt/skills/user/fal-platform/scripts/requests.sh --delete "request_id_here"
undefinedbash /mnt/skills/user/fal-platform/scripts/requests.sh --delete "request_id_here"
undefinedAPI Endpoints Reference
API端点参考
| Operation | Endpoint | Method |
|---|---|---|
| Model Search | | GET |
| Pricing | | GET |
| Usage | | GET |
| List Requests | | GET |
| Delete Payloads | | DELETE |
Base URL:
https://api.fal.ai/v1| 操作 | 端点 | 请求方法 |
|---|---|---|
| 模型搜索 | | GET |
| 定价查询 | | GET |
| 使用情况查询 | | GET |
| 列出请求 | | GET |
| 删除负载 | | DELETE |
基础URL:
https://api.fal.ai/v1Common Flags (All Scripts)
通用参数(所有脚本)
All scripts support these common flags:
bash
--add-fal-key [KEY] # Add/update FAL_KEY in .env
--help, -h # Show help
--json # Output raw JSON
--quiet, -q # Suppress status messages所有脚本均支持以下通用参数:
bash
--add-fal-key [KEY] # 在.env中添加/更新FAL_KEY
--help, -h # 显示帮助信息
--json # 输出原始JSON格式
--quiet, -q # 隐藏状态消息Troubleshooting
故障排除
API Key Required
需要API密钥
Error: FAL_KEY required for this operation
Run: bash /mnt/skills/user/fal-platform/scripts/setup.sh --add-fal-keyError: FAL_KEY required for this operation
Run: bash /mnt/skills/user/fal-platform/scripts/setup.sh --add-fal-keyPermission Denied
权限不足
Error: API key doesn't have permission for this operation
Some operations require admin API keys. Check your key permissions at:
https://fal.ai/dashboard/keysError: API key doesn't have permission for this operation
Some operations require admin API keys. Check your key permissions at:
https://fal.ai/dashboard/keys