@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,49 @@
|
|
|
1
|
+
import { defineModel } from '../defineModel.js';
|
|
2
|
+
import { resolveUploadedImageSources } from '../shared/mediaPresence.js';
|
|
3
|
+
import { NANO21_RATIOS, NANO21_RESOLUTIONS, nano21Choice, nano21Count, nano21Options, nano21Prompt, nano21Ratio } from '../shared/nanoBanana21.js';
|
|
4
|
+
export const apimartNanoBanana21Model = defineModel({
|
|
5
|
+
meta: {
|
|
6
|
+
id: 'apimart-nano-banana-2.1', canonicalModelId: 'nano-banana-2.1', seriesId: 'nano-banana', seriesRank: 3.1,
|
|
7
|
+
provider: 'apimart', type: 'image',
|
|
8
|
+
tags: ['text-to-image', 'image-to-image'],
|
|
9
|
+
polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 40 },
|
|
10
|
+
},
|
|
11
|
+
// 官方只声明单张 20MB;Ext 另外声明总计 50MB,未声明参考图数量上限。
|
|
12
|
+
inputLimits: { images: {}, videos: { max: 0 }, audios: { max: 0 } },
|
|
13
|
+
params: [
|
|
14
|
+
{ id: 'apimartNanoBanana21Channel', type: 'dropdown', order: 1, default: 'official', options: nano21Options(['official', 'ext']) },
|
|
15
|
+
{ id: 'apimartNanoBanana21AspectRatio', type: 'dropdown', order: 2, default: 'smart', options: nano21Options(['smart', ...NANO21_RATIOS]) },
|
|
16
|
+
{ id: 'apimartNanoBanana21Resolution', type: 'dropdown', order: 3, default: '1K', options: nano21Options(NANO21_RESOLUTIONS) },
|
|
17
|
+
{ id: 'apimartNanoBanana21NumImages', type: 'number', order: 4, default: 1, min: 1, max: 4, step: 1, visible: { condition: p => p.apimartNanoBanana21Channel !== 'ext' } },
|
|
18
|
+
],
|
|
19
|
+
endpoints: '/v1/images/generations',
|
|
20
|
+
request: { builder: params => {
|
|
21
|
+
const channel = nano21Choice(params.apimartNanoBanana21Channel, ['official', 'ext'], 'official');
|
|
22
|
+
const resolution = nano21Choice(params.apimartNanoBanana21Resolution, NANO21_RESOLUTIONS, '1K');
|
|
23
|
+
const size = nano21Ratio(params.apimartNanoBanana21AspectRatio);
|
|
24
|
+
if (channel === 'ext' && resolution !== '1K' && ['1:4', '4:1', '1:8', '8:1'].includes(size)) {
|
|
25
|
+
throw new Error('Nano Banana 2.1 Ext 的极端比例仅支持 1K');
|
|
26
|
+
}
|
|
27
|
+
const body = {
|
|
28
|
+
model: channel === 'ext' ? 'gemini-nano-banana-2.1-ext' : 'gemini-nano-banana-2.1',
|
|
29
|
+
prompt: nano21Prompt(params), size, resolution,
|
|
30
|
+
n: nano21Count(params.apimartNanoBanana21NumImages, channel === 'ext' ? 1 : 4),
|
|
31
|
+
};
|
|
32
|
+
const images = resolveUploadedImageSources(params);
|
|
33
|
+
if (images.length)
|
|
34
|
+
body.image_urls = images;
|
|
35
|
+
// 不自动转入官方渠道:其 token 费用与 Ext 单张价格不同。
|
|
36
|
+
if (channel === 'ext')
|
|
37
|
+
body.official_fallback = false;
|
|
38
|
+
return body;
|
|
39
|
+
} },
|
|
40
|
+
pricing: {
|
|
41
|
+
currency: '$', calculator: params => {
|
|
42
|
+
const ext = params.apimartNanoBanana21Channel === 'ext';
|
|
43
|
+
const prices = ext ? { '1K': 0.02, '2K': 0.025, '4K': 0.03 } : { '1K': 0.02688, '2K': 0.04032, '4K': 0.09072 };
|
|
44
|
+
return (prices[String(params.apimartNanoBanana21Resolution ?? '1K')] ?? prices['1K']) * nano21Count(params.apimartNanoBanana21NumImages, ext ? 1 : 4);
|
|
45
|
+
},
|
|
46
|
+
description: 'Ext 按张计费:1K $0.02、2K $0.025、4K $0.03。官方按实际 Token 结算;输出图像参考估算 $0.02688/$0.04032/$0.09072,输入与思考 Token 另计,非固定单张价。',
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
export default apimartNanoBanana21Model;
|
|
@@ -6,7 +6,7 @@ export const apimartNanoBanana2Model = defineModel({
|
|
|
6
6
|
meta: {
|
|
7
7
|
id: 'apimart-nano-banana-2', canonicalModelId: 'nano-banana-2', seriesId: 'nano-banana', seriesRank: 3,
|
|
8
8
|
provider: 'apimart', type: 'image',
|
|
9
|
-
tags: ['text-to-image', 'image-to-image'
|
|
9
|
+
tags: ['text-to-image', 'image-to-image'],
|
|
10
10
|
aliases: ['nano-banana-2-apimart'],
|
|
11
11
|
polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 40 }
|
|
12
12
|
},
|
|
@@ -6,7 +6,7 @@ export const apimartNanoBananaProModel = defineModel({
|
|
|
6
6
|
meta: {
|
|
7
7
|
id: 'apimart-nano-banana-pro', canonicalModelId: 'nano-banana-pro', seriesId: 'nano-banana', seriesRank: 2,
|
|
8
8
|
provider: 'apimart', type: 'image',
|
|
9
|
-
tags: ['text-to-image', 'image-to-image'
|
|
9
|
+
tags: ['text-to-image', 'image-to-image'],
|
|
10
10
|
aliases: ['nano-banana-pro-apimart'],
|
|
11
11
|
polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 40 }
|
|
12
12
|
},
|
|
@@ -6,7 +6,7 @@ export const apimartQwenImage30Model = defineModel({
|
|
|
6
6
|
meta: {
|
|
7
7
|
id: 'apimart-qwen-image-3.0', canonicalModelId: 'qwen-image-3.0', seriesId: 'qwen-image', seriesRank: 3,
|
|
8
8
|
provider: 'apimart', type: 'image',
|
|
9
|
-
tags: ['text-to-image', 'image-to-image'
|
|
9
|
+
tags: ['text-to-image', 'image-to-image'],
|
|
10
10
|
aliases: ['qwen-image-3-apimart'],
|
|
11
11
|
polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 40 }
|
|
12
12
|
},
|
|
@@ -4,7 +4,7 @@ export const apimartSeedance20FastModel = defineModel({
|
|
|
4
4
|
meta: {
|
|
5
5
|
id: 'apimart-seedance-2.0-fast', canonicalModelId: 'seedance-2.0-fast', seriesId: 'seedance', seriesRank: 2.1,
|
|
6
6
|
provider: 'apimart', 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: ['seedance-2-fast-apimart'], polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 70 }
|
|
9
9
|
},
|
|
10
10
|
inputLimits: {
|
|
@@ -4,7 +4,7 @@ export const apimartSeedance20MiniModel = defineModel({
|
|
|
4
4
|
meta: {
|
|
5
5
|
id: 'apimart-seedance-2.0-mini', canonicalModelId: 'seedance-2.0-mini', seriesId: 'seedance', seriesRank: 2.05,
|
|
6
6
|
provider: 'apimart', 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: ['seedance-2-mini-apimart'], polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 70 }
|
|
9
9
|
},
|
|
10
10
|
inputLimits: {
|
|
@@ -96,13 +96,13 @@ export const apimartSeedance20MiniModel = defineModel({
|
|
|
96
96
|
calculator: (params) => {
|
|
97
97
|
const duration = Math.min(15, Math.max(4, Math.round(Number(params.apimartSeedance20MiniDuration || 5))));
|
|
98
98
|
const rate = params.apimartSeedance20MiniResolution === '480p'
|
|
99
|
-
? { noVideo: 0.
|
|
100
|
-
: { noVideo: 0.
|
|
99
|
+
? { noVideo: 0.01815, withVideo: 0.01105 }
|
|
100
|
+
: { noVideo: 0.03903, withVideo: 0.02376 };
|
|
101
101
|
const hasVideo = params.apimartSeedance20MiniMode === 'reference-to-video' && countUploadedVideos(params) > 0;
|
|
102
102
|
const inputDuration = hasVideo ? resolveUploadedVideoDurationSeconds(params) : 0;
|
|
103
103
|
return (duration + (hasVideo ? inputDuration : 0)) * (hasVideo ? rate.withVideo : rate.noVideo);
|
|
104
104
|
},
|
|
105
|
-
description: '无/有视频输入每秒:480p $0.
|
|
105
|
+
description: '无/有视频输入每秒:480p $0.01815/$0.01105,720p $0.03903/$0.02376;有视频时按输入与输出总时长计费'
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
export default apimartSeedance20MiniModel;
|
|
@@ -4,7 +4,7 @@ export const apimartSeedance20Model = defineModel({
|
|
|
4
4
|
meta: {
|
|
5
5
|
id: 'apimart-seedance-2.0', canonicalModelId: 'seedance-2.0', seriesId: 'seedance', seriesRank: 2,
|
|
6
6
|
provider: 'apimart', 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: ['seedance-2-apimart'], polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 80 }
|
|
9
9
|
},
|
|
10
10
|
inputLimits: {
|
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import { defineModel } from "../defineModel.js";
|
|
2
|
-
import { countUploadedVideos, resolveUploadedVideoDurationSeconds } from '../shared/mediaPresence.js';
|
|
2
|
+
import { countUploadedVideos, resolveUploadedVideoDurationSeconds, hasUploadedImage } from '../shared/mediaPresence.js';
|
|
3
3
|
export const apimartSeedance25Model = defineModel({
|
|
4
4
|
meta: {
|
|
5
5
|
id: 'apimart-seedance-2.5', canonicalModelId: 'seedance-2.5', seriesId: 'seedance', seriesRank: 2.5,
|
|
6
6
|
provider: 'apimart', 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', 'video-to-video', 'video-extension'],
|
|
8
8
|
aliases: ['seedance-2-5-apimart'], polling: { interval: 3000, maxAttempts: 400, expectedAttempts: 100 }
|
|
9
9
|
},
|
|
10
10
|
inputLimits: {
|
|
11
11
|
images: { max: 2 }, videos: { max: 0 }, audios: { max: 0 },
|
|
12
|
-
rules: [
|
|
12
|
+
rules: [
|
|
13
|
+
{ when: 'apimartSeedance25Mode === "reference-to-video"', images: { max: 30 }, videos: { max: 10 }, audios: { max: 10 } },
|
|
14
|
+
{
|
|
15
|
+
imageConstraints: { minShortSidePx: 300, maxLongSidePx: 6000, minAspectRatio: 0.4, maxAspectRatio: 2.5 },
|
|
16
|
+
videoConstraints: { minShortSidePx: 300, maxLongSidePx: 6000, minPixels: 409_600, maxPixels: 8_295_044, minAspectRatio: 0.4, maxAspectRatio: 2.5 }
|
|
17
|
+
}
|
|
18
|
+
]
|
|
13
19
|
},
|
|
20
|
+
// 视频编辑与延长必须有一段参考视频:写成提交前提示而不是数量下限,下限会让画布把用户选的任务悄悄换成付费的自动参考。
|
|
21
|
+
requirements: [{
|
|
22
|
+
id: 'apimart-seedance-2.5-video-task',
|
|
23
|
+
when: 'apimartSeedance25Mode === "reference-to-video" && (apimartSeedance25TaskType === "edit" || apimartSeedance25TaskType === "extend")',
|
|
24
|
+
require: { videos: { min: 1 } },
|
|
25
|
+
message: { title: '需要参考视频', message: '视频编辑和视频延长需要上传一段参考视频', type: 'warning' }
|
|
26
|
+
}],
|
|
14
27
|
params: [
|
|
15
28
|
{
|
|
16
29
|
id: 'apimartSeedance25Mode', type: 'dropdown', order: 1,
|
|
@@ -33,6 +46,10 @@ export const apimartSeedance25Model = defineModel({
|
|
|
33
46
|
},
|
|
34
47
|
{
|
|
35
48
|
id: 'apimartSeedance25AspectRatio', type: 'dropdown', order: 3,
|
|
49
|
+
// 首帧 / 首尾帧与编辑、延长任务只能 adaptive,比例跟随素材。
|
|
50
|
+
visible: { condition: (params) => params.apimartSeedance25Mode === 'reference-to-video'
|
|
51
|
+
? !['edit', 'extend'].includes(String(params.apimartSeedance25TaskType))
|
|
52
|
+
: !hasUploadedImage(params) },
|
|
36
53
|
default: 'smart',
|
|
37
54
|
options: [{ value: 'smart' }, ...['1:1', '4:3', '3:4', '16:9', '9:16', '21:9'].map((ratio) => ({ value: ratio }))]
|
|
38
55
|
},
|
|
@@ -43,10 +60,14 @@ export const apimartSeedance25Model = defineModel({
|
|
|
43
60
|
},
|
|
44
61
|
{
|
|
45
62
|
id: 'apimartSeedance25Duration', type: 'number', order: 5,
|
|
63
|
+
// 编辑任务的时长跟随参考视频。
|
|
64
|
+
visible: { condition: (params) => !(params.apimartSeedance25Mode === 'reference-to-video' && params.apimartSeedance25TaskType === 'edit') },
|
|
46
65
|
default: 5, min: 4, max: 30, step: 1
|
|
47
66
|
},
|
|
48
67
|
{
|
|
49
68
|
id: 'apimartSeedance25AutoDuration', type: 'switch', order: 6,
|
|
69
|
+
// 编辑任务的时长跟随参考视频。
|
|
70
|
+
visible: { condition: (params) => !(params.apimartSeedance25Mode === 'reference-to-video' && params.apimartSeedance25TaskType === 'edit') },
|
|
50
71
|
default: false
|
|
51
72
|
},
|
|
52
73
|
{
|
|
@@ -77,7 +98,7 @@ export const apimartSeedance25Model = defineModel({
|
|
|
77
98
|
const ratios = ['1:1', '4:3', '3:4', '16:9', '9:16', '21:9'];
|
|
78
99
|
const raw = String(params.apimartSeedance25AspectRatio || 'smart');
|
|
79
100
|
const mode = params.apimartSeedance25Mode === 'reference-to-video' ? 'reference-to-video' : 'text-image-to-video';
|
|
80
|
-
const taskType = ['reference', 'edit', 'extend'].includes(String(params.apimartSeedance25TaskType))
|
|
101
|
+
const taskType = mode === 'reference-to-video' && ['reference', 'edit', 'extend'].includes(String(params.apimartSeedance25TaskType))
|
|
81
102
|
? String(params.apimartSeedance25TaskType)
|
|
82
103
|
: 'auto';
|
|
83
104
|
const hasFrames = mode === 'text-image-to-video' && images.length > 0;
|
|
@@ -119,7 +140,8 @@ export const apimartSeedance25Model = defineModel({
|
|
|
119
140
|
pricing: {
|
|
120
141
|
currency: '$',
|
|
121
142
|
calculator: (params) => {
|
|
122
|
-
const autoDuration = params.apimartSeedance25AutoDuration === true
|
|
143
|
+
const autoDuration = params.apimartSeedance25AutoDuration === true
|
|
144
|
+
|| (params.apimartSeedance25Mode === 'reference-to-video' && params.apimartSeedance25TaskType === 'edit');
|
|
123
145
|
const duration = autoDuration ? 30 : Math.min(30, Math.max(4, Math.round(Number(params.apimartSeedance25Duration || 5))));
|
|
124
146
|
const rates = {
|
|
125
147
|
'480p': { noVideo: 0.09608, withVideo: 0.0576 },
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** APIMart Seedream 5.0 Flash 图片生成与编辑模型(运行时契约) */
|
|
2
|
+
import { defineModel } from '../defineModel.js';
|
|
3
|
+
import { hasUploadedImage, resolveUploadedImageSources } from '../shared/mediaPresence.js';
|
|
4
|
+
const RATIOS = ['1:1', '4:3', '3:4', '16:9', '9:16', '3:2', '2:3', '2:1', '1:2', '21:9'];
|
|
5
|
+
const RESOLUTIONS = ['1K', '1.5K', '2K'];
|
|
6
|
+
function ratio(params) {
|
|
7
|
+
const raw = String(params.apimartSeedream50FlashAspectRatio || 'smart');
|
|
8
|
+
if (RATIOS.includes(raw))
|
|
9
|
+
return raw;
|
|
10
|
+
const hint = hasUploadedImage(params) && typeof params.__firstImageRatio === 'number'
|
|
11
|
+
&& Number.isFinite(params.__firstImageRatio) && params.__firstImageRatio > 0 ? params.__firstImageRatio : 1;
|
|
12
|
+
const numeric = (value) => { const [w, h] = value.split(':').map(Number); return w / h; };
|
|
13
|
+
return RATIOS.reduce((best, next) => Math.abs(numeric(next) - hint) < Math.abs(numeric(best) - hint) ? next : best, '1:1');
|
|
14
|
+
}
|
|
15
|
+
export const apimartSeedream50FlashModel = defineModel({
|
|
16
|
+
meta: {
|
|
17
|
+
id: 'apimart-seedream-5.0-flash', canonicalModelId: 'seedream-5.0-flash', seriesId: 'seedream', seriesRank: 5.05,
|
|
18
|
+
provider: 'apimart', type: 'image',
|
|
19
|
+
tags: ['text-to-image', 'image-to-image'],
|
|
20
|
+
polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 30 },
|
|
21
|
+
},
|
|
22
|
+
inputLimits: { images: { max: 10 }, videos: { max: 0 } },
|
|
23
|
+
params: [
|
|
24
|
+
{ id: 'apimartSeedream50FlashAspectRatio', type: 'dropdown', order: 1, default: 'smart', options: [{ value: 'smart' }, ...RATIOS.map(value => ({ value }))] },
|
|
25
|
+
// 1.5K 与 1K 同价、画质更好,所以默认 1.5K。
|
|
26
|
+
{ id: 'apimartSeedream50FlashResolution', type: 'dropdown', order: 2, default: '1.5K', options: RESOLUTIONS.map(value => ({ value })) },
|
|
27
|
+
],
|
|
28
|
+
endpoints: '/v1/images/generations',
|
|
29
|
+
request: {
|
|
30
|
+
builder: (params) => {
|
|
31
|
+
const images = resolveUploadedImageSources(params);
|
|
32
|
+
if (images.length > 10)
|
|
33
|
+
throw new Error('Seedream 5.0 Flash 最多支持 10 张参考图');
|
|
34
|
+
const body = {
|
|
35
|
+
model: 'seedream-5-0-flash',
|
|
36
|
+
prompt: typeof params.prompt === 'string' ? params.prompt : '',
|
|
37
|
+
size: ratio(params),
|
|
38
|
+
resolution: RESOLUTIONS.includes(String(params.apimartSeedream50FlashResolution)) ? String(params.apimartSeedream50FlashResolution) : '1.5K',
|
|
39
|
+
n: 1,
|
|
40
|
+
};
|
|
41
|
+
if (images.length > 0)
|
|
42
|
+
body.image_urls = images;
|
|
43
|
+
return body;
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
pricing: {
|
|
47
|
+
currency: '$',
|
|
48
|
+
fixed: 0.01371,
|
|
49
|
+
description: '1K / 1.5K / 2K 统一 $0.01371/张',
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
export default apimartSeedream50FlashModel;
|
|
@@ -6,10 +6,10 @@ export const apimartSeedream50LiteModel = defineModel({
|
|
|
6
6
|
meta: {
|
|
7
7
|
id: 'apimart-seedream-5.0-lite', canonicalModelId: 'seedream-5.0-lite', seriesId: 'seedream', seriesRank: 5,
|
|
8
8
|
provider: 'apimart', type: 'image',
|
|
9
|
-
tags: ['text-to-image', 'image-to-image'
|
|
9
|
+
tags: ['text-to-image', 'image-to-image'],
|
|
10
10
|
aliases: ['seedream-5-lite-apimart'], polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 40 }
|
|
11
11
|
},
|
|
12
|
-
inputLimits: { images: { max: 14 }, videos: { max: 0 } },
|
|
12
|
+
inputLimits: { images: { max: 14 }, videos: { max: 0 }, rules: [{ imageConstraints: { minAspectRatio: 1 / 3, maxAspectRatio: 3 } }] },
|
|
13
13
|
params: [
|
|
14
14
|
{
|
|
15
15
|
id: 'apimartSeedream50LiteAspectRatio', type: 'dropdown', order: 1,
|
|
@@ -70,9 +70,9 @@ export const apimartSeedream50LiteModel = defineModel({
|
|
|
70
70
|
calculator: (params) => {
|
|
71
71
|
const images = countUploadedImages(params);
|
|
72
72
|
const requested = Math.min(15, Math.max(1, Math.round(Number(params.apimartSeedream50LiteCount || 1))));
|
|
73
|
-
return Math.max(1, Math.min(requested, 15 - Math.min(14, images))) * 0.
|
|
73
|
+
return Math.max(1, Math.min(requested, 15 - Math.min(14, images))) * 0.028;
|
|
74
74
|
},
|
|
75
|
-
description: '$0.
|
|
75
|
+
description: '$0.028/张;参考图数量与生成数量之和不超过 15'
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
export default apimartSeedream50LiteModel;
|
|
@@ -7,7 +7,7 @@ export const apimartSeedream50ProModel = defineModel({
|
|
|
7
7
|
meta: {
|
|
8
8
|
id: 'apimart-seedream-5.0-pro', canonicalModelId: 'seedream-5.0-pro', seriesId: 'seedream', seriesRank: 5.1,
|
|
9
9
|
provider: 'apimart', type: 'image',
|
|
10
|
-
tags: ['text-to-image', 'image-to-image', '
|
|
10
|
+
tags: ['text-to-image', 'image-to-image', 'layer-decomposition', 'transparent-background'],
|
|
11
11
|
aliases: ['seedream-5-pro-apimart'], polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 40 }
|
|
12
12
|
},
|
|
13
13
|
inputLimits: {
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/** APIMart Veo 3.1 Ext 与官方渠道统一模型(运行时契约) */
|
|
2
|
+
import { defineModel } from '../defineModel.js';
|
|
3
|
+
import { resolveUploadedImageSources } from '../shared/mediaPresence.js';
|
|
4
|
+
const RESOLUTIONS = ['720p', '1080p', '4k'];
|
|
5
|
+
const EXT_PRICES = {
|
|
6
|
+
fast: { standard: 0.14, uhd: 0.64 },
|
|
7
|
+
quality: { standard: 1, uhd: 1.5 },
|
|
8
|
+
lite: { standard: 0.07, uhd: 0.57 },
|
|
9
|
+
};
|
|
10
|
+
const OFFICIAL_RATES = {
|
|
11
|
+
fast: { '720p': [0.064, 0.08], '1080p': [0.08, 0.096], '4k': [0.2, 0.24] },
|
|
12
|
+
quality: { '720p': [0.16, 0.32], '1080p': [0.16, 0.32], '4k': [0.32, 0.48] },
|
|
13
|
+
};
|
|
14
|
+
function isOfficial(params) {
|
|
15
|
+
return params.apimartVeo31Channel === 'official';
|
|
16
|
+
}
|
|
17
|
+
/** 官方渠道没有 Lite,切到官方时按 Fast 处理。 */
|
|
18
|
+
function variant(params) {
|
|
19
|
+
const value = params.apimartVeo31Variant;
|
|
20
|
+
if (value === 'quality')
|
|
21
|
+
return 'quality';
|
|
22
|
+
if (value === 'lite' && !isOfficial(params))
|
|
23
|
+
return 'lite';
|
|
24
|
+
return 'fast';
|
|
25
|
+
}
|
|
26
|
+
function resolution(params) {
|
|
27
|
+
return RESOLUTIONS.includes(String(params.apimartVeo31Resolution)) ? String(params.apimartVeo31Resolution) : '720p';
|
|
28
|
+
}
|
|
29
|
+
function officialDuration(params) {
|
|
30
|
+
const value = Number(params.apimartVeo31Duration);
|
|
31
|
+
return [4, 6, 8].includes(value) ? value : 8;
|
|
32
|
+
}
|
|
33
|
+
export const apimartVeo31Model = defineModel({
|
|
34
|
+
meta: {
|
|
35
|
+
id: 'apimart-veo-3.1', canonicalModelId: 'veo-3.1', provider: 'apimart', type: 'video',
|
|
36
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode'],
|
|
37
|
+
polling: { interval: 5000, maxAttempts: 240, expectedAttempts: 40 },
|
|
38
|
+
},
|
|
39
|
+
inputLimits: {
|
|
40
|
+
images: { max: 2 }, videos: { max: 0 },
|
|
41
|
+
rules: [
|
|
42
|
+
{ when: 'apimartVeo31Channel !== "official" && apimartVeo31Variant === "lite"', images: { max: 0 } },
|
|
43
|
+
{ when: 'apimartVeo31Channel !== "official" && apimartVeo31Variant === "fast" && apimartVeo31Mode === "reference-to-video"', images: { min: 1, max: 3 } },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
requirements: [{
|
|
47
|
+
id: 'apimart-veo-31-prompt',
|
|
48
|
+
require: { prompt: true },
|
|
49
|
+
message: { title: '提示词必需', message: 'Veo 3.1 需要填写提示词。', type: 'warning' },
|
|
50
|
+
}],
|
|
51
|
+
params: [
|
|
52
|
+
{ id: 'apimartVeo31Channel', type: 'dropdown', order: 1, default: 'ext', options: [{ value: 'ext' }, { value: 'official' }] },
|
|
53
|
+
{ id: 'apimartVeo31Variant', type: 'dropdown', order: 2, default: 'fast', options: [{ value: 'fast' }, { value: 'quality' }, { value: 'lite' }] },
|
|
54
|
+
// 参考图生视频只有 Ext 渠道的 Fast 支持。
|
|
55
|
+
{
|
|
56
|
+
id: 'apimartVeo31Mode', type: 'dropdown', order: 3, default: 'text-image-to-video',
|
|
57
|
+
options: [{ value: 'text-image-to-video' }, { value: 'reference-to-video' }],
|
|
58
|
+
visible: { condition: 'apimartVeo31Channel !== "official" && apimartVeo31Variant === "fast"' },
|
|
59
|
+
},
|
|
60
|
+
{ id: 'apimartVeo31AspectRatio', type: 'dropdown', order: 4, default: '16:9', options: [{ value: '16:9' }, { value: '9:16' }] },
|
|
61
|
+
{ id: 'apimartVeo31Resolution', type: 'dropdown', order: 5, default: '720p', options: RESOLUTIONS.map(value => ({ value })) },
|
|
62
|
+
// Ext 渠道固定 8 秒。
|
|
63
|
+
{
|
|
64
|
+
id: 'apimartVeo31Duration', type: 'dropdown', order: 6, default: 8, options: [{ value: 4 }, { value: 6 }, { value: 8 }],
|
|
65
|
+
visible: { condition: 'apimartVeo31Channel === "official"' },
|
|
66
|
+
},
|
|
67
|
+
{ id: 'apimartVeo31GenerateAudio', type: 'switch', order: 7, default: true, visible: { condition: 'apimartVeo31Channel === "official"' } },
|
|
68
|
+
],
|
|
69
|
+
endpoints: '/v1/videos/generations',
|
|
70
|
+
request: {
|
|
71
|
+
builder: (params) => {
|
|
72
|
+
const prompt = typeof params.prompt === 'string' ? params.prompt.trim() : '';
|
|
73
|
+
if (!prompt)
|
|
74
|
+
throw new Error('Veo 3.1 需要填写提示词');
|
|
75
|
+
const images = resolveUploadedImageSources(params);
|
|
76
|
+
const current = variant(params);
|
|
77
|
+
const tier = resolution(params);
|
|
78
|
+
const aspectRatio = params.apimartVeo31AspectRatio === '9:16' ? '9:16' : '16:9';
|
|
79
|
+
if (isOfficial(params)) {
|
|
80
|
+
if (images.length > 2)
|
|
81
|
+
throw new Error('Veo 3.1 官方渠道最多支持首帧和尾帧 2 张图片');
|
|
82
|
+
const body = {
|
|
83
|
+
model: `veo3.1-${current}-official`, prompt, duration: officialDuration(params), aspect_ratio: aspectRatio,
|
|
84
|
+
resolution: tier === '4k' ? '4K' : tier, generate_audio: params.apimartVeo31GenerateAudio !== false,
|
|
85
|
+
nsfw_check: false,
|
|
86
|
+
};
|
|
87
|
+
if (images[0])
|
|
88
|
+
body.first_frame_image = images[0];
|
|
89
|
+
if (images[1])
|
|
90
|
+
body.last_frame_image = images[1];
|
|
91
|
+
return body;
|
|
92
|
+
}
|
|
93
|
+
const body = {
|
|
94
|
+
model: `veo3.1-${current}`, prompt, duration: 8, aspect_ratio: aspectRatio, resolution: tier, nsfw_check: false,
|
|
95
|
+
};
|
|
96
|
+
if (current === 'lite') {
|
|
97
|
+
if (images.length > 0)
|
|
98
|
+
throw new Error('Veo 3.1 Lite 不支持参考图');
|
|
99
|
+
return body;
|
|
100
|
+
}
|
|
101
|
+
const reference = current === 'fast' && params.apimartVeo31Mode === 'reference-to-video';
|
|
102
|
+
if (reference) {
|
|
103
|
+
if (images.length === 0 || images.length > 3)
|
|
104
|
+
throw new Error('Veo 3.1 参考图生视频需要 1–3 张参考图');
|
|
105
|
+
body.generation_type = 'reference';
|
|
106
|
+
body.image_urls = images;
|
|
107
|
+
}
|
|
108
|
+
else if (images.length > 0) {
|
|
109
|
+
if (images.length > 2)
|
|
110
|
+
throw new Error('Veo 3.1 首尾帧最多 2 张图片');
|
|
111
|
+
body.generation_type = 'frame';
|
|
112
|
+
body.image_urls = images;
|
|
113
|
+
}
|
|
114
|
+
return body;
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
pricing: {
|
|
118
|
+
currency: '$',
|
|
119
|
+
calculator: (params) => {
|
|
120
|
+
const current = variant(params);
|
|
121
|
+
const tier = resolution(params);
|
|
122
|
+
if (isOfficial(params)) {
|
|
123
|
+
const rates = OFFICIAL_RATES[current === 'quality' ? 'quality' : 'fast'][tier];
|
|
124
|
+
return rates[params.apimartVeo31GenerateAudio === false ? 0 : 1] * officialDuration(params);
|
|
125
|
+
}
|
|
126
|
+
const prices = EXT_PRICES[current];
|
|
127
|
+
return tier === '4k' ? prices.uhd : prices.standard;
|
|
128
|
+
},
|
|
129
|
+
description: 'Ext 渠道每条 8 秒:Fast 720p/1080p $0.14、4k $0.64;Quality $1 / $1.5;Lite $0.07 / $0.57。官方渠道按秒:Fast 720p $0.064(含音频 $0.08)、1080p $0.08($0.096)、4K $0.2($0.24);Quality 720p/1080p $0.16($0.32)、4K $0.32($0.48)',
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
export default apimartVeo31Model;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/** APIMart 万相 2.7 Image 标准版与 Pro 统一模型(运行时契约) */
|
|
2
|
+
import { defineModel } from '../defineModel.js';
|
|
3
|
+
import { resolveUploadedImageSources, hasUploadedImage } from '../shared/mediaPresence.js';
|
|
4
|
+
// 字段、限制与价格来源:docs/model-adaptation/Wan-2.7-Image/Wan-2.7-Image_APIMart.md(2026-11-07 读取)。
|
|
5
|
+
const RATIOS = ['1:1', '16:9', '9:16', '4:3', '3:4', '3:2', '2:3'];
|
|
6
|
+
const RESOLUTIONS = ['1K', '2K', '4K'];
|
|
7
|
+
const PRICES = { standard: 0.0216, pro: 0.0544 };
|
|
8
|
+
function variant(params) {
|
|
9
|
+
return params.apimartWan27ImageVariant === 'pro' ? 'pro' : 'standard';
|
|
10
|
+
}
|
|
11
|
+
function sequential(params) {
|
|
12
|
+
return params.apimartWan27ImageSequential === true;
|
|
13
|
+
}
|
|
14
|
+
function count(params) {
|
|
15
|
+
const value = params.apimartWan27ImageCount;
|
|
16
|
+
if (value === undefined)
|
|
17
|
+
return 1;
|
|
18
|
+
const max = sequential(params) ? 12 : 4;
|
|
19
|
+
if (typeof value !== 'number' || !Number.isInteger(value) || value < 1 || value > max) {
|
|
20
|
+
throw new Error(`万相 2.7 Image ${sequential(params) ? '组图模式' : ''}生成数量必须为 1–${max} 的整数`);
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
export const apimartWan27ImageModel = defineModel({
|
|
25
|
+
meta: {
|
|
26
|
+
id: 'apimart-wan-2.7-image', canonicalModelId: 'wan-2.7-image', seriesId: 'wan', seriesRank: 2.7,
|
|
27
|
+
provider: 'apimart', type: 'image',
|
|
28
|
+
tags: ['text-to-image', 'image-to-image'],
|
|
29
|
+
polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 20 },
|
|
30
|
+
},
|
|
31
|
+
inputLimits: { images: { max: 9 }, videos: { max: 0 } },
|
|
32
|
+
params: [
|
|
33
|
+
{ id: 'apimartWan27ImageVariant', type: 'dropdown', order: 1, default: 'standard', options: [{ value: 'standard' }, { value: 'pro' }] },
|
|
34
|
+
{ id: 'apimartWan27ImageAspectRatio', type: 'dropdown', order: 2, visible: { condition: (params) => !hasUploadedImage(params) }, default: 'smart', options: [{ value: 'smart' }, ...RATIOS.map(value => ({ value }))] },
|
|
35
|
+
{ id: 'apimartWan27ImageResolution', type: 'dropdown', order: 3, default: '2K', options: RESOLUTIONS.map(value => ({ value })) },
|
|
36
|
+
// 静态上限取组图的 12,非组图时由展示层联动收窄到 4;校验器只认静态范围。
|
|
37
|
+
{ id: 'apimartWan27ImageCount', type: 'number', order: 4, default: 1, min: 1, max: 12, step: 1 },
|
|
38
|
+
{ id: 'apimartWan27ImageSequential', type: 'switch', order: 5, default: false },
|
|
39
|
+
],
|
|
40
|
+
endpoints: '/v1/images/generations',
|
|
41
|
+
request: {
|
|
42
|
+
builder: (params) => {
|
|
43
|
+
const prompt = typeof params.prompt === 'string' ? params.prompt.trim() : '';
|
|
44
|
+
const images = resolveUploadedImageSources(params);
|
|
45
|
+
if (!prompt && images.length === 0)
|
|
46
|
+
throw new Error('请输入万相 2.7 Image 提示词');
|
|
47
|
+
if (images.length > 9)
|
|
48
|
+
throw new Error('万相 2.7 Image 最多支持 9 张参考图');
|
|
49
|
+
const resolution = RESOLUTIONS.includes(String(params.apimartWan27ImageResolution)) ? String(params.apimartWan27ImageResolution) : '2K';
|
|
50
|
+
// 平台只在 Pro 的非组图文生图开放 4K,其余场景会拒绝。
|
|
51
|
+
if (resolution === '4K' && (variant(params) !== 'pro' || images.length > 0 || sequential(params))) {
|
|
52
|
+
throw new Error('万相 2.7 Image 只有 Pro 版文生图(非组图)支持 4K');
|
|
53
|
+
}
|
|
54
|
+
const body = {
|
|
55
|
+
model: variant(params) === 'pro' ? 'wan2.7-image-pro' : 'wan2.7-image',
|
|
56
|
+
resolution,
|
|
57
|
+
n: count(params),
|
|
58
|
+
};
|
|
59
|
+
if (prompt)
|
|
60
|
+
body.prompt = prompt.slice(0, 5000);
|
|
61
|
+
if (sequential(params))
|
|
62
|
+
body.enable_sequential = true;
|
|
63
|
+
if (images.length > 0) {
|
|
64
|
+
// 有输入图时平台把输出比例对齐最后一张图,比例字段不会生效,不发送。
|
|
65
|
+
body.image_urls = images;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
const raw = String(params.apimartWan27ImageAspectRatio || 'smart');
|
|
69
|
+
body.size = RATIOS.includes(raw) ? raw : '1:1';
|
|
70
|
+
}
|
|
71
|
+
return body;
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
pricing: {
|
|
75
|
+
currency: '$',
|
|
76
|
+
calculator: params => PRICES[variant(params)] * count(params),
|
|
77
|
+
description: '标准版每张 $0.0216、Pro 每张 $0.0544,按成功生成的张数计费,与分辨率和比例无关;输入图不收费',
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
export default apimartWan27ImageModel;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/** APIMart Wan 3.0 / Wan 3.0 Prime 视频模型(运行时契约) */
|
|
2
|
+
import { defineModel } from '../defineModel.js';
|
|
3
|
+
import { resolveUploadedImageSources, resolveUploadedVideoDurationSeconds, resolveUploadedVideoSources, } from '../shared/mediaPresence.js';
|
|
4
|
+
const RATIOS = ['16:9', '4:3', '1:1', '3:4', '9:16'];
|
|
5
|
+
const RESOLUTIONS = ['480P', '720P', '1080P'];
|
|
6
|
+
const RATES = {
|
|
7
|
+
standard: { '480P': 0.03288, '720P': 0.06575, '1080P': 0.1315 },
|
|
8
|
+
prime: { '480P': 0.05143, '720P': 0.10286, '1080P': 0.20571 },
|
|
9
|
+
};
|
|
10
|
+
function audioSources(params) {
|
|
11
|
+
const pick = (value) => Array.isArray(value)
|
|
12
|
+
? value.filter((item) => typeof item === 'string' && item.trim().length > 0) : [];
|
|
13
|
+
const uploaded = pick(params.uploadedAudioFilePaths);
|
|
14
|
+
return uploaded.length > 0 ? uploaded : pick(params.audios);
|
|
15
|
+
}
|
|
16
|
+
function duration(params) {
|
|
17
|
+
return Math.min(30, Math.max(2, Math.round(Number(params.apimartWan30Duration || 5))));
|
|
18
|
+
}
|
|
19
|
+
function resolution(params) {
|
|
20
|
+
return RESOLUTIONS.includes(String(params.apimartWan30Resolution)) ? String(params.apimartWan30Resolution) : '720P';
|
|
21
|
+
}
|
|
22
|
+
export const apimartWan30Model = defineModel({
|
|
23
|
+
meta: {
|
|
24
|
+
id: 'apimart-wan-3.0', canonicalModelId: 'wan-3.0', seriesId: 'wan', seriesRank: 3,
|
|
25
|
+
provider: 'apimart', type: 'video',
|
|
26
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode'],
|
|
27
|
+
polling: { interval: 5000, maxAttempts: 240, expectedAttempts: 50 },
|
|
28
|
+
},
|
|
29
|
+
inputLimits: {
|
|
30
|
+
images: { max: 2 }, videos: { max: 0 }, audios: { max: 0 },
|
|
31
|
+
rules: [
|
|
32
|
+
{ when: 'apimartWan30Mode === "reference-to-video"', images: { max: 10 }, videos: { max: 5 }, audios: { max: 5 } },
|
|
33
|
+
{ videoConstraints: { minDurationSec: 1, maxDurationSec: 15 }, imageConstraints: { minShortSidePx: 240, maxLongSidePx: 8000 } },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
params: [
|
|
37
|
+
{ id: 'apimartWan30Variant', type: 'dropdown', order: 1, default: 'standard', options: [{ value: 'standard' }, { value: 'prime' }] },
|
|
38
|
+
{ id: 'apimartWan30Mode', type: 'dropdown', order: 2, default: 'text-image-to-video', options: [{ value: 'text-image-to-video' }, { value: 'reference-to-video' }] },
|
|
39
|
+
{ id: 'apimartWan30AspectRatio', type: 'dropdown', order: 3, default: 'smart', options: [{ value: 'smart' }, ...RATIOS.map(value => ({ value }))] },
|
|
40
|
+
{ id: 'apimartWan30Resolution', type: 'dropdown', order: 4, default: '720P', options: RESOLUTIONS.map(value => ({ value })) },
|
|
41
|
+
{ id: 'apimartWan30Duration', type: 'number', order: 5, default: 5, min: 2, max: 30, step: 1 },
|
|
42
|
+
{ id: 'apimartWan30Audio', type: 'switch', order: 6, default: true },
|
|
43
|
+
],
|
|
44
|
+
endpoints: '/v1/videos/generations',
|
|
45
|
+
request: {
|
|
46
|
+
builder: (params) => {
|
|
47
|
+
const images = resolveUploadedImageSources(params);
|
|
48
|
+
const videos = resolveUploadedVideoSources(params);
|
|
49
|
+
const audios = audioSources(params);
|
|
50
|
+
const reference = params.apimartWan30Mode === 'reference-to-video';
|
|
51
|
+
const prompt = typeof params.prompt === 'string' ? params.prompt.slice(0, 20000) : '';
|
|
52
|
+
const rawRatio = String(params.apimartWan30AspectRatio || 'smart');
|
|
53
|
+
const body = {
|
|
54
|
+
model: params.apimartWan30Variant === 'prime' ? 'wan3.0-video-prime' : 'wan3.0-video',
|
|
55
|
+
resolution: resolution(params),
|
|
56
|
+
duration: duration(params),
|
|
57
|
+
audio: params.apimartWan30Audio !== false,
|
|
58
|
+
nsfw_check: false,
|
|
59
|
+
};
|
|
60
|
+
if (prompt.trim())
|
|
61
|
+
body.prompt = prompt;
|
|
62
|
+
// 智能比例交给模型自适应:有素材时跟随素材,无素材时由提示词决定。
|
|
63
|
+
body.size = RATIOS.includes(rawRatio) ? rawRatio : 'adaptive';
|
|
64
|
+
if (reference) {
|
|
65
|
+
if (images.length + videos.length + audios.length === 0)
|
|
66
|
+
throw new Error('Wan 3.0 参考生视频至少需要一份参考素材');
|
|
67
|
+
const inputSeconds = resolveUploadedVideoDurationSeconds(params);
|
|
68
|
+
if (inputSeconds > 0 && inputSeconds + duration(params) > 30)
|
|
69
|
+
throw new Error('Wan 3.0 输入视频总时长加输出时长不能超过 30 秒');
|
|
70
|
+
body.generation_type = 'reference';
|
|
71
|
+
if (images.length > 0)
|
|
72
|
+
body.image_urls = images.slice(0, 10);
|
|
73
|
+
if (videos.length > 0)
|
|
74
|
+
body.video_urls = videos.slice(0, 5);
|
|
75
|
+
if (audios.length > 0)
|
|
76
|
+
body.audio_urls = audios.slice(0, 5);
|
|
77
|
+
if (!body.prompt)
|
|
78
|
+
throw new Error('Wan 3.0 参考生视频需要填写提示词');
|
|
79
|
+
return body;
|
|
80
|
+
}
|
|
81
|
+
if (images.length > 2)
|
|
82
|
+
throw new Error('Wan 3.0 首尾帧最多 2 张图片');
|
|
83
|
+
if (!body.prompt && images.length === 0)
|
|
84
|
+
throw new Error('Wan 3.0 文生视频需要填写提示词');
|
|
85
|
+
if (images.length > 0) {
|
|
86
|
+
body.generation_type = 'frame';
|
|
87
|
+
body.image_urls = images;
|
|
88
|
+
}
|
|
89
|
+
return body;
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
pricing: {
|
|
93
|
+
currency: '$',
|
|
94
|
+
calculator: (params) => {
|
|
95
|
+
const variant = params.apimartWan30Variant === 'prime' ? 'prime' : 'standard';
|
|
96
|
+
return RATES[variant][resolution(params)] * duration(params);
|
|
97
|
+
},
|
|
98
|
+
description: 'Wan 3.0 每秒 480P $0.03288、720P $0.06575、1080P $0.1315;Prime 每秒 480P $0.05143、720P $0.10286、1080P $0.20571;开关声音同价',
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
export default apimartWan30Model;
|