feat(channel): fal.ai async task channel - #12
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fal.ai async task channel (type 60) with 6x3 pricing matrix for t2i+i2i, queue.fal.run async API, dual-theme frontend, docs.