Skip to content

feat(channel): fal.ai async task channel - #12

Merged
Fankouzu merged 7 commits into
mainfrom
feat/fal-ai-channel
May 8, 2026
Merged

Fankouzu merged 7 commits into
mainfrom
feat/fal-ai-channel

Conversation

@Fankouzu

@Fankouzu Fankouzu commented May 8, 2026

Copy link
Copy Markdown
Owner

fal.ai async task channel (type 60) with 6x3 pricing matrix for t2i+i2i, queue.fal.run async API, dual-theme frontend, docs.

Fankouzu added 7 commits May 5, 2026 20:06
Clone KIE channel pattern for fal.ai integration:
- constants.go: model list (openai/gpt-image-2 t2i/edit),
  quality ratio weights (low/medium/high)
- adaptor.go: async task adaptor with dynamic URL
  {baseURL}/{model_name}, EstimateBilling by quality,
  result polling via {model}/requests/{id}
- constant/channel.go: ChannelTypeFalAI=60
- relay/relay_adaptor.go: GetTaskAdaptor wiring
- web: channel icon from lobehub
…ssic themes

- Classic theme: add Fal.ai entry to channel.constants.js and getChannelIcon() in render.jsx
- Default theme: update label from FalAI to Fal.ai in constants.ts
- Icon: https://icons.lobehub.com/components/fal
… channel icon

- Classic theme: import Fal from @lobehub/icons/es/Fal (not in barrel export)
- Use <Fal.Color size={iconSize} /> instead of <img> tag
- Display label: Fal.ai
Replace hardcoded quality ratios (1/9/35 for t2i, 1/4/15 for i2i)
with 18-entry size×quality matrices based on fal.ai actual pricing.

- constants.go: pricingMatrix (t2i) + pricingMatrixEdit (i2i)
- adaptor.go: EstimateBilling uses size+quality to look up multiplier
- channel.go: DefaultBaseURL → queue.fal.run

All multipliers relative to base: 1024×1024 low t2i = $0.006 = 1×
ModelPrice of 0.042 (≈USD base × 7) gives 0% deviation across all 6 sizes × 3 qualities.
Includes API reference, parameter defaults, billing explanation,
and 36-entry pricing table (18 t2i + 18 i2i) in RMB.
@Fankouzu
Fankouzu merged commit be21cff into main May 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant