@henjicc/ai-sdk 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +275 -211
- package/README.md +580 -577
- package/dist/capabilities/speech-recognition/bailian/module.js +40 -26
- package/dist/capabilities/speech-recognition/bailian/parse.js +9 -2
- package/dist/capabilities/speech-recognition/bailian/presets.d.ts +9 -1
- package/dist/capabilities/speech-recognition/bailian/presets.js +7 -2
- package/dist/capabilities/speech-recognition/bailian/realtime/presets.d.ts +2 -1
- package/dist/capabilities/speech-recognition/bailian/realtime/presets.js +2 -0
- package/dist/capabilities/speech-recognition/bailian/types.d.ts +2 -0
- package/dist/capabilities/speech-recognition/bailian/upload.js +11 -58
- package/dist/capabilities/speech-recognition/index.d.ts +5 -0
- package/dist/capabilities/speech-recognition/siliconflow/presets.d.ts +2 -3
- package/dist/capabilities/speech-recognition/siliconflow/presets.js +0 -2
- package/dist/capabilities/translation/bailian/types.d.ts +3 -0
- package/dist/capabilities/translation/bailian/types.js +6 -4
- package/dist/catalog/apimart/flux-3-image.model.d.ts +3 -0
- package/dist/catalog/apimart/flux-3-image.model.js +62 -0
- package/dist/catalog/apimart/flux-3-video.model.d.ts +3 -0
- package/dist/catalog/apimart/flux-3-video.model.js +120 -0
- package/dist/catalog/apimart/gemini-omni-1.2-flash.model.d.ts +3 -0
- package/dist/catalog/apimart/gemini-omni-1.2-flash.model.js +175 -0
- package/dist/catalog/apimart/gemini-omni-flash.model.js +30 -37
- package/dist/catalog/apimart/gpt-image-2.5.model.js +1 -1
- package/dist/catalog/apimart/gpt-image-2.6.model.d.ts +3 -0
- package/dist/catalog/apimart/gpt-image-2.6.model.js +103 -0
- package/dist/catalog/apimart/gpt-image-2.model.js +1 -1
- package/dist/catalog/apimart/grok-imagine-2.0.model.js +1 -1
- package/dist/catalog/apimart/grok-imagine-video-1.5.model.d.ts +3 -0
- package/dist/catalog/apimart/grok-imagine-video-1.5.model.js +85 -0
- package/dist/catalog/apimart/happyhorse-1.1.model.d.ts +3 -0
- package/dist/catalog/apimart/happyhorse-1.1.model.js +78 -0
- package/dist/catalog/apimart/kling-3.0-omni.model.js +12 -2
- package/dist/catalog/apimart/kling-3.0-turbo.model.js +5 -2
- package/dist/catalog/apimart/kling-3.0.model.js +1 -1
- package/dist/catalog/apimart/kling-4.0.model.d.ts +3 -0
- package/dist/catalog/apimart/kling-4.0.model.js +149 -0
- package/dist/catalog/apimart/midjourney-video.model.js +31 -32
- package/dist/catalog/apimart/midjourney.model.js +11 -1
- package/dist/catalog/apimart/minimax-h3-max.model.d.ts +3 -0
- package/dist/catalog/apimart/minimax-h3-max.model.js +101 -0
- package/dist/catalog/apimart/minimax-h3.model.js +8 -3
- package/dist/catalog/apimart/nano-banana-2-lite.model.js +1 -1
- package/dist/catalog/apimart/nano-banana-2.1.model.d.ts +2 -0
- package/dist/catalog/apimart/nano-banana-2.1.model.js +49 -0
- package/dist/catalog/apimart/nano-banana-2.model.js +1 -1
- package/dist/catalog/apimart/nano-banana-pro.model.js +1 -1
- package/dist/catalog/apimart/qwen-image-3.0.model.js +1 -1
- package/dist/catalog/apimart/seedance-2.0-fast.model.js +1 -1
- package/dist/catalog/apimart/seedance-2.0-mini.model.js +4 -4
- package/dist/catalog/apimart/seedance-2.0.model.js +1 -1
- package/dist/catalog/apimart/seedance-2.5.model.js +27 -5
- package/dist/catalog/apimart/seedream-5.0-flash.model.d.ts +3 -0
- package/dist/catalog/apimart/seedream-5.0-flash.model.js +52 -0
- package/dist/catalog/apimart/seedream-5.0-lite.model.js +4 -4
- package/dist/catalog/apimart/seedream-5.0-pro.model.js +1 -1
- package/dist/catalog/apimart/veo-3.1.model.d.ts +3 -0
- package/dist/catalog/apimart/veo-3.1.model.js +132 -0
- package/dist/catalog/apimart/wan-2.7-image.model.d.ts +3 -0
- package/dist/catalog/apimart/wan-2.7-image.model.js +80 -0
- package/dist/catalog/apimart/wan-3.0.model.d.ts +3 -0
- package/dist/catalog/apimart/wan-3.0.model.js +101 -0
- package/dist/catalog/apimart/z-image-turbo.model.js +1 -1
- package/dist/catalog/audio/tts-common.d.ts +2 -1
- package/dist/catalog/audio/tts-common.js +5 -1
- package/dist/catalog/bailian/cosyvoice-v3.5.model.js +1 -1
- package/dist/catalog/bailian/minimax-h3.model.d.ts +3 -0
- package/dist/catalog/bailian/minimax-h3.model.js +95 -0
- package/dist/catalog/bailian/minimax-speech-2.8.model.js +1 -1
- package/dist/catalog/bailian/qwen-audio-3.1-tts-flash.model.js +14 -3
- package/dist/catalog/bailian/qwen-audio-3.1-tts-plus.model.d.ts +2 -0
- package/dist/catalog/bailian/qwen-audio-3.1-tts-plus.model.js +44 -0
- package/dist/catalog/bailian/qwen-image-3.0.model.js +1 -1
- package/dist/catalog/bailian/wan-3.0.model.d.ts +3 -0
- package/dist/catalog/bailian/wan-3.0.model.js +104 -0
- package/dist/catalog/bailian/z-image-turbo.model.js +1 -1
- package/dist/catalog/consumer-contract.d.ts +16 -1
- package/dist/catalog/consumer-contract.js +31 -0
- package/dist/catalog/continuation.d.ts +20 -0
- package/dist/catalog/continuation.js +41 -0
- package/dist/catalog/fal/bria-creative-upscale.model.js +1 -1
- package/dist/catalog/fal/eleven-v3-tts.model.js +1 -1
- package/dist/catalog/fal/eleven-v4-tts.model.d.ts +2 -0
- package/dist/catalog/fal/eleven-v4-tts.model.js +38 -0
- package/dist/catalog/fal/flux-3-video.model.d.ts +2 -0
- package/dist/catalog/fal/flux-3-video.model.js +187 -0
- package/dist/catalog/fal/flux-3.model.d.ts +2 -0
- package/dist/catalog/fal/flux-3.model.js +69 -0
- package/dist/catalog/fal/gemini-omni-1.2-flash.model.d.ts +2 -0
- package/dist/catalog/fal/gemini-omni-1.2-flash.model.js +129 -0
- package/dist/catalog/fal/gemini-omni-flash.model.js +1 -1
- package/dist/catalog/fal/gpt-image-2.5.model.js +1 -1
- package/dist/catalog/fal/gpt-image-2.6.model.d.ts +2 -0
- package/dist/catalog/fal/gpt-image-2.6.model.js +97 -0
- package/dist/catalog/fal/gpt-image-2.model.js +1 -1
- package/dist/catalog/fal/grok-imagine-2.0.model.js +1 -1
- package/dist/catalog/fal/grok-imagine-video-1.5.model.d.ts +2 -0
- package/dist/catalog/fal/grok-imagine-video-1.5.model.js +121 -0
- package/dist/catalog/fal/hailuo-02.model.js +8 -4
- package/dist/catalog/fal/hailuo-2.3.model.js +1 -1
- package/dist/catalog/fal/ic-light-v2.model.js +1 -1
- package/dist/catalog/fal/ideogram-upscale.model.js +1 -1
- package/dist/catalog/fal/kling-3.0-omni.model.js +1 -1
- package/dist/catalog/fal/kling-3.0-turbo.model.js +5 -2
- package/dist/catalog/fal/kling-3.0.model.js +4 -1
- package/dist/catalog/fal/kling-4.0-flash.model.d.ts +2 -0
- package/dist/catalog/fal/kling-4.0-flash.model.js +132 -0
- package/dist/catalog/fal/kling-4.0.model.d.ts +2 -0
- package/dist/catalog/fal/kling-4.0.model.js +169 -0
- package/dist/catalog/fal/kling-image-o1.model.js +1 -1
- package/dist/catalog/fal/kling-video-o1.model.js +18 -7
- package/dist/catalog/fal/kling-video-v2.6-pro.model.js +3 -2
- package/dist/catalog/fal/ltx-2.3.model.d.ts +2 -0
- package/dist/catalog/fal/ltx-2.3.model.js +223 -0
- package/dist/catalog/fal/ltx-2.model.js +2 -1
- package/dist/catalog/fal/minimax-h3-max.model.d.ts +2 -0
- package/dist/catalog/fal/minimax-h3-max.model.js +132 -0
- package/dist/catalog/fal/minimax-h3.model.js +3 -4
- package/dist/catalog/fal/minimax-speech-2.8.model.js +1 -1
- package/dist/catalog/fal/nano-banana-2.1.model.d.ts +2 -0
- package/dist/catalog/fal/nano-banana-2.1.model.js +68 -0
- package/dist/catalog/fal/nano-banana-2.model.js +1 -1
- package/dist/catalog/fal/nano-banana-pro.model.js +1 -1
- package/dist/catalog/fal/nano-banana.model.js +1 -1
- package/dist/catalog/fal/pixverse-v5.5.model.js +9 -4
- package/dist/catalog/fal/qwen-image-3.0.model.js +2 -2
- package/dist/catalog/fal/qwen3-tts-1.7b.model.js +4 -3
- package/dist/catalog/fal/seedance-2.0-fast.model.js +1 -1
- package/dist/catalog/fal/seedance-2.0-mini.model.js +1 -1
- package/dist/catalog/fal/seedance-2.0.model.js +1 -1
- package/dist/catalog/fal/seedance-2.5.model.js +5 -2
- package/dist/catalog/fal/seedance.model.js +3 -2
- package/dist/catalog/fal/seedream-5.0-lite.model.js +1 -1
- package/dist/catalog/fal/seedream-5.0-pro.model.js +1 -1
- package/dist/catalog/fal/seedream-v4.5.model.js +1 -1
- package/dist/catalog/fal/seedream-v4.model.js +1 -1
- package/dist/catalog/fal/seedvr2-image-upscale.model.js +1 -1
- package/dist/catalog/fal/topaz-image-upscale.model.js +1 -1
- package/dist/catalog/fal/topaz-transparent-upscale.model.js +1 -1
- package/dist/catalog/fal/utils/klingV4.d.ts +17 -0
- package/dist/catalog/fal/utils/klingV4.js +33 -0
- package/dist/catalog/fal/veo-3.1.model.js +5 -2
- package/dist/catalog/fal/vidu-q2.model.js +20 -8
- package/dist/catalog/fal/wan-2.5-preview.model.js +4 -1
- package/dist/catalog/fal/wan-3.0.model.d.ts +2 -0
- package/dist/catalog/fal/wan-3.0.model.js +135 -0
- package/dist/catalog/fal/z-image-turbo.model.js +10 -9
- package/dist/catalog/grsai/gpt-image-2.5.model.js +13 -31
- package/dist/catalog/grsai/gpt-image-2.6.model.d.ts +2 -0
- package/dist/catalog/grsai/gpt-image-2.6.model.js +37 -0
- package/dist/catalog/grsai/gpt-image-2.model.js +5 -2
- package/dist/catalog/grsai/nano-banana-2-lite.model.js +1 -1
- package/dist/catalog/grsai/nano-banana-2.1.model.d.ts +2 -0
- package/dist/catalog/grsai/nano-banana-2.1.model.js +29 -0
- package/dist/catalog/grsai/nano-banana-2.model.js +1 -1
- package/dist/catalog/grsai/nano-banana-pro.model.js +1 -1
- package/dist/catalog/grsai/wan-3.0.model.d.ts +2 -0
- package/dist/catalog/grsai/wan-3.0.model.js +78 -0
- package/dist/catalog/index.d.ts +1 -0
- package/dist/catalog/index.js +205 -124
- package/dist/catalog/kie/eleven-v3-dialogue.model.js +1 -1
- package/dist/catalog/kie/flux-3-klein.model.d.ts +2 -0
- package/dist/catalog/kie/flux-3-klein.model.js +58 -0
- package/dist/catalog/kie/gemini-3.1-flash-tts.model.js +7 -4
- package/dist/catalog/kie/gemini-3.8-flash-lite-tts.model.d.ts +2 -0
- package/dist/catalog/kie/gemini-3.8-flash-lite-tts.model.js +11 -0
- package/dist/catalog/kie/gemini-3.8-flash-tts.model.d.ts +2 -0
- package/dist/catalog/kie/gemini-3.8-flash-tts.model.js +11 -0
- package/dist/catalog/kie/gemini-omni-video.model.js +8 -30
- package/dist/catalog/kie/gemini38Tts.d.ts +3 -0
- package/dist/catalog/kie/gemini38Tts.js +40 -0
- package/dist/catalog/kie/gpt-image-2.5.model.js +1 -1
- package/dist/catalog/kie/gpt-image-2.6.model.d.ts +2 -0
- package/dist/catalog/kie/gpt-image-2.6.model.js +87 -0
- package/dist/catalog/kie/gpt-image-2.model.js +8 -12
- package/dist/catalog/kie/grok-imagine-2.0.model.js +1 -1
- package/dist/catalog/kie/grok-imagine-video-1.5.model.d.ts +2 -0
- package/dist/catalog/kie/grok-imagine-video-1.5.model.js +52 -0
- package/dist/catalog/kie/grok-imagine-video.model.js +7 -3
- package/dist/catalog/kie/grok-imagine.model.js +4 -2
- package/dist/catalog/kie/hailuo-02.model.js +6 -4
- package/dist/catalog/kie/hailuo-2-3.model.js +1 -1
- package/dist/catalog/kie/happyhorse-1.1.model.js +5 -2
- package/dist/catalog/kie/kling-3.0-omni.model.js +51 -23
- package/dist/catalog/kie/kling-3.0-turbo.model.js +1 -1
- package/dist/catalog/kie/kling-3.0.model.js +1 -8
- package/dist/catalog/kie/kling-4.0-flash.model.d.ts +2 -0
- package/dist/catalog/kie/kling-4.0-flash.model.js +16 -0
- package/dist/catalog/kie/kling-4.0.model.d.ts +2 -0
- package/dist/catalog/kie/kling-4.0.model.js +17 -0
- package/dist/catalog/kie/kling-v2-6.model.js +1 -1
- package/dist/catalog/kie/kling40.d.ts +21 -0
- package/dist/catalog/kie/kling40.js +129 -0
- package/dist/catalog/kie/minimax-h3.model.js +16 -21
- package/dist/catalog/kie/nano-banana-2-lite.model.js +1 -1
- package/dist/catalog/kie/nano-banana-2.1.model.d.ts +2 -0
- package/dist/catalog/kie/nano-banana-2.1.model.js +34 -0
- package/dist/catalog/kie/nano-banana-2.model.js +2 -2
- package/dist/catalog/kie/nano-banana-pro.model.js +1 -1
- package/dist/catalog/kie/qwen-image-3.0.model.js +2 -10
- package/dist/catalog/kie/seedance-1.5-pro.model.js +2 -1
- package/dist/catalog/kie/seedance-2.0-fast.model.js +5 -1
- package/dist/catalog/kie/seedance-2.0-mini.model.js +5 -1
- package/dist/catalog/kie/seedance-2.0.model.js +5 -1
- package/dist/catalog/kie/seedance-2.5.model.js +10 -20
- package/dist/catalog/kie/seedance-v1.model.js +8 -4
- package/dist/catalog/kie/seedream-4.0.model.js +1 -1
- package/dist/catalog/kie/seedream-4.5.model.js +1 -1
- package/dist/catalog/kie/seedream-5.0-lite.model.js +1 -1
- package/dist/catalog/kie/seedream-5.0-pro.model.js +1 -1
- package/dist/catalog/kie/wan-3.0-prime.model.d.ts +2 -0
- package/dist/catalog/kie/wan-3.0-prime.model.js +15 -0
- package/dist/catalog/kie/wan-3.0.model.d.ts +2 -0
- package/dist/catalog/kie/wan-3.0.model.js +15 -0
- package/dist/catalog/kie/wan30.d.ts +10 -0
- package/dist/catalog/kie/wan30.js +78 -0
- package/dist/catalog/kie/z-image.model.js +1 -1
- package/dist/catalog/modelscope/flux-1-krea-dev.model.js +4 -2
- package/dist/catalog/modelscope/majicmix-realistic.model.js +3 -2
- package/dist/catalog/modelscope/modelscope-custom.model.js +3 -2
- package/dist/catalog/modelscope/qwen-image-2512.model.d.ts +5 -0
- package/dist/catalog/modelscope/{qwen-image.model.js → qwen-image-2512.model.js} +11 -8
- package/dist/catalog/modelscope/qwen-image-edit-2511.model.d.ts +5 -0
- package/dist/catalog/modelscope/{qwen-image-edit-2509.model.js → qwen-image-edit-2511.model.js} +9 -7
- package/dist/catalog/modelscope/sdxl-14-ckpt.model.js +3 -2
- package/dist/catalog/modelscope/utils.js +2 -2
- package/dist/catalog/modelscope/z-image-turbo.model.js +3 -2
- package/dist/catalog/ppio/kling-3.0.model.js +4 -1
- package/dist/catalog/ppio/minimax-speech.model.js +2 -1
- package/dist/catalog/shared/mediaPresence.d.ts +8 -1
- package/dist/catalog/shared/mediaPresence.js +21 -1
- package/dist/catalog/shared/nanoBanana21.d.ts +11 -0
- package/dist/catalog/shared/nanoBanana21.js +30 -0
- package/dist/catalog/shared/shotList.d.ts +31 -0
- package/dist/catalog/shared/shotList.js +48 -0
- package/dist/catalog/shared/subjectElements.d.ts +36 -0
- package/dist/catalog/shared/subjectElements.js +93 -0
- package/dist/catalog/siliconflow/moss-ttsd-0.5.model.js +1 -1
- package/dist/catalog/validate.js +14 -1
- package/dist/catalog/volcengine/seedance-2.0-fast.model.d.ts +2 -0
- package/dist/catalog/volcengine/seedance-2.0-fast.model.js +11 -0
- package/dist/catalog/volcengine/seedance-2.0-mini.model.d.ts +2 -0
- package/dist/catalog/volcengine/seedance-2.0-mini.model.js +11 -0
- package/dist/catalog/volcengine/seedance-2.0.model.d.ts +2 -0
- package/dist/catalog/volcengine/seedance-2.0.model.js +11 -0
- package/dist/catalog/volcengine/seedance-2.5.model.d.ts +2 -0
- package/dist/catalog/volcengine/seedance-2.5.model.js +11 -0
- package/dist/catalog/volcengine/seedance.d.ts +17 -0
- package/dist/catalog/volcengine/seedance.js +192 -0
- package/dist/catalog/volcengine/seedream-5.0-lite.model.js +2 -1
- package/dist/catalog/volcengine/seedream-5.0.js +1 -1
- package/dist/catalog/volcengine-speech/seed-icl-2.0.model.d.ts +1 -0
- package/dist/catalog/volcengine-speech/seed-icl-2.0.model.js +52 -10
- package/dist/catalog/volcengine-speech/seed-tts-2.0-voices.d.ts +2 -0
- package/dist/catalog/volcengine-speech/seed-tts-2.0-voices.js +438 -0
- package/dist/catalog/volcengine-speech/seed-tts-2.0.model.js +4 -4
- package/dist/discovery/index.js +13 -6
- package/dist/generation/core.d.ts +6 -0
- package/dist/generation/core.js +10 -2
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/llm/bigmodel/preset.js +2 -1
- package/dist/llm/bigmodel/profiles.js +0 -6
- package/dist/llm/chat.d.ts +8 -0
- package/dist/llm/chat.js +18 -2
- package/dist/llm/chatTypes.d.ts +6 -0
- package/dist/llm/defaults.d.ts +2 -2
- package/dist/llm/defaults.js +3 -3
- package/dist/llm/groq/preset.js +18 -2
- package/dist/llm/modelCatalog.d.ts +9 -2
- package/dist/llm/modelCatalog.js +17 -4
- package/dist/llm/modelCatalogEntries.d.ts +2 -0
- package/dist/llm/modelCatalogEntries.js +197 -42
- package/dist/llm/providerPresets.d.ts +3 -0
- package/dist/llm/providerPresets.js +145 -32
- package/dist/llm/providerReasoningRequest.js +28 -11
- package/dist/llm/siliconflow/index.js +1 -1
- package/dist/llm/siliconflow/preset.js +30 -0
- package/dist/llm/types.d.ts +6 -0
- package/dist/packs/models/{ppio/wan-2.5-preview.d.ts → apimart/flux-3-image.d.ts} +1 -1
- package/dist/packs/models/apimart/flux-3-image.js +7 -0
- package/dist/packs/models/apimart/flux-3-video.d.ts +6 -0
- package/dist/packs/models/apimart/flux-3-video.js +7 -0
- package/dist/packs/models/apimart/gemini-omni-1.2-flash.d.ts +6 -0
- package/dist/packs/models/apimart/gemini-omni-1.2-flash.js +7 -0
- package/dist/packs/models/{modelscope/qwen-image.d.ts → apimart/gpt-image-2.6.d.ts} +1 -1
- package/dist/packs/models/apimart/gpt-image-2.6.js +7 -0
- package/dist/packs/models/apimart/grok-imagine-video-1.5.d.ts +6 -0
- package/dist/packs/models/apimart/grok-imagine-video-1.5.js +7 -0
- package/dist/packs/models/apimart/happyhorse-1.1.d.ts +6 -0
- package/dist/packs/models/apimart/happyhorse-1.1.js +7 -0
- package/dist/packs/models/apimart/kling-4.0.d.ts +6 -0
- package/dist/packs/models/apimart/kling-4.0.js +7 -0
- package/dist/packs/models/apimart/minimax-h3-max.d.ts +6 -0
- package/dist/packs/models/apimart/minimax-h3-max.js +7 -0
- package/dist/packs/models/{ppio/minimax-hailuo-2.3.d.ts → apimart/nano-banana-2.1.d.ts} +1 -1
- package/dist/packs/models/{ppio/minimax-hailuo-2.3.js → apimart/nano-banana-2.1.js} +4 -4
- package/dist/packs/models/apimart/seedream-5.0-flash.d.ts +6 -0
- package/dist/packs/models/apimart/seedream-5.0-flash.js +7 -0
- package/dist/packs/models/apimart/veo-3.1.d.ts +6 -0
- package/dist/packs/models/apimart/veo-3.1.js +7 -0
- package/dist/packs/models/apimart/wan-2.7-image.d.ts +6 -0
- package/dist/packs/models/apimart/wan-2.7-image.js +7 -0
- package/dist/packs/models/apimart/wan-3.0.d.ts +6 -0
- package/dist/packs/models/apimart/wan-3.0.js +7 -0
- package/dist/packs/models/bailian/cosyvoice-v3.5.js +1 -1
- package/dist/packs/models/bailian/minimax-h3.d.ts +6 -0
- package/dist/packs/models/bailian/minimax-h3.js +7 -0
- package/dist/packs/models/bailian/minimax-speech-2.8.js +1 -1
- package/dist/packs/models/bailian/qwen-audio-3.1-tts-flash.js +1 -1
- package/dist/packs/models/bailian/qwen-audio-3.1-tts-plus.d.ts +6 -0
- package/dist/packs/models/bailian/qwen-audio-3.1-tts-plus.js +7 -0
- package/dist/packs/models/bailian/qwen-image-3.0.js +1 -1
- package/dist/packs/models/bailian/wan-3.0.d.ts +6 -0
- package/dist/packs/models/bailian/wan-3.0.js +7 -0
- package/dist/packs/models/bailian/z-image-turbo.js +1 -1
- package/dist/packs/models/fal/eleven-v4-tts.d.ts +6 -0
- package/dist/packs/models/{ppio/wan-2.5-preview.js → fal/eleven-v4-tts.js} +4 -4
- package/dist/packs/models/fal/flux-3-video.d.ts +6 -0
- package/dist/packs/models/fal/flux-3-video.js +7 -0
- package/dist/packs/models/{ppio/wan-2.6.d.ts → fal/flux-3.d.ts} +1 -1
- package/dist/packs/models/{ppio/wan-2.6.js → fal/flux-3.js} +4 -4
- package/dist/packs/models/fal/gemini-omni-1.2-flash.d.ts +6 -0
- package/dist/packs/models/fal/gemini-omni-1.2-flash.js +7 -0
- package/dist/packs/models/fal/gpt-image-2.6.d.ts +6 -0
- package/dist/packs/models/fal/gpt-image-2.6.js +7 -0
- package/dist/packs/models/fal/grok-imagine-video-1.5.d.ts +6 -0
- package/dist/packs/models/fal/grok-imagine-video-1.5.js +7 -0
- package/dist/packs/models/fal/kling-4.0-flash.d.ts +6 -0
- package/dist/packs/models/fal/kling-4.0-flash.js +7 -0
- package/dist/packs/models/fal/kling-4.0.d.ts +6 -0
- package/dist/packs/models/{ppio/wan-2.7.js → fal/kling-4.0.js} +4 -4
- package/dist/packs/models/{ppio/wan-2.7.d.ts → fal/ltx-2.3.d.ts} +1 -1
- package/dist/packs/models/fal/ltx-2.3.js +7 -0
- package/dist/packs/models/fal/minimax-h3-max.d.ts +6 -0
- package/dist/packs/models/fal/minimax-h3-max.js +7 -0
- package/dist/packs/models/fal/nano-banana-2.1.d.ts +6 -0
- package/dist/packs/models/fal/nano-banana-2.1.js +7 -0
- package/dist/packs/models/fal/wan-3.0.d.ts +6 -0
- package/dist/packs/models/fal/wan-3.0.js +7 -0
- package/dist/packs/models/grsai/gpt-image-2.6.d.ts +6 -0
- package/dist/packs/models/grsai/gpt-image-2.6.js +7 -0
- package/dist/packs/models/grsai/nano-banana-2.1.d.ts +6 -0
- package/dist/packs/models/grsai/nano-banana-2.1.js +7 -0
- package/dist/packs/models/grsai/wan-3.0.d.ts +6 -0
- package/dist/packs/models/grsai/wan-3.0.js +7 -0
- package/dist/packs/models/kie/flux-3-klein.d.ts +6 -0
- package/dist/packs/models/kie/flux-3-klein.js +7 -0
- package/dist/packs/models/kie/gemini-3.8-flash-lite-tts.d.ts +6 -0
- package/dist/packs/models/kie/gemini-3.8-flash-lite-tts.js +7 -0
- package/dist/packs/models/kie/{eleven-turbo-2.5-tts.d.ts → gemini-3.8-flash-tts.d.ts} +1 -1
- package/dist/packs/models/kie/{eleven-turbo-2.5-tts.js → gemini-3.8-flash-tts.js} +1 -1
- package/dist/packs/models/kie/gpt-image-2.6.d.ts +6 -0
- package/dist/packs/models/kie/gpt-image-2.6.js +7 -0
- package/dist/packs/models/kie/grok-imagine-video-1.5.d.ts +6 -0
- package/dist/packs/models/kie/grok-imagine-video-1.5.js +7 -0
- package/dist/packs/models/kie/kling-4.0-flash.d.ts +6 -0
- package/dist/packs/models/kie/kling-4.0-flash.js +7 -0
- package/dist/packs/models/kie/kling-4.0.d.ts +6 -0
- package/dist/packs/models/kie/kling-4.0.js +7 -0
- package/dist/packs/models/kie/nano-banana-2.1.d.ts +6 -0
- package/dist/packs/models/kie/nano-banana-2.1.js +7 -0
- package/dist/packs/models/kie/wan-3.0-prime.d.ts +6 -0
- package/dist/packs/models/kie/wan-3.0-prime.js +7 -0
- package/dist/packs/models/kie/wan-3.0.d.ts +6 -0
- package/dist/packs/models/kie/wan-3.0.js +7 -0
- package/dist/packs/models/modelscope/flux-1-krea-dev.js +1 -1
- package/dist/packs/models/modelscope/majicmix-realistic.js +1 -1
- package/dist/packs/models/modelscope/modelscope-custom.js +1 -1
- package/dist/packs/models/modelscope/qwen-image-2512.d.ts +6 -0
- package/dist/packs/models/modelscope/{qwen-image.js → qwen-image-2512.js} +2 -2
- package/dist/packs/models/modelscope/{qwen-image-edit-2509.d.ts → qwen-image-edit-2511.d.ts} +1 -1
- package/dist/packs/models/modelscope/{qwen-image-edit-2509.js → qwen-image-edit-2511.js} +2 -2
- package/dist/packs/models/modelscope/sdxl-14-ckpt.js +1 -1
- package/dist/packs/models/modelscope/z-image-turbo.js +1 -1
- package/dist/packs/models/volcengine/seedance-2.0-fast.d.ts +6 -0
- package/dist/packs/models/volcengine/seedance-2.0-fast.js +7 -0
- package/dist/packs/models/volcengine/seedance-2.0-mini.d.ts +6 -0
- package/dist/packs/models/volcengine/seedance-2.0-mini.js +7 -0
- package/dist/packs/models/volcengine/seedance-2.0.d.ts +6 -0
- package/dist/packs/models/volcengine/seedance-2.0.js +7 -0
- package/dist/packs/models/volcengine/seedance-2.5.d.ts +6 -0
- package/dist/packs/models/volcengine/seedance-2.5.js +7 -0
- package/dist/packs/models/volcengine/seedream-5.0-flash.js +1 -1
- package/dist/packs/models/volcengine/seedream-5.0-lite.js +1 -1
- package/dist/packs/models/volcengine/seedream-5.0-pro.js +1 -1
- package/dist/packs/provider-adapters/bailian.js +1 -1
- package/dist/packs/provider-adapters/modelscope.js +1 -1
- package/dist/packs/provider-adapters/volcengine.js +1 -1
- package/dist/packs/provider-packs/apimart.d.ts +1 -1
- package/dist/packs/provider-packs/apimart.js +35 -22
- package/dist/packs/provider-packs/bailian.d.ts +1 -1
- package/dist/packs/provider-packs/bailian.js +8 -5
- package/dist/packs/provider-packs/fal.d.ts +1 -1
- package/dist/packs/provider-packs/fal.js +52 -40
- package/dist/packs/provider-packs/grsai.d.ts +1 -1
- package/dist/packs/provider-packs/grsai.js +8 -5
- package/dist/packs/provider-packs/kie.d.ts +1 -1
- package/dist/packs/provider-packs/kie.js +41 -32
- package/dist/packs/provider-packs/modelscope.js +2 -2
- package/dist/packs/provider-packs/ppio.d.ts +1 -1
- package/dist/packs/provider-packs/ppio.js +2 -6
- package/dist/packs/provider-packs/volcengine.d.ts +1 -1
- package/dist/packs/provider-packs/volcengine.js +8 -4
- package/dist/pricing/index.d.ts +1 -0
- package/dist/pricing/index.js +1 -0
- package/dist/pricing/mediaContext.d.ts +6 -1
- package/dist/pricing/mediaContext.js +12 -5
- package/dist/pricing/tokenPricing.d.ts +36 -0
- package/dist/pricing/tokenPricing.js +26 -0
- package/dist/providers/bailian.d.ts +1 -1
- package/dist/providers/bailian.js +71 -4
- package/dist/providers/fal.js +11 -1
- package/dist/providers/helpers.d.ts +1 -1
- package/dist/providers/helpers.js +17 -5
- package/dist/providers/kie.js +16 -5
- package/dist/providers/metadata.js +2 -2
- package/dist/providers/openai-speech.d.ts +6 -0
- package/dist/providers/openai-speech.js +31 -0
- package/dist/providers/providerAccessErrors.d.ts +3 -0
- package/dist/providers/providerAccessErrors.js +73 -0
- package/dist/providers/siliconflow.js +2 -27
- package/dist/providers/volcengine-speech.d.ts +1 -1
- package/dist/providers/volcengine-speech.js +31 -8
- package/dist/providers/volcengine-voice-clone.d.ts +3 -0
- package/dist/providers/volcengine-voice-clone.js +138 -0
- package/dist/providers/volcengine.d.ts +1 -1
- package/dist/providers/volcengine.js +89 -11
- package/dist/runtime/retry.js +3 -0
- package/dist/tool-packs/fal-erase/models/bria-eraser.model.js +1 -1
- package/dist/tool-packs/fal-erase/models/finegrain-eraser.model.js +1 -1
- package/dist/tool-packs/fal-erase/models/flux-pro-erase.model.js +1 -1
- package/dist/tool-packs/fal-image-utilities/models/control-light.model.js +1 -1
- package/dist/tool-packs/fal-image-utilities/models/outpaint.model.js +1 -1
- package/dist/tool-packs/fal-image-utilities/models/photo-restoration.model.js +1 -1
- package/dist/tool-packs/fal-image-utilities/models/pixelcut-background-removal.model.js +1 -1
- package/dist/tool-packs/fal-image-utilities/models/product-photography.model.js +1 -1
- package/dist/tool-packs/fal-image-utilities/models/relighting.model.js +1 -1
- package/dist/tool-packs/fal-multi-angle/models/flux-2-multiple-angles.model.js +1 -1
- package/dist/tool-packs/fal-multi-angle/models/perspective-change.model.js +1 -1
- package/dist/tool-packs/fal-multi-angle/models/qwen-image-edit-2511-multiple-angles.model.js +1 -1
- package/dist/types/model.d.ts +68 -12
- package/dist/types/model.js +3 -0
- package/dist/types/modelTags.d.ts +142 -0
- package/dist/types/modelTags.js +44 -0
- package/dist/types/runtime.d.ts +3 -0
- package/dist/types/speechTimings.d.ts +15 -0
- package/dist/types/speechTimings.js +1 -0
- package/dist/upload/apimart-upload.d.ts +1 -1
- package/dist/upload/apimart-upload.js +37 -15
- package/dist/upload/bailian-oss-upload.d.ts +32 -0
- package/dist/upload/bailian-oss-upload.js +74 -0
- package/dist/upload/{fal-legacy.js → fal-host-fetch.js} +2 -2
- package/dist/upload/fal-transport.d.ts +6 -0
- package/dist/upload/fal-transport.js +2 -1
- package/dist/upload/index.d.ts +2 -2
- package/dist/upload/index.js +4 -7
- package/dist/upload/kie-upload.d.ts +1 -1
- package/dist/upload/kie-upload.js +34 -12
- package/dist/upload/media-binary.js +1 -0
- package/dist/upload/media-fields.js +7 -2
- package/dist/upload/preprocess-core.d.ts +2 -0
- package/dist/upload/preprocess-core.js +2 -0
- package/dist/upload/preprocess.d.ts +1 -1
- package/dist/upload/preprocess.js +12 -3
- package/dist/upload/provider-preprocessors/apimart.d.ts +1 -1
- package/dist/upload/provider-preprocessors/apimart.js +13 -5
- package/dist/upload/provider-preprocessors/bailian.d.ts +8 -0
- package/dist/upload/provider-preprocessors/bailian.js +45 -0
- package/dist/upload/provider-preprocessors/kie.d.ts +1 -1
- package/dist/upload/provider-preprocessors/kie.js +26 -9
- package/dist/upload/provider-preprocessors/ppio.d.ts +1 -2
- package/dist/upload/provider-preprocessors/ppio.js +2 -29
- package/dist/upload/provider-preprocessors/public-host.d.ts +5 -0
- package/dist/upload/provider-preprocessors/public-host.js +7 -0
- package/dist/upload/provider-preprocessors/volcengine.d.ts +5 -0
- package/dist/upload/provider-preprocessors/volcengine.js +10 -0
- package/dist/upload/public-host-upload.d.ts +7 -0
- package/dist/upload/public-host-upload.js +55 -0
- package/dist/upload/upload-response.js +12 -7
- package/docs/README.md +26 -26
- package/docs/consumers.md +150 -124
- package/docs/llm-adaptation/README.md +180 -166
- package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206/DeepSeek.md +108 -104
- package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206/Kimi.md +94 -76
- package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206/MiniMax.md +89 -84
- package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206//345/260/217/347/261/263MiMo.md +126 -126
- package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206//346/231/272/350/260/261GLM.md +238 -234
- package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206//347/201/253/345/261/261/345/274/225/346/223/216.md +131 -87
- package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206//347/231/276/347/202/274Qwen.md +112 -84
- package/docs/llm-adaptation//346/226/207/346/241/243/351/207/207/351/233/206/346/211/213/345/206/214.md +88 -88
- package/docs/model-adaptation/Bria-Eraser/Bria-Eraser_Fal.md +32 -32
- package/docs/model-adaptation/Bria-/345/210/233/346/204/217/346/224/276/345/244/247/Bria-/345/210/233/346/204/217/346/224/276/345/244/247_Fal.md +31 -31
- package/docs/model-adaptation/ControlLight/ControlLight_Fal.md +85 -85
- package/docs/model-adaptation/Eleven-v4/Eleven-v4_Fal.md +49 -0
- package/docs/model-adaptation/FLUX-2-/345/244/232/350/247/222/345/272/246/FLUX-2-/345/244/232/350/247/222/345/272/246_Fal.md +107 -107
- package/docs/model-adaptation/FLUX-3/FLUX-3_APIMart.md +65 -0
- package/docs/model-adaptation/FLUX-3/FLUX-3_Fal.md +48 -0
- package/docs/model-adaptation/FLUX-3-Klein/FLUX-3-Klein_KIE.md +38 -0
- package/docs/model-adaptation/FLUX-3-Video/FLUX-3-Video_APIMart.md +84 -0
- package/docs/model-adaptation/FLUX-3-Video/FLUX-3-Video_Fal.md +80 -0
- package/docs/model-adaptation/Finegrain-Eraser/Finegrain-Eraser_Fal.md +31 -31
- package/docs/model-adaptation/Flux-Pro-Erase/Flux-Pro-Erase_Fal.md +34 -34
- package/docs/model-adaptation/Fun-ASR/Fun-ASR_/347/231/276/347/202/274.md +47 -47
- package/docs/model-adaptation/Fun-ASR-Flash-2026-06-15/Fun-ASR-Flash-2026-06-15_/347/231/276/347/202/274.md +45 -45
- package/docs/model-adaptation/Fun-ASR-Realtime/Fun-ASR-Realtime_/347/231/276/347/202/274.md +57 -57
- package/docs/model-adaptation/Fun-ASR-Realtime-2026-02-28/Fun-ASR-Realtime-2026-02-28_/347/231/276/347/202/274.md +39 -39
- package/docs/model-adaptation/GLM-5.3-Flash/GLM-5.3-Flash_/346/231/272/350/260/261.md +217 -213
- package/docs/model-adaptation/GPT-Image-2/GPT-Image-2_APIMart.md +173 -173
- package/docs/model-adaptation/GPT-Image-2/GPT-Image-2_Fal.md +94 -94
- package/docs/model-adaptation/GPT-Image-2/GPT-Image-2_Grsai.md +138 -137
- package/docs/model-adaptation/GPT-Image-2/GPT-Image-2_KIE.md +97 -93
- package/docs/model-adaptation/GPT-Image-2.5/GPT-Image-2.5_APIMart.md +66 -66
- package/docs/model-adaptation/GPT-Image-2.5/GPT-Image-2.5_Fal.md +55 -55
- package/docs/model-adaptation/GPT-Image-2.5/GPT-Image-2.5_Grsai.md +59 -53
- package/docs/model-adaptation/GPT-Image-2.5/GPT-Image-2.5_KIE.md +55 -55
- package/docs/model-adaptation/GPT-Image-2.6/GPT-Image-2.6_APIMart.md +101 -0
- package/docs/model-adaptation/GPT-Image-2.6/GPT-Image-2.6_Fal.md +55 -0
- package/docs/model-adaptation/GPT-Image-2.6/GPT-Image-2.6_Grsai.md +32 -0
- package/docs/model-adaptation/GPT-Image-2.6/GPT-Image-2.6_KIE.md +51 -0
- package/docs/model-adaptation/GPT-OSS-20B/GPT-OSS-20B_Groq.md +62 -62
- package/docs/model-adaptation/Gemini-3.8-Flash-Lite-TTS/Gemini-3.8-Flash-Lite-TTS_KIE.md +22 -0
- package/docs/model-adaptation/Gemini-3.8-Flash-TTS/Gemini-3.8-Flash-TTS_KIE.md +38 -0
- package/docs/model-adaptation/Gemini-Omni-1.2-Flash/Gemini-Omni-1.2-Flash_APIMart.md +79 -0
- package/docs/model-adaptation/Gemini-Omni-1.2-Flash/Gemini-Omni-1.2-Flash_Fal.md +60 -0
- package/docs/model-adaptation/Gemini-Omni-Flash/Gemini-Omni-Flash_APIMart.md +131 -124
- package/docs/model-adaptation/Gemini-Omni-Flash/Gemini-Omni-Flash_Fal.md +84 -84
- package/docs/model-adaptation/Gemini-Omni-Flash/Gemini-Omni-Flash_KIE.md +132 -129
- package/docs/model-adaptation/Grok-Imagine/Grok-Imagine_KIE.md +38 -36
- package/docs/model-adaptation/Grok-Imagine-2.0/Grok-Imagine-2.0_APIMart.md +250 -250
- package/docs/model-adaptation/Grok-Imagine-2.0/Grok-Imagine-2.0_Fal.md +84 -84
- package/docs/model-adaptation/Grok-Imagine-2.0/Grok-Imagine-2.0_KIE.md +105 -105
- package/docs/model-adaptation/Grok-Imagine-Video-1.5/Grok-Imagine-Video-1.5_APIMart.md +68 -0
- package/docs/model-adaptation/Grok-Imagine-Video-1.5/Grok-Imagine-Video-1.5_Fal.md +47 -0
- package/docs/model-adaptation/Grok-Imagine-Video-1.5/Grok-Imagine-Video-1.5_KIE.md +37 -0
- package/docs/model-adaptation/Hailuo-02/Hailuo-02_Fal.md +95 -93
- package/docs/model-adaptation/Hailuo-02/Hailuo-02_KIE.md +58 -56
- package/docs/model-adaptation/Hailuo-2.3/Hailuo-2.3_Fal.md +88 -88
- package/docs/model-adaptation/Hailuo-2.3/Hailuo-2.3_KIE.md +51 -51
- package/docs/model-adaptation/HappyHorse-1.1/HappyHorse-1.1_APIMart.md +66 -0
- package/docs/model-adaptation/HappyHorse-1.1/HappyHorse-1.1_KIE.md +31 -27
- package/docs/model-adaptation/IC-Light-v2/IC-Light-v2_Fal.md +99 -99
- package/docs/model-adaptation/Ideogram-/345/233/276/347/211/207/346/224/276/345/244/247/Ideogram-/345/233/276/347/211/207/346/224/276/345/244/247_Fal.md +41 -41
- package/docs/model-adaptation/Image-Apps-v2-/345/225/206/345/223/201/346/221/204/345/275/261/Image-Apps-v2-/345/225/206/345/223/201/346/221/204/345/275/261_Fal.md +72 -72
- package/docs/model-adaptation/Image-Apps-v2-/346/211/251/345/233/276/Image-Apps-v2-/346/211/251/345/233/276_Fal.md +93 -93
- package/docs/model-adaptation/Image-Apps-v2-/347/205/247/347/211/207/344/277/256/345/244/215/Image-Apps-v2-/347/205/247/347/211/207/344/277/256/345/244/215_Fal.md +86 -86
- package/docs/model-adaptation/Image-Apps-v2-/351/207/215/346/211/223/345/205/211/Image-Apps-v2-/351/207/215/346/211/223/345/205/211_Fal.md +84 -84
- package/docs/model-adaptation/Kling-3.0/Kling-3.0_APIMart.md +112 -112
- package/docs/model-adaptation/Kling-3.0/Kling-3.0_Fal.md +91 -89
- package/docs/model-adaptation/Kling-3.0/Kling-3.0_KIE.md +106 -106
- package/docs/model-adaptation/Kling-3.0/Kling-3.0_/346/264/276/346/254/247/344/272/221.md +120 -119
- package/docs/model-adaptation/Kling-3.0-Omni/Kling-3.0-Omni_APIMart.md +130 -125
- package/docs/model-adaptation/Kling-3.0-Omni/Kling-3.0-Omni_Fal.md +107 -107
- package/docs/model-adaptation/Kling-3.0-Omni/Kling-3.0-Omni_KIE.md +148 -143
- package/docs/model-adaptation/Kling-3.0-Turbo/Kling-3.0-Turbo_APIMart.md +88 -85
- package/docs/model-adaptation/Kling-3.0-Turbo/Kling-3.0-Turbo_Fal.md +86 -83
- package/docs/model-adaptation/Kling-3.0-Turbo/Kling-3.0-Turbo_KIE.md +84 -84
- package/docs/model-adaptation/Kling-4.0/Kling-4.0_APIMart.md +76 -0
- package/docs/model-adaptation/Kling-4.0/Kling-4.0_Fal.md +115 -0
- package/docs/model-adaptation/Kling-4.0/Kling-4.0_KIE.md +61 -0
- package/docs/model-adaptation/Kling-4.0-Flash/Kling-4.0-Flash_Fal.md +55 -0
- package/docs/model-adaptation/Kling-4.0-Flash/Kling-4.0-Flash_KIE.md +33 -0
- package/docs/model-adaptation/LTX-2.3/LTX-2.3_Fal.md +121 -0
- package/docs/model-adaptation/Midjourney/Midjourney_APIMart.md +402 -396
- package/docs/model-adaptation/MiniMax-H3/MiniMax-H3_APIMart.md +237 -234
- package/docs/model-adaptation/MiniMax-H3/MiniMax-H3_Fal.md +112 -108
- package/docs/model-adaptation/MiniMax-H3/MiniMax-H3_KIE.md +118 -111
- package/docs/model-adaptation/MiniMax-H3/MiniMax-H3_/347/231/276/347/202/274.md +65 -0
- package/docs/model-adaptation/MiniMax-H3-Max/MiniMax-H3-Max_APIMart.md +78 -0
- package/docs/model-adaptation/MiniMax-H3-Max/MiniMax-H3-Max_Fal.md +62 -0
- package/docs/model-adaptation/MiniMax-Speech/MiniMax-Speech_/346/264/276/346/254/247/344/272/221.md +170 -170
- package/docs/model-adaptation/Nano-Banana-2/Nano-Banana-2_APIMart.md +89 -89
- package/docs/model-adaptation/Nano-Banana-2/Nano-Banana-2_Fal.md +99 -99
- package/docs/model-adaptation/Nano-Banana-2/Nano-Banana-2_Grsai.md +82 -82
- package/docs/model-adaptation/Nano-Banana-2/Nano-Banana-2_KIE.md +72 -70
- package/docs/model-adaptation/Nano-Banana-2-Lite/Nano-Banana-2-Lite_APIMart.md +79 -79
- package/docs/model-adaptation/Nano-Banana-2-Lite/Nano-Banana-2-Lite_Grsai.md +65 -65
- package/docs/model-adaptation/Nano-Banana-2-Lite/Nano-Banana-2-Lite_KIE.md +64 -64
- package/docs/model-adaptation/Nano-Banana-2.1/Nano-Banana-2.1_APIMart.md +35 -0
- package/docs/model-adaptation/Nano-Banana-2.1/Nano-Banana-2.1_Fal.md +37 -0
- package/docs/model-adaptation/Nano-Banana-2.1/Nano-Banana-2.1_Grsai.md +35 -0
- package/docs/model-adaptation/Nano-Banana-2.1/Nano-Banana-2.1_KIE.md +36 -0
- package/docs/model-adaptation/Nano-Banana-Pro/Nano-Banana-Pro_APIMart.md +83 -83
- package/docs/model-adaptation/Nano-Banana-Pro/Nano-Banana-Pro_Fal.md +89 -89
- package/docs/model-adaptation/Nano-Banana-Pro/Nano-Banana-Pro_Grsai.md +82 -82
- package/docs/model-adaptation/Nano-Banana-Pro/Nano-Banana-Pro_KIE.md +64 -64
- package/docs/model-adaptation/Pixelcut-/350/203/214/346/231/257/347/247/273/351/231/244/Pixelcut-/350/203/214/346/231/257/347/247/273/351/231/244_Fal.md +79 -79
- package/docs/model-adaptation/Qwen-Audio-3.1-TTS-Plus/Qwen-Audio-3.1-TTS-Plus_/347/231/276/347/202/274.md +59 -0
- package/docs/model-adaptation/Qwen-Image-3.0/Qwen-Image-3.0_APIMart.md +117 -117
- package/docs/model-adaptation/Qwen-Image-3.0/Qwen-Image-3.0_Fal.md +85 -84
- package/docs/model-adaptation/Qwen-Image-3.0/Qwen-Image-3.0_KIE.md +103 -103
- package/docs/model-adaptation/Qwen-Image-3.0/Qwen-Image-3.0_/347/231/276/347/202/274.md +138 -138
- package/docs/model-adaptation/Qwen-Image-Edit-2511-/345/244/232/350/247/222/345/272/246/Qwen-Image-Edit-2511-/345/244/232/350/247/222/345/272/246_Fal.md +57 -57
- package/docs/model-adaptation/Qwen-MT-Flash/Qwen-MT-Flash_/347/231/276/347/202/274.md +68 -68
- package/docs/model-adaptation/Qwen-MT-Lite/Qwen-MT-Lite_/347/231/276/347/202/274.md +40 -40
- package/docs/model-adaptation/Qwen-MT-Plus/Qwen-MT-Plus_/347/231/276/347/202/274.md +40 -40
- package/docs/model-adaptation/Qwen3-ASR-Flash/Qwen3-ASR-Flash_/347/231/276/347/202/274.md +44 -44
- package/docs/model-adaptation/Qwen3-ASR-Flash-2026-02-10/Qwen3-ASR-Flash-2026-02-10_/347/231/276/347/202/274.md +37 -37
- package/docs/model-adaptation/Qwen3-ASR-Flash-Filetrans/Qwen3-ASR-Flash-Filetrans_/347/231/276/347/202/274.md +45 -45
- package/docs/model-adaptation/Qwen3-ASR-Flash-Realtime/Qwen3-ASR-Flash-Realtime_/347/231/276/347/202/274.md +58 -58
- package/docs/model-adaptation/Qwen3-ASR-Flash-Realtime-2026-02-10/Qwen3-ASR-Flash-Realtime-2026-02-10_/347/231/276/347/202/274.md +37 -37
- package/docs/model-adaptation/README.md +371 -328
- package/docs/model-adaptation/Seed-ICL-2.0/Seed-ICL-2.0_/347/201/253/345/261/261/345/274/225/346/223/216.md +65 -0
- package/docs/model-adaptation/SeedASR-2.0-File/SeedASR-2.0-File_/347/201/253/345/261/261/345/274/225/346/223/216.md +115 -115
- package/docs/model-adaptation/SeedASR-2.0-Realtime/SeedASR-2.0-Realtime_/347/201/253/345/261/261/345/274/225/346/223/216.md +147 -147
- package/docs/model-adaptation/SeedVR2-/345/233/276/347/211/207/346/224/276/345/244/247/SeedVR2-/345/233/276/347/211/207/346/224/276/345/244/247_Fal.md +45 -45
- package/docs/model-adaptation/Seedance-2.0/Seedance-2.0_APIMart.md +121 -121
- package/docs/model-adaptation/Seedance-2.0/Seedance-2.0_Fal.md +97 -97
- package/docs/model-adaptation/Seedance-2.0/Seedance-2.0_KIE.md +87 -86
- package/docs/model-adaptation/Seedance-2.0/Seedance-2.0_/347/201/253/345/261/261/345/274/225/346/223/216.md +101 -0
- package/docs/model-adaptation/Seedance-2.0-Fast/Seedance-2.0-Fast_APIMart.md +89 -89
- package/docs/model-adaptation/Seedance-2.0-Fast/Seedance-2.0-Fast_Fal.md +95 -95
- package/docs/model-adaptation/Seedance-2.0-Fast/Seedance-2.0-Fast_KIE.md +79 -78
- package/docs/model-adaptation/Seedance-2.0-Fast/Seedance-2.0-Fast_/347/201/253/345/261/261/345/274/225/346/223/216.md +98 -0
- package/docs/model-adaptation/Seedance-2.0-Mini/Seedance-2.0-Mini_APIMart.md +93 -89
- package/docs/model-adaptation/Seedance-2.0-Mini/Seedance-2.0-Mini_Fal.md +96 -96
- package/docs/model-adaptation/Seedance-2.0-Mini/Seedance-2.0-Mini_KIE.md +79 -78
- package/docs/model-adaptation/Seedance-2.0-Mini/Seedance-2.0-Mini_/347/201/253/345/261/261/345/274/225/346/223/216.md +98 -0
- package/docs/model-adaptation/Seedance-2.5/Seedance-2.5_APIMart.md +217 -212
- package/docs/model-adaptation/Seedance-2.5/Seedance-2.5_Fal.md +98 -94
- package/docs/model-adaptation/Seedance-2.5/Seedance-2.5_KIE.md +94 -89
- package/docs/model-adaptation/Seedance-2.5/Seedance-2.5_/347/201/253/345/261/261/345/274/225/346/223/216.md +102 -0
- package/docs/model-adaptation/Seedream-5.0-Flash/Seedream-5.0-Flash_APIMart.md +64 -0
- package/docs/model-adaptation/Seedream-5.0-Flash/Seedream-5.0-Flash_/347/201/253/345/261/261/345/274/225/346/223/216.md +18 -18
- package/docs/model-adaptation/Seedream-5.0-Lite/Seedream-5.0-Lite_APIMart.md +113 -106
- package/docs/model-adaptation/Seedream-5.0-Lite/Seedream-5.0-Lite_Fal.md +91 -91
- package/docs/model-adaptation/Seedream-5.0-Lite/Seedream-5.0-Lite_KIE.md +89 -89
- package/docs/model-adaptation/Seedream-5.0-Lite/Seedream-5.0-Lite_/347/201/253/345/261/261/345/274/225/346/223/216.md +110 -108
- package/docs/model-adaptation/Seedream-5.0-Pro/Seedream-5.0-Pro_APIMart.md +194 -194
- package/docs/model-adaptation/Seedream-5.0-Pro/Seedream-5.0-Pro_Fal.md +100 -100
- package/docs/model-adaptation/Seedream-5.0-Pro/Seedream-5.0-Pro_KIE.md +141 -141
- package/docs/model-adaptation/Seedream-5.0-Pro/Seedream-5.0-Pro_/347/201/253/345/261/261/345/274/225/346/223/216.md +137 -137
- package/docs/model-adaptation/SenseVoiceSmall/SenseVoiceSmall_/347/241/205/345/237/272/346/265/201/345/212/250.md +73 -73
- package/docs/model-adaptation/TTS-/345/244/232/344/276/233/345/272/224/345/225/206-2026-09.md +52 -6
- package/docs/model-adaptation/TTS-/346/227/266/351/227/264/346/210/263-2026-10.md +36 -0
- package/docs/model-adaptation/Topaz-/345/233/276/347/211/207/346/224/276/345/244/247/Topaz-/345/233/276/347/211/207/346/224/276/345/244/247_Fal.md +87 -87
- package/docs/model-adaptation/Topaz-/351/200/217/346/230/216/345/233/276/346/224/276/345/244/247/Topaz-/351/200/217/346/230/216/345/233/276/346/224/276/345/244/247_Fal.md +34 -34
- package/docs/model-adaptation/Veo-3.1/Veo-3.1_APIMart.md +90 -0
- package/docs/model-adaptation/Wan-2.7-Image/Wan-2.7-Image_APIMart.md +81 -0
- package/docs/model-adaptation/Wan-3.0/Wan-3.0_APIMart.md +74 -0
- package/docs/model-adaptation/Wan-3.0/Wan-3.0_Fal.md +60 -0
- package/docs/model-adaptation/Wan-3.0/Wan-3.0_Grsai.md +35 -0
- package/docs/model-adaptation/Wan-3.0/Wan-3.0_KIE.md +38 -0
- package/docs/model-adaptation/Wan-3.0/Wan-3.0_/347/231/276/347/202/274.md +96 -0
- package/docs/model-adaptation/Wan-3.0-Prime/Wan-3.0-Prime_KIE.md +20 -0
- package/docs/model-adaptation/Whisper-Large-v3/Whisper-Large-v3_Groq.md +80 -80
- package/docs/model-adaptation/Whisper-Large-v3-Turbo/Whisper-Large-v3-Turbo_Groq.md +79 -79
- package/docs/model-adaptation/Z-Image-Turbo/Z-Image-Turbo_APIMart.md +88 -88
- package/docs/model-adaptation/Z-Image-Turbo/Z-Image-Turbo_Fal.md +103 -95
- package/docs/model-adaptation/Z-Image-Turbo/Z-Image-Turbo_KIE.md +71 -71
- package/docs/model-adaptation/Z-Image-Turbo/Z-Image-Turbo_/347/231/276/347/202/274.md +122 -122
- package/docs/model-adaptation/Z-Image-Turbo/Z-Image-Turbo_/351/255/224/346/220/255.md +99 -97
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206/APIMart.md +240 -240
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206/Fal.md +190 -172
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206/Groq.md +136 -121
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206/Grsai.md +217 -217
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206/KIE.md +159 -131
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206//345/200/231/351/200/211/344/276/233/345/272/224/345/225/206/350/260/203/347/240/224-/345/233/276/347/211/207/345/267/245/345/205/267.md +151 -151
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206//345/277/253/351/200/237/351/200/202/351/205/215/344/276/233/345/272/224/345/225/206.md +65 -65
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206//346/264/276/346/254/247/344/272/221.md +170 -147
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206//347/201/253/345/261/261/345/274/225/346/223/216.md +191 -183
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206//347/231/276/347/202/274.md +339 -282
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206//347/241/205/345/237/272/346/265/201/345/212/250.md +180 -153
- package/docs/model-adaptation//344/276/233/345/272/224/345/225/206//351/255/224/346/220/255.md +205 -207
- package/docs/model-adaptation//346/226/207/346/241/243/351/207/207/351/233/206/346/211/213/345/206/214.md +339 -338
- package/docs/model-adaptation//351/200/217/350/247/206/345/217/230/346/215/242//351/200/217/350/247/206/345/217/230/346/215/242_Fal.md +59 -59
- package/docs//346/216/245/345/205/245/346/214/207/345/215/227/Electron.md +77 -77
- package/docs//346/216/245/345/205/245/346/214/207/345/215/227/Tauri.md +81 -81
- package/docs//346/216/245/345/205/245/346/214/207/345/215/227/UXP.md +169 -169
- package/docs//346/216/245/345/205/245/346/214/207/345/215/227//344/276/233/345/272/224/345/225/206/345/237/237/345/220/215.md +83 -83
- package/docs//346/216/245/345/205/245/346/214/207/345/215/227//351/224/231/350/257/257/345/244/204/347/220/206.md +72 -72
- package/examples/form-renderer/README.md +17 -17
- package/examples/form-renderer/cli.ts +32 -32
- package/examples/form-renderer/index.ts +144 -144
- package/examples/form-renderer/package.json +16 -16
- package/examples/form-renderer/tsconfig.json +14 -14
- package/examples/llm-chat/README.md +38 -38
- package/examples/llm-chat/index.ts +100 -100
- package/examples/llm-chat/package.json +19 -19
- package/examples/llm-chat/tsconfig.json +14 -14
- package/examples/minimal-node/README.md +31 -31
- package/examples/minimal-node/index.ts +138 -138
- package/examples/minimal-node/package.json +17 -17
- package/examples/minimal-node/tsconfig.json +14 -14
- package/package.json +259 -258
- package/dist/catalog/grsai/gptImage25Sizes.d.ts +0 -1
- package/dist/catalog/grsai/gptImage25Sizes.js +0 -76
- package/dist/catalog/kie/eleven-turbo-2.5-tts.model.d.ts +0 -2
- package/dist/catalog/kie/eleven-turbo-2.5-tts.model.js +0 -29
- package/dist/catalog/modelscope/qwen-image-edit-2509.model.d.ts +0 -5
- package/dist/catalog/modelscope/qwen-image.model.d.ts +0 -5
- package/dist/catalog/ppio/minimax-hailuo-2.3.model.d.ts +0 -7
- package/dist/catalog/ppio/minimax-hailuo-2.3.model.js +0 -114
- package/dist/catalog/ppio/wan-2.5-preview.model.d.ts +0 -7
- package/dist/catalog/ppio/wan-2.5-preview.model.js +0 -198
- package/dist/catalog/ppio/wan-2.6.model.d.ts +0 -7
- package/dist/catalog/ppio/wan-2.6.model.js +0 -206
- package/dist/catalog/ppio/wan-2.7.model.d.ts +0 -2
- package/dist/catalog/ppio/wan-2.7.model.js +0 -373
- package/docs/model-adaptation/Hailuo-2.3/Hailuo-2.3_/346/264/276/346/254/247/344/272/221.md +0 -70
- package/docs/model-adaptation/TeleSpeechASR/TeleSpeechASR_/347/241/205/345/237/272/346/265/201/345/212/250.md +0 -76
- package/docs/model-adaptation/Wan-2.5-Preview/Wan-2.5-Preview_/346/264/276/346/254/247/344/272/221.md +0 -82
- package/docs/model-adaptation/Wan-2.6/Wan-2.6_/346/264/276/346/254/247/344/272/221.md +0 -84
- package/docs/model-adaptation/Wan-2.7/Wan-2.7_/346/264/276/346/254/247/344/272/221.md +0 -122
- /package/dist/upload/{fal-legacy.d.ts → fal-host-fetch.d.ts} +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { defineModel } from "../defineModel.js";
|
|
2
|
+
import { countUploadedImages, hasUploadedImage, resolveUploadedImageSources } from "../shared/mediaPresence.js";
|
|
3
|
+
// 价格与字段来源:docs/model-adaptation/Grok-Imagine-Video-1.5/Grok-Imagine-Video-1.5_Fal.md(Fal 模型页与 OpenAPI,2026-11-07 读取)
|
|
4
|
+
const RATIOS = ['16:9', '4:3', '3:2', '1:1', '2:3', '3:4', '9:16'];
|
|
5
|
+
const RATES = {
|
|
6
|
+
standard: { '480p': 0.08, '720p': 0.14, '1080p': 0.25 },
|
|
7
|
+
lite: { '480p': 0.02, '720p': 0.03, '1080p': 0.14 }
|
|
8
|
+
};
|
|
9
|
+
function lite(params) {
|
|
10
|
+
return params.falGrokVideo15Version === 'lite';
|
|
11
|
+
}
|
|
12
|
+
/** 参考生视频只有标准版提供。 */
|
|
13
|
+
function reference(params) {
|
|
14
|
+
return !lite(params) && params.falGrokVideo15Mode === 'reference-to-video';
|
|
15
|
+
}
|
|
16
|
+
/** 参考生视频只支持 480p/720p。 */
|
|
17
|
+
function resolution(params) {
|
|
18
|
+
const value = String(params.falGrokVideo15Resolution);
|
|
19
|
+
const allowed = reference(params) ? ['480p', '720p'] : ['480p', '720p', '1080p'];
|
|
20
|
+
return allowed.includes(value) ? value : '720p';
|
|
21
|
+
}
|
|
22
|
+
function duration(params) {
|
|
23
|
+
const value = Math.round(Number(params.falGrokVideo15Duration));
|
|
24
|
+
return Number.isFinite(value) ? Math.min(15, Math.max(1, value)) : 6;
|
|
25
|
+
}
|
|
26
|
+
function ratio(params) {
|
|
27
|
+
const raw = String(params.falGrokVideo15AspectRatio || 'smart');
|
|
28
|
+
if (RATIOS.includes(raw))
|
|
29
|
+
return raw;
|
|
30
|
+
const hint = typeof params.__firstImageRatio === 'number' && Number.isFinite(params.__firstImageRatio) && params.__firstImageRatio > 0
|
|
31
|
+
? params.__firstImageRatio : 16 / 9;
|
|
32
|
+
const numeric = (value) => { const [w, h] = value.split(':').map(Number); return w / h; };
|
|
33
|
+
return RATIOS.reduce((best, next) => Math.abs(numeric(next) - hint) < Math.abs(numeric(best) - hint) ? next : best, '16:9');
|
|
34
|
+
}
|
|
35
|
+
export const falGrokImagineVideo15Model = defineModel({
|
|
36
|
+
meta: {
|
|
37
|
+
id: 'fal-ai-grok-imagine-video-1.5', canonicalModelId: 'grok-imagine-video-1.5', seriesId: 'grok-imagine-video', seriesRank: 1.5,
|
|
38
|
+
provider: 'fal', type: 'video',
|
|
39
|
+
tags: ['text-to-video', 'image-to-video', 'reference-mode'],
|
|
40
|
+
polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 40 }
|
|
41
|
+
},
|
|
42
|
+
inputLimits: {
|
|
43
|
+
images: { max: 1 }, videos: { max: 0 }, audios: { max: 0 },
|
|
44
|
+
rules: [{ when: 'falGrokVideo15Version !== "lite" && falGrokVideo15Mode === "reference-to-video"', images: { min: 1, max: 7 } }]
|
|
45
|
+
},
|
|
46
|
+
requirements: [
|
|
47
|
+
{
|
|
48
|
+
id: 'fal-grok-video-1.5-reference', when: 'falGrokVideo15Version !== "lite" && falGrokVideo15Mode === "reference-to-video"',
|
|
49
|
+
require: { images: { min: 1 } },
|
|
50
|
+
message: { title: '图片必需', message: '参考生视频需要 1–7 张参考图', type: 'warning' }
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
params: [
|
|
54
|
+
{
|
|
55
|
+
id: 'falGrokVideo15Version', type: 'dropdown', order: 1,
|
|
56
|
+
default: 'standard',
|
|
57
|
+
options: [{ value: 'standard' }, { value: 'lite' }]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'falGrokVideo15Mode', type: 'dropdown', order: 2,
|
|
61
|
+
default: 'text-image-to-video',
|
|
62
|
+
visible: { condition: (params) => !lite(params) },
|
|
63
|
+
options: [{ value: 'text-image-to-video' }, { value: 'reference-to-video' }]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'falGrokVideo15AspectRatio', type: 'dropdown', order: 3,
|
|
67
|
+
default: 'smart',
|
|
68
|
+
visible: { condition: (params) => reference(params) || !hasUploadedImage(params) },
|
|
69
|
+
options: [{ value: 'smart' }, ...RATIOS.map((value) => ({ value }))]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 'falGrokVideo15Resolution', type: 'dropdown', order: 4,
|
|
73
|
+
default: '720p',
|
|
74
|
+
options: [{ value: '480p' }, { value: '720p' }, { value: '1080p' }]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'falGrokVideo15Duration', type: 'number', order: 5,
|
|
78
|
+
default: 6, min: 1, max: 15, step: 1
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
endpoints: {
|
|
82
|
+
selector: async (params) => {
|
|
83
|
+
if (reference(params))
|
|
84
|
+
return 'xai/grok-imagine-video/v1.5/reference-to-video';
|
|
85
|
+
const family = lite(params) ? 'xai/grok-imagine-video/v1.5/lite' : 'xai/grok-imagine-video/v1.5';
|
|
86
|
+
return hasUploadedImage(params) ? `${family}/image-to-video` : `${family}/text-to-video`;
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
request: {
|
|
90
|
+
builder: (params) => {
|
|
91
|
+
const prompt = typeof params.prompt === 'string' ? params.prompt.trim().slice(0, 4096) : '';
|
|
92
|
+
if (!prompt)
|
|
93
|
+
throw new Error('Grok Imagine Video 1.5 的提示词不能为空');
|
|
94
|
+
const images = resolveUploadedImageSources(params);
|
|
95
|
+
const body = { prompt, duration: duration(params), resolution: resolution(params) };
|
|
96
|
+
if (reference(params)) {
|
|
97
|
+
if (images.length === 0)
|
|
98
|
+
throw new Error('Grok Imagine Video 1.5 参考生视频需要至少 1 张参考图');
|
|
99
|
+
body.reference_image_urls = images.slice(0, 7);
|
|
100
|
+
body.aspect_ratio = ratio(params);
|
|
101
|
+
}
|
|
102
|
+
else if (images.length > 0) {
|
|
103
|
+
body.image_url = images[0];
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
body.aspect_ratio = ratio(params);
|
|
107
|
+
}
|
|
108
|
+
return body;
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
pricing: {
|
|
112
|
+
currency: '$',
|
|
113
|
+
calculator: (params) => {
|
|
114
|
+
const rates = lite(params) ? RATES.lite : RATES.standard;
|
|
115
|
+
const images = reference(params) ? Math.min(7, countUploadedImages(params)) : Math.min(1, countUploadedImages(params));
|
|
116
|
+
return rates[resolution(params)] * duration(params) + images * 0.01;
|
|
117
|
+
},
|
|
118
|
+
description: '标准版 480p/720p/1080p $0.08/$0.14/$0.25 每秒,Lite 版 $0.02/$0.03/$0.14 每秒;每张输入或参考图 +$0.01'
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
export default falGrokImagineVideo15Model;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { defineModel } from "../defineModel.js";
|
|
2
2
|
import { countUploadedImages, resolveUploadedImageSources } from "../shared/mediaPresence.js";
|
|
3
|
+
/** MiniMax 首尾帧不支持 512P(官方首尾帧文档原文),带尾帧时按 768P 请求和计价。 */
|
|
4
|
+
function falHailuo02Resolution(params, imageCount) {
|
|
5
|
+
return params.falHailuo02Resolution === '512P' && imageCount < 2 ? '512P' : '768P';
|
|
6
|
+
}
|
|
3
7
|
export const hailuo02Model = defineModel({
|
|
4
8
|
meta: {
|
|
5
9
|
id: 'fal-ai-minimax-hailuo-02',
|
|
@@ -8,7 +12,7 @@ export const hailuo02Model = defineModel({
|
|
|
8
12
|
seriesRank: 2.0,
|
|
9
13
|
provider: 'fal',
|
|
10
14
|
type: 'video',
|
|
11
|
-
tags: ['
|
|
15
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame'],
|
|
12
16
|
aliases: ['fal-ai-hailuo-02', 'minimax-hailuo-02-fal']
|
|
13
17
|
},
|
|
14
18
|
inputLimits: {
|
|
@@ -104,7 +108,7 @@ export const hailuo02Model = defineModel({
|
|
|
104
108
|
const images = resolveUploadedImageSources(params);
|
|
105
109
|
const prompt = params.prompt || '';
|
|
106
110
|
const version = params.falHailuo02Version || 'standard';
|
|
107
|
-
const resolution = params.
|
|
111
|
+
const resolution = falHailuo02Resolution(params, images.length);
|
|
108
112
|
const duration = params.falHailuo02Duration || '6';
|
|
109
113
|
const isFastMode = images.length === 1 && params.falHailuo02FastMode === true;
|
|
110
114
|
const promptOptimizer = params.falHailuo02PromptOptimizer !== false;
|
|
@@ -143,10 +147,10 @@ export const hailuo02Model = defineModel({
|
|
|
143
147
|
// Standard 文生视频不接受 resolution,固定按 768P 秒价计费。
|
|
144
148
|
if (imageCount === 0)
|
|
145
149
|
return 0.045 * duration;
|
|
146
|
-
const resolution = params
|
|
150
|
+
const resolution = falHailuo02Resolution(params, imageCount);
|
|
147
151
|
return (resolution === '512P' ? 0.017 : 0.045) * duration;
|
|
148
152
|
},
|
|
149
|
-
description: 'Standard 文生:$0.045/秒;Standard 图生:768P $0.045/秒、512P $0.017
|
|
153
|
+
description: 'Standard 文生:$0.045/秒;Standard 图生:768P $0.045/秒、512P $0.017/秒(首尾帧固定 768P);Fast 图生:512P $0.017/秒;non-fast Pro:固定 1080P、6 秒,$0.48/条'
|
|
150
154
|
}
|
|
151
155
|
});
|
|
152
156
|
export default hailuo02Model;
|
|
@@ -8,7 +8,7 @@ export const hailuo23Model = defineModel({
|
|
|
8
8
|
seriesRank: 2.3,
|
|
9
9
|
provider: 'fal',
|
|
10
10
|
type: 'video',
|
|
11
|
-
tags: ['
|
|
11
|
+
tags: ['text-to-video', 'image-to-video'],
|
|
12
12
|
aliases: ['fal-ai-hailuo-2.3', 'minimax-hailuo-2.3-fal']
|
|
13
13
|
},
|
|
14
14
|
inputLimits: {
|
|
@@ -20,7 +20,7 @@ export const falIcLightV2Model = defineModel({
|
|
|
20
20
|
seriesRank: 2,
|
|
21
21
|
provider: 'fal',
|
|
22
22
|
type: 'image',
|
|
23
|
-
tags: ['image-to-image', '
|
|
23
|
+
tags: ['image-to-image', 'relighting'],
|
|
24
24
|
aliases: ['ic-light-v2-fal'],
|
|
25
25
|
polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 45 },
|
|
26
26
|
},
|
|
@@ -10,7 +10,7 @@ export const falIdeogramUpscaleModel = defineModel({
|
|
|
10
10
|
canonicalModelId: 'ideogram-upscale',
|
|
11
11
|
provider: 'fal',
|
|
12
12
|
type: 'image',
|
|
13
|
-
tags: ['
|
|
13
|
+
tags: ['upscaling'],
|
|
14
14
|
polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 45 },
|
|
15
15
|
},
|
|
16
16
|
acceptsPrompt: false,
|
|
@@ -4,7 +4,7 @@ export const falKling30OmniModel = defineModel({
|
|
|
4
4
|
meta: {
|
|
5
5
|
id: 'fal-ai-kling-3.0-omni', canonicalModelId: 'kling-video-3.0-omni', seriesId: 'kling-video', seriesRank: 3.02,
|
|
6
6
|
provider: 'fal', type: 'video',
|
|
7
|
-
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode'
|
|
7
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode'],
|
|
8
8
|
aliases: ['kling-o3-fal'], polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 75 }
|
|
9
9
|
},
|
|
10
10
|
inputLimits: {
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { defineModel } from "../defineModel.js";
|
|
2
|
+
import { hasUploadedImage } from '../shared/mediaPresence.js';
|
|
2
3
|
export const falKling30TurboModel = defineModel({
|
|
3
4
|
meta: {
|
|
4
5
|
id: 'fal-ai-kling-3.0-turbo', canonicalModelId: 'kling-video-3.0-turbo', seriesId: 'kling-video', seriesRank: 3.01,
|
|
5
6
|
provider: 'fal', type: 'video',
|
|
6
|
-
tags: ['text-to-video', 'image-to-video'
|
|
7
|
+
tags: ['text-to-video', 'image-to-video'],
|
|
7
8
|
aliases: ['kling-v3-turbo-fal'], polling: { interval: 3000, maxAttempts: 280, expectedAttempts: 65 }
|
|
8
9
|
},
|
|
9
|
-
inputLimits: { images: { max: 1 }, videos: { max: 0 }, audios: { max: 0 } },
|
|
10
|
+
inputLimits: { images: { max: 1 }, videos: { max: 0 }, audios: { max: 0 }, rules: [{ imageConstraints: { minShortSidePx: 300, minAspectRatio: 0.4, maxAspectRatio: 2.5 } }] },
|
|
10
11
|
params: [
|
|
11
12
|
{
|
|
12
13
|
id: 'falKling30TurboAspectRatio', type: 'dropdown', order: 1,
|
|
14
|
+
// 图生视频端点没有比例字段,比例跟随首帧。
|
|
15
|
+
visible: { condition: (params) => !hasUploadedImage(params) },
|
|
13
16
|
default: 'smart',
|
|
14
17
|
options: [
|
|
15
18
|
{ value: 'smart' },
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { defineModel } from "../defineModel.js";
|
|
2
|
+
import { hasUploadedImage } from '../shared/mediaPresence.js';
|
|
2
3
|
export const falKling30Model = defineModel({
|
|
3
4
|
meta: {
|
|
4
5
|
id: 'fal-ai-kling-3.0', canonicalModelId: 'kling-video-3.0', seriesId: 'kling-video', seriesRank: 3,
|
|
5
6
|
provider: 'fal', type: 'video',
|
|
6
|
-
tags: ['text-to-video', 'image-to-video', 'start-end-frame'
|
|
7
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame'],
|
|
7
8
|
aliases: ['kling-v3-fal'], polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 75 }
|
|
8
9
|
},
|
|
9
10
|
inputLimits: { images: { max: 2 }, videos: { max: 0 }, audios: { max: 0 } },
|
|
10
11
|
params: [
|
|
11
12
|
{
|
|
12
13
|
id: 'falKling30AspectRatio', type: 'dropdown', order: 1,
|
|
14
|
+
// 图生视频端点没有比例字段,比例跟随首帧。
|
|
15
|
+
visible: { condition: (params) => !hasUploadedImage(params) },
|
|
13
16
|
default: 'smart',
|
|
14
17
|
options: [
|
|
15
18
|
{ value: 'smart' },
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { defineModel } from "../defineModel.js";
|
|
2
|
+
import { hasUploadedImage, hasUploadedVideo, resolveUploadedImageSources, resolveUploadedVideoDurationSeconds, resolveUploadedVideoSources } from "../shared/mediaPresence.js";
|
|
3
|
+
import { buildFalSubjectElements, subjectElementVideoSeconds } from "../shared/subjectElements.js";
|
|
4
|
+
import { KLING_V4_RATIOS, klingV4Duration, klingV4EditSeconds, klingV4Mode, klingV4Prompt, klingV4Ratio } from "./utils/klingV4.js";
|
|
5
|
+
// 价格与字段来源:docs/model-adaptation/Kling-4.0-Flash/Kling-4.0-Flash_Fal.md(Fal 模型页与 OpenAPI,2026-11-07 读取)。
|
|
6
|
+
// Flash 只出 720p,首帧图生视频不收尾帧,参考与编辑不接受声音,也没有分镜。
|
|
7
|
+
const usesElements = (params) => klingV4Mode(params.falKling40FlashMode) !== 'text-image-to-video';
|
|
8
|
+
export const falKling40FlashModel = defineModel({
|
|
9
|
+
meta: {
|
|
10
|
+
id: 'fal-ai-kling-4.0-flash', canonicalModelId: 'kling-video-4.0-flash', seriesId: 'kling-video', seriesRank: 4.01,
|
|
11
|
+
provider: 'fal', type: 'video',
|
|
12
|
+
tags: ['text-to-video', 'image-to-video', 'reference-mode', 'video-to-video'],
|
|
13
|
+
polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 50 }
|
|
14
|
+
},
|
|
15
|
+
inputLimits: {
|
|
16
|
+
images: { max: 1 }, videos: { max: 0 }, audios: { max: 0 },
|
|
17
|
+
rules: [
|
|
18
|
+
{ when: 'falKling40FlashMode === "reference-to-video"', images: { max: 10 }, videos: { max: 5 } },
|
|
19
|
+
{ when: 'falKling40FlashMode === "video-edit"', images: { max: 10 }, videos: { min: 1, max: 5 } }
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
requirements: [
|
|
23
|
+
{
|
|
24
|
+
id: 'fal-kling-4.0-flash-edit-video', when: 'falKling40FlashMode === "video-edit"',
|
|
25
|
+
require: { videos: { min: 1 } },
|
|
26
|
+
message: { title: '视频必需', message: '视频编辑需要上传要修改的视频(3–20 秒)', type: 'warning' }
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
params: [
|
|
30
|
+
{
|
|
31
|
+
id: 'falKling40FlashMode', type: 'dropdown', order: 1,
|
|
32
|
+
default: 'text-image-to-video',
|
|
33
|
+
options: [{ value: 'text-image-to-video' }, { value: 'reference-to-video' }, { value: 'video-edit' }]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'falKling40FlashAspectRatio', type: 'dropdown', order: 2,
|
|
37
|
+
default: 'smart',
|
|
38
|
+
visible: {
|
|
39
|
+
condition: (params) => {
|
|
40
|
+
const mode = klingV4Mode(params.falKling40FlashMode);
|
|
41
|
+
return mode === 'reference-to-video' || (mode === 'text-image-to-video' && !hasUploadedImage(params));
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
options: [{ value: 'smart' }, ...KLING_V4_RATIOS.map((value) => ({ value }))]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'falKling40FlashDuration', type: 'number', order: 3,
|
|
48
|
+
default: 5, min: 3, max: 20, step: 1,
|
|
49
|
+
visible: { condition: (params) => klingV4Mode(params.falKling40FlashMode) !== 'video-edit' }
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'falKling40FlashElements', type: 'composite', order: 4, valueType: 'array',
|
|
53
|
+
default: [],
|
|
54
|
+
visible: { condition: usesElements }
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
endpoints: {
|
|
58
|
+
selector: async (params) => {
|
|
59
|
+
const mode = klingV4Mode(params.falKling40FlashMode);
|
|
60
|
+
if (mode === 'reference-to-video')
|
|
61
|
+
return 'kling/v4/flash/reference-to-video';
|
|
62
|
+
if (mode === 'video-edit')
|
|
63
|
+
return 'kling/v4/flash/video-to-video';
|
|
64
|
+
return hasUploadedImage(params) ? 'kling/v4/flash/image-to-video' : 'kling/v4/flash/text-to-video';
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
request: {
|
|
68
|
+
builder: (params) => {
|
|
69
|
+
const mode = klingV4Mode(params.falKling40FlashMode);
|
|
70
|
+
const prompt = klingV4Prompt(params);
|
|
71
|
+
const images = resolveUploadedImageSources(params).slice(0, 10);
|
|
72
|
+
const videos = resolveUploadedVideoSources(params);
|
|
73
|
+
const elements = usesElements(params) ? buildFalSubjectElements(params.falKling40FlashElements, 'Kling 4.0 Flash') : [];
|
|
74
|
+
if (mode === 'video-edit') {
|
|
75
|
+
if (!prompt)
|
|
76
|
+
throw new Error('Kling 4.0 Flash 视频编辑需要填写修改说明');
|
|
77
|
+
if (videos.length === 0)
|
|
78
|
+
throw new Error('Kling 4.0 Flash 视频编辑需要上传要修改的视频');
|
|
79
|
+
const body = { prompt, video_url: videos[0] };
|
|
80
|
+
if (videos.length > 1)
|
|
81
|
+
body.video_urls = videos.slice(1, 5);
|
|
82
|
+
if (images.length > 0)
|
|
83
|
+
body.image_urls = images;
|
|
84
|
+
if (elements.length > 0)
|
|
85
|
+
body.elements = elements;
|
|
86
|
+
return body;
|
|
87
|
+
}
|
|
88
|
+
const duration = klingV4Duration(params.falKling40FlashDuration, 20);
|
|
89
|
+
if (mode === 'reference-to-video') {
|
|
90
|
+
if (!prompt)
|
|
91
|
+
throw new Error('Kling 4.0 Flash 参考生视频需要填写提示词');
|
|
92
|
+
const body = {
|
|
93
|
+
prompt, duration,
|
|
94
|
+
aspect_ratio: klingV4Ratio(params.falKling40FlashAspectRatio, 'auto') ?? 'auto'
|
|
95
|
+
};
|
|
96
|
+
if (images.length > 0)
|
|
97
|
+
body.image_urls = images;
|
|
98
|
+
if (videos.length > 0)
|
|
99
|
+
body.video_urls = videos.slice(0, 5);
|
|
100
|
+
if (elements.length > 0)
|
|
101
|
+
body.elements = elements;
|
|
102
|
+
return body;
|
|
103
|
+
}
|
|
104
|
+
if (images.length > 0) {
|
|
105
|
+
const body = { start_image_url: images[0], duration };
|
|
106
|
+
if (prompt)
|
|
107
|
+
body.prompt = prompt;
|
|
108
|
+
return body;
|
|
109
|
+
}
|
|
110
|
+
if (!prompt)
|
|
111
|
+
throw new Error('Kling 4.0 Flash 文生视频需要填写提示词');
|
|
112
|
+
return { prompt, duration, aspect_ratio: klingV4Ratio(params.falKling40FlashAspectRatio, undefined) ?? '16:9' };
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
pricing: {
|
|
116
|
+
currency: '$',
|
|
117
|
+
calculator: (params) => {
|
|
118
|
+
const mode = klingV4Mode(params.falKling40FlashMode);
|
|
119
|
+
const elementVideoSeconds = usesElements(params) ? subjectElementVideoSeconds(params.falKling40FlashElements) : 0;
|
|
120
|
+
if (mode === 'video-edit') {
|
|
121
|
+
const { source, input } = klingV4EditSeconds(params);
|
|
122
|
+
return 0.063 * (source + Math.max(input + elementVideoSeconds, source));
|
|
123
|
+
}
|
|
124
|
+
const duration = klingV4Duration(params.falKling40FlashDuration, 20);
|
|
125
|
+
if (mode === 'reference-to-video' && (hasUploadedVideo(params) || elementVideoSeconds > 0))
|
|
126
|
+
return 0.063 * (duration + Math.max(resolveUploadedVideoDurationSeconds(params, 5) + elementVideoSeconds, duration));
|
|
127
|
+
return 0.094 * duration;
|
|
128
|
+
},
|
|
129
|
+
description: '720p $0.094/秒;视频编辑、带参考视频或视频元素时 $0.063/秒,按输出时长加“输入视频与输出中较长者”计费'
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
export default falKling40FlashModel;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { defineModel } from "../defineModel.js";
|
|
2
|
+
import { hasUploadedImage, hasUploadedVideo, resolveUploadedImageSources, resolveUploadedVideoDurationSeconds, resolveUploadedVideoSources } from "../shared/mediaPresence.js";
|
|
3
|
+
import { buildShotPrompts, readShots, shotTotalSeconds } from "../shared/shotList.js";
|
|
4
|
+
import { buildFalSubjectElements, subjectElementVideoSeconds } from "../shared/subjectElements.js";
|
|
5
|
+
import { KLING_V4_RATIOS, KLING_V4_SHOT_LIMITS, klingV4Duration, klingV4EditSeconds, klingV4Mode, klingV4Prompt, klingV4Ratio } from "./utils/klingV4.js";
|
|
6
|
+
// 价格与字段来源:docs/model-adaptation/Kling-4.0/Kling-4.0_Fal.md(Fal 模型页与 OpenAPI,2026-11-07 读取)
|
|
7
|
+
function rates(params) {
|
|
8
|
+
const fullHd = params.falKling40Resolution !== '720p';
|
|
9
|
+
return { video: fullHd ? 0.235 : 0.157, withVideoInput: fullHd ? 0.141 : 0.094 };
|
|
10
|
+
}
|
|
11
|
+
/** 分镜只在视频编辑以外的模式生效;用了分镜就按各镜秒数之和成片。 */
|
|
12
|
+
const usesShots = (params) => klingV4Mode(params.falKling40Mode) !== 'video-edit' && readShots(params.falKling40Shots).length > 0;
|
|
13
|
+
const usesElements = (params) => klingV4Mode(params.falKling40Mode) !== 'text-image-to-video';
|
|
14
|
+
function outputSeconds(params) {
|
|
15
|
+
return usesShots(params) ? shotTotalSeconds(params.falKling40Shots, KLING_V4_SHOT_LIMITS) : klingV4Duration(params.falKling40Duration, 30);
|
|
16
|
+
}
|
|
17
|
+
export const falKling40Model = defineModel({
|
|
18
|
+
meta: {
|
|
19
|
+
id: 'fal-ai-kling-4.0', canonicalModelId: 'kling-video-4.0', seriesId: 'kling-video', seriesRank: 4,
|
|
20
|
+
provider: 'fal', type: 'video',
|
|
21
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode', 'video-to-video'],
|
|
22
|
+
polling: { interval: 3000, maxAttempts: 400, expectedAttempts: 90 }
|
|
23
|
+
},
|
|
24
|
+
// 分镜本身即可构成一次生成输入(主提示词只作整体描述并进每一镜),画布与助手不再要求主提示词。
|
|
25
|
+
alternativeInputParamIds: ['falKling40Shots'],
|
|
26
|
+
inputLimits: {
|
|
27
|
+
images: { max: 10 }, videos: { max: 0 }, audios: { max: 0 },
|
|
28
|
+
rules: [
|
|
29
|
+
{ when: 'falKling40Mode === "reference-to-video"', images: { max: 10 }, videos: { max: 5 } },
|
|
30
|
+
{ when: 'falKling40Mode === "video-edit"', images: { max: 10 }, videos: { min: 1, max: 5 } },
|
|
31
|
+
{ videoConstraints: { minShortSidePx: 700, maxLongSidePx: 4553 } },
|
|
32
|
+
{ when: 'falKling40Mode === "video-edit"', videoConstraints: { minShortSidePx: 700, maxLongSidePx: 4553, minAspectRatio: 0.4, maxAspectRatio: 2.5 } }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
requirements: [
|
|
36
|
+
{
|
|
37
|
+
id: 'fal-kling-4.0-edit-video', when: 'falKling40Mode === "video-edit"',
|
|
38
|
+
require: { videos: { min: 1 } },
|
|
39
|
+
message: { title: '视频必需', message: '视频编辑需要上传要修改的视频(3–30 秒)', type: 'warning' }
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
params: [
|
|
43
|
+
{
|
|
44
|
+
id: 'falKling40Mode', type: 'dropdown', order: 1,
|
|
45
|
+
default: 'text-image-to-video',
|
|
46
|
+
options: [{ value: 'text-image-to-video' }, { value: 'reference-to-video' }, { value: 'video-edit' }]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 'falKling40AspectRatio', type: 'dropdown', order: 2,
|
|
50
|
+
default: 'smart',
|
|
51
|
+
visible: {
|
|
52
|
+
condition: (params) => klingV4Mode(params.falKling40Mode) !== 'text-image-to-video' || !hasUploadedImage(params)
|
|
53
|
+
},
|
|
54
|
+
options: [{ value: 'smart' }, ...KLING_V4_RATIOS.map((value) => ({ value }))]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'falKling40Resolution', type: 'dropdown', order: 3,
|
|
58
|
+
default: '1080p',
|
|
59
|
+
options: [{ value: '720p' }, { value: '1080p' }]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'falKling40Duration', type: 'number', order: 4,
|
|
63
|
+
default: 5, min: 3, max: 30, step: 1,
|
|
64
|
+
visible: { condition: (params) => klingV4Mode(params.falKling40Mode) !== 'video-edit' && !usesShots(params) }
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'falKling40Shots', type: 'composite', order: 5, valueType: 'array',
|
|
68
|
+
default: [],
|
|
69
|
+
visible: { condition: (params) => klingV4Mode(params.falKling40Mode) !== 'video-edit' }
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 'falKling40Elements', type: 'composite', order: 6, valueType: 'array',
|
|
73
|
+
default: [],
|
|
74
|
+
visible: { condition: usesElements }
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
endpoints: {
|
|
78
|
+
selector: async (params) => {
|
|
79
|
+
const mode = klingV4Mode(params.falKling40Mode);
|
|
80
|
+
if (mode === 'reference-to-video')
|
|
81
|
+
return 'kling/v4/reference-to-video';
|
|
82
|
+
if (mode === 'video-edit')
|
|
83
|
+
return 'kling/v4/video-to-video/edit';
|
|
84
|
+
return hasUploadedImage(params) ? 'kling/v4/image-to-video' : 'kling/v4/text-to-video';
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
request: {
|
|
88
|
+
builder: (params) => {
|
|
89
|
+
const mode = klingV4Mode(params.falKling40Mode);
|
|
90
|
+
const prompt = klingV4Prompt(params);
|
|
91
|
+
const images = resolveUploadedImageSources(params).slice(0, 10);
|
|
92
|
+
const videos = resolveUploadedVideoSources(params);
|
|
93
|
+
const resolution = params.falKling40Resolution === '720p' ? '720p' : '1080p';
|
|
94
|
+
const elements = usesElements(params) ? buildFalSubjectElements(params.falKling40Elements, 'Kling 4.0') : [];
|
|
95
|
+
if (mode === 'video-edit') {
|
|
96
|
+
if (!prompt)
|
|
97
|
+
throw new Error('Kling 4.0 视频编辑需要填写修改说明');
|
|
98
|
+
if (videos.length === 0)
|
|
99
|
+
throw new Error('Kling 4.0 视频编辑需要上传要修改的视频');
|
|
100
|
+
const body = { prompt, video_url: videos[0], resolution };
|
|
101
|
+
if (videos.length > 1)
|
|
102
|
+
body.video_urls = videos.slice(1, 5);
|
|
103
|
+
if (images.length > 0)
|
|
104
|
+
body.image_urls = images;
|
|
105
|
+
if (elements.length > 0)
|
|
106
|
+
body.elements = elements;
|
|
107
|
+
const ratio = klingV4Ratio(params.falKling40AspectRatio, undefined);
|
|
108
|
+
if (ratio)
|
|
109
|
+
body.aspect_ratio = ratio;
|
|
110
|
+
return body;
|
|
111
|
+
}
|
|
112
|
+
// 平台的提示词与分镜二选一:用了分镜就只发分镜(主提示词并进每一镜),成片时长取各镜之和,不再发送时长。
|
|
113
|
+
const shots = buildShotPrompts(params.falKling40Shots, KLING_V4_SHOT_LIMITS, 'Kling 4.0', prompt);
|
|
114
|
+
const body = { resolution };
|
|
115
|
+
if (shots.length > 0)
|
|
116
|
+
body.multi_prompt = shots;
|
|
117
|
+
else {
|
|
118
|
+
body.duration = klingV4Duration(params.falKling40Duration, 30);
|
|
119
|
+
if (prompt)
|
|
120
|
+
body.prompt = prompt;
|
|
121
|
+
}
|
|
122
|
+
if (mode === 'reference-to-video') {
|
|
123
|
+
if (!prompt && shots.length === 0)
|
|
124
|
+
throw new Error('Kling 4.0 参考生视频需要填写提示词或分镜');
|
|
125
|
+
if (images.length > 0)
|
|
126
|
+
body.image_urls = images;
|
|
127
|
+
if (videos.length > 0)
|
|
128
|
+
body.video_urls = videos.slice(0, 5);
|
|
129
|
+
if (elements.length > 0)
|
|
130
|
+
body.elements = elements;
|
|
131
|
+
body.aspect_ratio = klingV4Ratio(params.falKling40AspectRatio, 'auto') ?? 'auto';
|
|
132
|
+
return body;
|
|
133
|
+
}
|
|
134
|
+
if (images.length > 0) {
|
|
135
|
+
// 第一张作首帧,最后一张作尾帧,中间的按顺序作关键帧(最多 8 张)。
|
|
136
|
+
body.start_image_url = images[0];
|
|
137
|
+
if (images.length > 1)
|
|
138
|
+
body.end_image_url = images[images.length - 1];
|
|
139
|
+
if (images.length > 2)
|
|
140
|
+
body.middle_image_urls = images.slice(1, -1).slice(0, 8);
|
|
141
|
+
return body;
|
|
142
|
+
}
|
|
143
|
+
if (!prompt && shots.length === 0)
|
|
144
|
+
throw new Error('Kling 4.0 文生视频需要填写提示词或分镜');
|
|
145
|
+
body.aspect_ratio = klingV4Ratio(params.falKling40AspectRatio, undefined) ?? '16:9';
|
|
146
|
+
return body;
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
pricing: {
|
|
150
|
+
currency: '$',
|
|
151
|
+
calculator: (params) => {
|
|
152
|
+
const mode = klingV4Mode(params.falKling40Mode);
|
|
153
|
+
const rate = rates(params);
|
|
154
|
+
const elementVideoSeconds = usesElements(params) ? subjectElementVideoSeconds(params.falKling40Elements) : 0;
|
|
155
|
+
if (mode === 'video-edit') {
|
|
156
|
+
const { source, input } = klingV4EditSeconds(params);
|
|
157
|
+
return rate.withVideoInput * Math.max(input + elementVideoSeconds + source, source * 2);
|
|
158
|
+
}
|
|
159
|
+
const duration = outputSeconds(params);
|
|
160
|
+
if (mode === 'reference-to-video' && (hasUploadedVideo(params) || elementVideoSeconds > 0)) {
|
|
161
|
+
const input = resolveUploadedVideoDurationSeconds(params, 5) + elementVideoSeconds;
|
|
162
|
+
return rate.withVideoInput * Math.max(input + duration, duration * 2);
|
|
163
|
+
}
|
|
164
|
+
return rate.video * duration;
|
|
165
|
+
},
|
|
166
|
+
description: '720p $0.157/秒、1080p $0.235/秒,分镜按各镜秒数之和计;视频编辑、带参考视频或视频元素时 720p $0.094/秒、1080p $0.141/秒,按输入加输出时长计费(至少为输出的 2 倍)'
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
export default falKling40Model;
|
|
@@ -5,7 +5,7 @@ export const klingImageO1Model = defineModel({
|
|
|
5
5
|
canonicalModelId: 'kling-image-o1',
|
|
6
6
|
provider: 'fal',
|
|
7
7
|
type: 'image',
|
|
8
|
-
tags: ['image
|
|
8
|
+
tags: ['image-to-image']
|
|
9
9
|
},
|
|
10
10
|
inputLimits: {
|
|
11
11
|
images: { min: 1, max: 10 },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineModel } from "../defineModel.js";
|
|
2
|
+
import { resolveUploadedVideoDurationSeconds } from "../shared/mediaPresence.js";
|
|
2
3
|
export const klingVideoO1Model = defineModel({
|
|
3
4
|
meta: {
|
|
4
5
|
id: 'fal-ai-kling-video-o1',
|
|
@@ -7,12 +8,17 @@ export const klingVideoO1Model = defineModel({
|
|
|
7
8
|
seriesRank: 10,
|
|
8
9
|
provider: 'fal',
|
|
9
10
|
type: 'video',
|
|
10
|
-
tags: ['
|
|
11
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode', 'video-to-video']
|
|
11
12
|
},
|
|
12
13
|
inputLimits: {
|
|
13
14
|
images: { max: 2 },
|
|
14
15
|
videos: { max: 0 },
|
|
15
16
|
rules: [
|
|
17
|
+
{
|
|
18
|
+
// 图生视频端点官方必填 start_image_url:没有首帧图时自动切到参考生视频(纯文字也能生成)。
|
|
19
|
+
when: 'falKlingVideoO1Mode === "image-to-video"',
|
|
20
|
+
images: { min: 1, max: 2 }
|
|
21
|
+
},
|
|
16
22
|
{
|
|
17
23
|
when: 'falKlingVideoO1Mode === "reference-to-video"',
|
|
18
24
|
images: { max: 7 }
|
|
@@ -56,6 +62,10 @@ export const klingVideoO1Model = defineModel({
|
|
|
56
62
|
order: 2,
|
|
57
63
|
type: 'dropdown',
|
|
58
64
|
default: 5,
|
|
65
|
+
// 视频编辑的成片时长跟随输入视频,官方编辑端点没有时长字段。
|
|
66
|
+
visible: {
|
|
67
|
+
condition: 'falKlingVideoO1Mode !== "video-to-video-edit"'
|
|
68
|
+
},
|
|
59
69
|
options: [
|
|
60
70
|
{ value: 5 },
|
|
61
71
|
{ value: 10 }
|
|
@@ -118,10 +128,9 @@ export const klingVideoO1Model = defineModel({
|
|
|
118
128
|
const aspectRatio = params.falKlingVideoO1AspectRatio;
|
|
119
129
|
const keepAudio = params.falKlingVideoO1KeepAudio || false;
|
|
120
130
|
const videoInput = typeof params.video === 'string' ? params.video : videos[0];
|
|
121
|
-
const requestData =
|
|
122
|
-
prompt
|
|
123
|
-
duration: `${duration}`
|
|
124
|
-
};
|
|
131
|
+
const requestData = mode === 'video-to-video-edit'
|
|
132
|
+
? { prompt }
|
|
133
|
+
: { prompt, duration: `${duration}` };
|
|
125
134
|
if (mode === 'image-to-video') {
|
|
126
135
|
if (images.length > 0) {
|
|
127
136
|
requestData.start_image_url = images[0];
|
|
@@ -157,11 +166,13 @@ export const klingVideoO1Model = defineModel({
|
|
|
157
166
|
currency: '$',
|
|
158
167
|
calculator: (params) => {
|
|
159
168
|
const mode = params.falKlingVideoO1Mode || 'image-to-video';
|
|
160
|
-
const
|
|
169
|
+
const chosen = Number(params.falKlingVideoO1VideoDuration) || 5;
|
|
170
|
+
// 编辑按输入视频时长计费;读不到时长时按官方输入上限 10 秒估,宁高勿低。
|
|
171
|
+
const duration = mode === 'video-to-video-edit' ? resolveUploadedVideoDurationSeconds(params, 10) : chosen;
|
|
161
172
|
const isVideoEdit = mode === 'video-to-video-edit' || mode === 'video-to-video-reference';
|
|
162
173
|
return (isVideoEdit ? 0.168 : 0.112) * duration;
|
|
163
174
|
},
|
|
164
|
-
description: '图生视频/参考生视频 $0.112
|
|
175
|
+
description: '图生视频/参考生视频 $0.112/秒;视频参考 $0.168/秒;视频编辑 $0.168/秒,按输入视频时长计'
|
|
165
176
|
}
|
|
166
177
|
});
|
|
167
178
|
export default klingVideoO1Model;
|
|
@@ -8,7 +8,7 @@ export const klingVideoV26ProModel = defineModel({
|
|
|
8
8
|
seriesRank: 2.6,
|
|
9
9
|
provider: 'fal',
|
|
10
10
|
type: 'video',
|
|
11
|
-
tags: ['
|
|
11
|
+
tags: ['text-to-video', 'image-to-video', 'motion-control']
|
|
12
12
|
},
|
|
13
13
|
inputLimits: {
|
|
14
14
|
images: { max: 1 },
|
|
@@ -200,7 +200,8 @@ export const klingVideoV26ProModel = defineModel({
|
|
|
200
200
|
generate_audio: generateAudio
|
|
201
201
|
};
|
|
202
202
|
if (images.length > 0) {
|
|
203
|
-
|
|
203
|
+
// 图生视频端点的首帧字段是 start_image_url(官方 OpenAPI 必填),image_url 只属于动作控制端点。
|
|
204
|
+
requestData.start_image_url = images[0];
|
|
204
205
|
}
|
|
205
206
|
else {
|
|
206
207
|
if (aspectRatio && aspectRatio !== 'auto') {
|