@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,78 @@
|
|
|
1
|
+
/** APIMart HappyHorse 1.1 文生、图生与参考图生视频模型(运行时契约) */
|
|
2
|
+
import { defineModel } from '../defineModel.js';
|
|
3
|
+
import { hasUploadedImage, resolveUploadedImageSources } from '../shared/mediaPresence.js';
|
|
4
|
+
const RATIOS = ['16:9', '9:16', '1:1', '4:3', '3:4'];
|
|
5
|
+
function duration(params) {
|
|
6
|
+
return Math.min(15, Math.max(3, Math.round(Number(params.apimartHappyHorse11Duration || 5))));
|
|
7
|
+
}
|
|
8
|
+
export const apimartHappyHorse11Model = defineModel({
|
|
9
|
+
meta: {
|
|
10
|
+
id: 'apimart-happyhorse-1.1', canonicalModelId: 'happyhorse-1.1', seriesId: 'happyhorse', seriesRank: 1.1,
|
|
11
|
+
provider: 'apimart', type: 'video',
|
|
12
|
+
tags: ['text-to-video', 'image-to-video', 'reference-mode'],
|
|
13
|
+
polling: { interval: 5000, maxAttempts: 180, expectedAttempts: 60 },
|
|
14
|
+
},
|
|
15
|
+
inputLimits: {
|
|
16
|
+
images: { max: 1 }, videos: { max: 0 },
|
|
17
|
+
rules: [
|
|
18
|
+
{ imageConstraints: { minShortSidePx: 300, minAspectRatio: 0.4, maxAspectRatio: 2.5 } },
|
|
19
|
+
// 参考图官方只硬性要求短边 / 长边 ≥ 0.4,短边 ≥ 720 px 只是推荐。
|
|
20
|
+
{ when: 'apimartHappyHorse11Mode === "reference-to-video"', images: { min: 1, max: 9 }, imageConstraints: { minAspectRatio: 0.4, maxAspectRatio: 2.5 } },
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
params: [
|
|
24
|
+
{
|
|
25
|
+
id: 'apimartHappyHorse11Mode', type: 'dropdown', order: 1, default: 'text-image-to-video',
|
|
26
|
+
options: [{ value: 'text-image-to-video' }, { value: 'reference-to-video' }],
|
|
27
|
+
},
|
|
28
|
+
// 图生视频的比例由首帧决定,平台会忽略 size。
|
|
29
|
+
{
|
|
30
|
+
id: 'apimartHappyHorse11AspectRatio', type: 'dropdown', order: 2, default: 'smart',
|
|
31
|
+
visible: { condition: params => params.apimartHappyHorse11Mode === 'reference-to-video' || !hasUploadedImage(params) },
|
|
32
|
+
options: [{ value: 'smart' }, ...RATIOS.map(value => ({ value }))],
|
|
33
|
+
},
|
|
34
|
+
{ id: 'apimartHappyHorse11Resolution', type: 'dropdown', order: 3, default: '1080P', options: [{ value: '720P' }, { value: '1080P' }] },
|
|
35
|
+
{ id: 'apimartHappyHorse11Duration', type: 'number', order: 4, default: 5, min: 3, max: 15, step: 1 },
|
|
36
|
+
],
|
|
37
|
+
endpoints: '/v1/videos/generations',
|
|
38
|
+
request: {
|
|
39
|
+
builder: (params) => {
|
|
40
|
+
const images = resolveUploadedImageSources(params);
|
|
41
|
+
const reference = params.apimartHappyHorse11Mode === 'reference-to-video';
|
|
42
|
+
if (reference ? images.length === 0 || images.length > 9 : images.length > 1) {
|
|
43
|
+
throw new Error(reference ? 'HappyHorse 1.1 参考模式需要 1–9 张图片' : 'HappyHorse 1.1 图生视频只接受 1 张首帧');
|
|
44
|
+
}
|
|
45
|
+
const prompt = typeof params.prompt === 'string' ? params.prompt.trim() : '';
|
|
46
|
+
if (!prompt && (reference || images.length === 0))
|
|
47
|
+
throw new Error('HappyHorse 1.1 需要填写提示词');
|
|
48
|
+
if (prompt.length > 2500)
|
|
49
|
+
throw new Error('HappyHorse 1.1 提示词最多 2500 字符');
|
|
50
|
+
const body = {
|
|
51
|
+
model: 'happyhorse-1.1',
|
|
52
|
+
resolution: params.apimartHappyHorse11Resolution === '720P' ? '720P' : '1080P',
|
|
53
|
+
duration: duration(params),
|
|
54
|
+
nsfw_check: false,
|
|
55
|
+
};
|
|
56
|
+
if (prompt)
|
|
57
|
+
body.prompt = prompt;
|
|
58
|
+
if (!reference && images.length === 1) {
|
|
59
|
+
body.first_frame_image = images[0];
|
|
60
|
+
return body;
|
|
61
|
+
}
|
|
62
|
+
const raw = String(params.apimartHappyHorse11AspectRatio || 'smart');
|
|
63
|
+
const hint = hasUploadedImage(params) && typeof params.__firstImageRatio === 'number'
|
|
64
|
+
&& Number.isFinite(params.__firstImageRatio) && params.__firstImageRatio > 0 ? params.__firstImageRatio : 16 / 9;
|
|
65
|
+
const numeric = (value) => { const [w, h] = value.split(':').map(Number); return w / h; };
|
|
66
|
+
body.size = RATIOS.includes(raw) ? raw : RATIOS.reduce((best, next) => Math.abs(numeric(next) - hint) < Math.abs(numeric(best) - hint) ? next : best, '16:9');
|
|
67
|
+
if (reference)
|
|
68
|
+
body.image_urls = images;
|
|
69
|
+
return body;
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
pricing: {
|
|
73
|
+
currency: '$',
|
|
74
|
+
calculator: (params) => duration(params) * (params.apimartHappyHorse11Resolution === '720P' ? 0.13 : 0.172),
|
|
75
|
+
description: '720P $0.13/秒,1080P $0.172/秒;文生、图生、参考图生同价',
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
export default apimartHappyHorse11Model;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
/** APIMart Kling 3.0 Omni 多模态视频模型(运行时契约) */
|
|
2
2
|
import { defineModel } from '../defineModel.js';
|
|
3
|
+
import { hasUploadedVideo } from '../shared/mediaPresence.js';
|
|
3
4
|
export const apimartKling30OmniModel = defineModel({
|
|
4
5
|
meta: {
|
|
5
6
|
id: 'apimart-kling-3.0-omni', canonicalModelId: 'kling-video-3.0-omni', seriesId: 'kling-video', seriesRank: 3.2,
|
|
6
7
|
provider: 'apimart', type: 'video',
|
|
7
|
-
tags: ['text-to-video', 'image-to-video', '
|
|
8
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode', 'video-to-video'],
|
|
8
9
|
aliases: ['kling-v3-omni-apimart'], polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 80 }
|
|
9
10
|
},
|
|
10
11
|
inputLimits: {
|
|
11
12
|
images: { max: 2 }, videos: { max: 1 },
|
|
12
13
|
rules: [
|
|
13
14
|
{ when: 'apimartKling30OmniMode === "reference-to-video"', images: { max: 7 }, videos: { max: 1 } },
|
|
14
|
-
{ videoConstraints: { minDurationSec: 3, maxDurationSec: 10, maxSizeMB: 200, trim: { maxClipSeconds: 10 } } }
|
|
15
|
+
{ videoConstraints: { minDurationSec: 3, maxDurationSec: 10, maxSizeMB: 200, minShortSidePx: 720, maxLongSidePx: 2160, trim: { maxClipSeconds: 10 } } }
|
|
15
16
|
]
|
|
16
17
|
},
|
|
17
18
|
params: [
|
|
18
19
|
{
|
|
19
20
|
id: 'apimartKling30OmniMode', type: 'dropdown', order: 1,
|
|
21
|
+
// 带参考视频时走 video_list,首尾帧 / 参考图模式与生成音频都不生效。
|
|
22
|
+
visible: { condition: (params) => !hasUploadedVideo(params) },
|
|
20
23
|
default: 'text-image-to-video',
|
|
21
24
|
options: [
|
|
22
25
|
{ value: 'text-image-to-video' },
|
|
@@ -35,18 +38,23 @@ export const apimartKling30OmniModel = defineModel({
|
|
|
35
38
|
},
|
|
36
39
|
{
|
|
37
40
|
id: 'apimartKling30OmniDuration', type: 'number', order: 4,
|
|
41
|
+
// 待编辑视频(base)的输出时长跟随视频。
|
|
42
|
+
visible: { condition: (params) => !(hasUploadedVideo(params) && params.apimartKling30OmniVideoReferenceType !== 'feature') },
|
|
38
43
|
default: 5, min: 3, max: 15, step: 1
|
|
39
44
|
},
|
|
40
45
|
{
|
|
41
46
|
id: 'apimartKling30OmniAudio', type: 'switch', order: 5,
|
|
47
|
+
visible: { condition: (params) => !hasUploadedVideo(params) },
|
|
42
48
|
default: false
|
|
43
49
|
},
|
|
44
50
|
{
|
|
45
51
|
id: 'apimartKling30OmniKeepOriginalSound', type: 'switch', order: 6,
|
|
52
|
+
visible: { condition: (params) => hasUploadedVideo(params) },
|
|
46
53
|
default: false
|
|
47
54
|
},
|
|
48
55
|
{
|
|
49
56
|
id: 'apimartKling30OmniVideoReferenceType', type: 'dropdown', order: 7,
|
|
57
|
+
visible: { condition: (params) => hasUploadedVideo(params) },
|
|
50
58
|
default: 'base',
|
|
51
59
|
options: [
|
|
52
60
|
{ value: 'base' },
|
|
@@ -81,6 +89,8 @@ export const apimartKling30OmniModel = defineModel({
|
|
|
81
89
|
}];
|
|
82
90
|
if (referenceType === 'feature' && images.length > 0)
|
|
83
91
|
body.image_urls = images.slice(0, 1);
|
|
92
|
+
else
|
|
93
|
+
delete body.duration;
|
|
84
94
|
}
|
|
85
95
|
else {
|
|
86
96
|
if (images.length > 0) {
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
/** APIMart Kling 3.0 Turbo 视频模型(运行时契约) */
|
|
2
2
|
import { defineModel } from '../defineModel.js';
|
|
3
|
+
import { hasUploadedImage } from '../shared/mediaPresence.js';
|
|
3
4
|
export const apimartKling30TurboModel = defineModel({
|
|
4
5
|
meta: {
|
|
5
6
|
id: 'apimart-kling-3.0-turbo', canonicalModelId: 'kling-video-3.0-turbo', seriesId: 'kling-video', seriesRank: 3.1,
|
|
6
7
|
provider: 'apimart', type: 'video',
|
|
7
|
-
tags: ['text-to-video', 'image-to-video'
|
|
8
|
+
tags: ['text-to-video', 'image-to-video'],
|
|
8
9
|
aliases: ['kling-3-turbo-apimart'], polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 70 }
|
|
9
10
|
},
|
|
10
|
-
inputLimits: { images: { max: 1 }, videos: { max: 0 } },
|
|
11
|
+
inputLimits: { images: { max: 1 }, videos: { max: 0 }, rules: [{ imageConstraints: { minShortSidePx: 300, minAspectRatio: 0.4, maxAspectRatio: 2.5 } }] },
|
|
11
12
|
params: [
|
|
12
13
|
{
|
|
13
14
|
id: 'apimartKling30TurboAspectRatio', type: 'dropdown', order: 1,
|
|
15
|
+
// 图生视频的比例跟随首帧,接口不收比例。
|
|
16
|
+
visible: { condition: (params) => !hasUploadedImage(params) },
|
|
14
17
|
default: 'smart',
|
|
15
18
|
options: [{ value: 'smart' }, ...['16:9', '9:16', '1:1'].map((ratio) => ({ value: ratio }))]
|
|
16
19
|
},
|
|
@@ -4,7 +4,7 @@ export const apimartKling30Model = defineModel({
|
|
|
4
4
|
meta: {
|
|
5
5
|
id: 'apimart-kling-3.0', canonicalModelId: 'kling-video-3.0', seriesId: 'kling-video', seriesRank: 3,
|
|
6
6
|
provider: 'apimart', type: 'video',
|
|
7
|
-
tags: ['text-to-video', 'image-to-video', 'start-end-frame'
|
|
7
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame'],
|
|
8
8
|
aliases: ['kling-v3-apimart'], polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 80 }
|
|
9
9
|
},
|
|
10
10
|
inputLimits: { images: { max: 2 }, videos: { max: 0 } },
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/** APIMart Kling V4 文生、图生、参考生视频与视频编辑续写模型(运行时契约) */
|
|
2
|
+
import { defineModel } from '../defineModel.js';
|
|
3
|
+
import { countUploadedVideos, resolveUploadedImageSources, resolveUploadedVideoDurationSeconds, resolveUploadedVideoSources, } from '../shared/mediaPresence.js';
|
|
4
|
+
const RATIOS = ['16:9', '9:16', '1:1', '21:9'];
|
|
5
|
+
const MODES = ['text-image-to-video', 'reference-to-video', 'edit', 'extend'];
|
|
6
|
+
function mode(params) {
|
|
7
|
+
const value = params.apimartKlingV4Mode;
|
|
8
|
+
return typeof value === 'string' && MODES.includes(value) ? value : 'text-image-to-video';
|
|
9
|
+
}
|
|
10
|
+
function duration(params) {
|
|
11
|
+
return Math.min(30, Math.max(3, Math.round(Number(params.apimartKlingV4Duration || 5))));
|
|
12
|
+
}
|
|
13
|
+
function audioSources(params) {
|
|
14
|
+
const pick = (value) => Array.isArray(value)
|
|
15
|
+
? value.filter((item) => typeof item === 'string' && item.trim().length > 0) : [];
|
|
16
|
+
const uploaded = pick(params.uploadedAudioFilePaths);
|
|
17
|
+
return uploaded.length > 0 ? uploaded : pick(params.audios);
|
|
18
|
+
}
|
|
19
|
+
/** 输入视频秒数按各段相加后向上取整,最多计 30 秒;拿不到时长时按输出时长估算。 */
|
|
20
|
+
function inputVideoSeconds(params, fallback) {
|
|
21
|
+
const seconds = resolveUploadedVideoDurationSeconds(params);
|
|
22
|
+
return Math.min(30, Math.ceil(seconds > 0 ? seconds : fallback));
|
|
23
|
+
}
|
|
24
|
+
export const apimartKlingV4Model = defineModel({
|
|
25
|
+
meta: {
|
|
26
|
+
id: 'apimart-kling-4.0', canonicalModelId: 'kling-video-4.0', seriesId: 'kling-video', seriesRank: 4,
|
|
27
|
+
provider: 'apimart', type: 'video',
|
|
28
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode', 'video-to-video', 'video-extension'],
|
|
29
|
+
polling: { interval: 5000, maxAttempts: 300, expectedAttempts: 60 },
|
|
30
|
+
},
|
|
31
|
+
inputLimits: {
|
|
32
|
+
images: { max: 2 }, videos: { max: 0 }, audios: { max: 0 },
|
|
33
|
+
rules: [
|
|
34
|
+
{ when: 'apimartKlingV4Mode === "reference-to-video"', images: { max: 10 }, videos: { max: 5 }, audios: { max: 3 } },
|
|
35
|
+
{ when: 'apimartKlingV4Mode === "edit"', images: { max: 10 }, videos: { exact: 1 } },
|
|
36
|
+
{ when: 'apimartKlingV4Mode === "extend"', images: { max: 1 }, videos: { exact: 1 } },
|
|
37
|
+
{ videoConstraints: { maxDurationSec: 30 } },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
requirements: [{
|
|
41
|
+
id: 'apimart-kling-v4-input-video',
|
|
42
|
+
when: 'apimartKlingV4Mode === "edit" || apimartKlingV4Mode === "extend"',
|
|
43
|
+
require: { videos: { exact: 1 } },
|
|
44
|
+
message: { title: '需要输入视频', message: '视频编辑和续写需要 1 段输入视频。', type: 'warning' },
|
|
45
|
+
}],
|
|
46
|
+
params: [
|
|
47
|
+
{ id: 'apimartKlingV4Mode', type: 'dropdown', order: 1, default: 'text-image-to-video', options: MODES.map(value => ({ value })) },
|
|
48
|
+
{
|
|
49
|
+
id: 'apimartKlingV4AspectRatio', type: 'dropdown', order: 2, default: 'smart',
|
|
50
|
+
options: [{ value: 'smart' }, ...RATIOS.map(value => ({ value }))],
|
|
51
|
+
visible: { condition: 'apimartKlingV4Mode !== "extend"' },
|
|
52
|
+
},
|
|
53
|
+
{ id: 'apimartKlingV4Resolution', type: 'dropdown', order: 3, default: '720p', options: ['720p', '1080p'].map(value => ({ value })) },
|
|
54
|
+
// 视频编辑不传时长时输出跟随输入视频,计费也按输入视频计算。
|
|
55
|
+
{
|
|
56
|
+
id: 'apimartKlingV4Duration', type: 'number', order: 4, default: 5, min: 3, max: 30, step: 1,
|
|
57
|
+
visible: { condition: 'apimartKlingV4Mode !== "edit"' },
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'apimartKlingV4KeepOriginalSound', type: 'switch', order: 5, default: true,
|
|
61
|
+
visible: { condition: 'apimartKlingV4Mode === "edit"' },
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
endpoints: '/v1/videos/generations',
|
|
65
|
+
request: {
|
|
66
|
+
builder: (params) => {
|
|
67
|
+
const current = mode(params);
|
|
68
|
+
const images = resolveUploadedImageSources(params);
|
|
69
|
+
const videos = resolveUploadedVideoSources(params);
|
|
70
|
+
const audios = audioSources(params);
|
|
71
|
+
const prompt = typeof params.prompt === 'string' ? params.prompt.trim() : '';
|
|
72
|
+
const rawRatio = String(params.apimartKlingV4AspectRatio || 'smart');
|
|
73
|
+
const fixedRatio = RATIOS.includes(rawRatio) ? rawRatio : undefined;
|
|
74
|
+
const body = {
|
|
75
|
+
model: 'kling-v4',
|
|
76
|
+
resolution: params.apimartKlingV4Resolution === '1080p' ? '1080p' : '720p',
|
|
77
|
+
};
|
|
78
|
+
if (prompt)
|
|
79
|
+
body.prompt = prompt;
|
|
80
|
+
else if (current !== 'text-image-to-video' || images.length === 0)
|
|
81
|
+
throw new Error('Kling V4 除图生视频外都需要填写提示词');
|
|
82
|
+
if (current === 'edit' || current === 'extend') {
|
|
83
|
+
if (videos.length !== 1)
|
|
84
|
+
throw new Error('Kling V4 视频编辑和续写需要 1 段输入视频');
|
|
85
|
+
body.omni_reference_task_type = current;
|
|
86
|
+
body.video_url = videos[0];
|
|
87
|
+
if (current === 'edit') {
|
|
88
|
+
if (images.length > 0)
|
|
89
|
+
body.image_urls = images.slice(0, 10);
|
|
90
|
+
if (fixedRatio)
|
|
91
|
+
body.aspect_ratio = fixedRatio;
|
|
92
|
+
body.audio_setting = params.apimartKlingV4KeepOriginalSound === false ? 'auto' : 'origin';
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
body.duration = duration(params);
|
|
96
|
+
if (images.length > 0)
|
|
97
|
+
body.last_frame_image = images[0];
|
|
98
|
+
}
|
|
99
|
+
return body;
|
|
100
|
+
}
|
|
101
|
+
body.duration = duration(params);
|
|
102
|
+
if (current === 'reference-to-video') {
|
|
103
|
+
if (images.length + videos.length + audios.length === 0)
|
|
104
|
+
throw new Error('Kling V4 参考生视频至少需要一份参考素材');
|
|
105
|
+
if (images.length + videos.length + audios.length > 15)
|
|
106
|
+
throw new Error('Kling V4 参考图、视频和音频合计最多 15 个');
|
|
107
|
+
body.omni_reference_task_type = 'reference';
|
|
108
|
+
body.aspect_ratio = fixedRatio ?? 'auto';
|
|
109
|
+
if (images.length > 0)
|
|
110
|
+
body.image_urls = images.slice(0, 10);
|
|
111
|
+
if (videos.length > 0)
|
|
112
|
+
body.video_urls = videos.slice(0, 5);
|
|
113
|
+
if (audios.length > 0)
|
|
114
|
+
body.audio_urls = audios.slice(0, 3);
|
|
115
|
+
return body;
|
|
116
|
+
}
|
|
117
|
+
if (images.length > 0) {
|
|
118
|
+
body.image_urls = images.slice(0, 2);
|
|
119
|
+
// 图生视频默认跟随首帧比例,只有用户明确选择时才覆盖。
|
|
120
|
+
if (fixedRatio)
|
|
121
|
+
body.aspect_ratio = fixedRatio;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
body.aspect_ratio = fixedRatio ?? '16:9';
|
|
125
|
+
}
|
|
126
|
+
return body;
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
pricing: {
|
|
130
|
+
currency: '$',
|
|
131
|
+
calculator: (params) => {
|
|
132
|
+
const current = mode(params);
|
|
133
|
+
const fullHd = params.apimartKlingV4Resolution === '1080p';
|
|
134
|
+
const outputRate = fullHd ? 0.21 : 0.14;
|
|
135
|
+
const videoInputRate = fullHd ? 0.126 : 0.084;
|
|
136
|
+
if (current === 'edit') {
|
|
137
|
+
const seconds = inputVideoSeconds(params, 5);
|
|
138
|
+
return videoInputRate * (seconds + seconds);
|
|
139
|
+
}
|
|
140
|
+
const output = duration(params);
|
|
141
|
+
if (current === 'reference-to-video' && countUploadedVideos(params) > 0) {
|
|
142
|
+
return videoInputRate * (output + Math.max(output, inputVideoSeconds(params, output)));
|
|
143
|
+
}
|
|
144
|
+
return outputRate * output;
|
|
145
|
+
},
|
|
146
|
+
description: '720p $0.14/秒、1080p $0.21/秒;视频编辑与带参考视频的参考生视频按视频输入单价 720p $0.084 / 1080p $0.126,计费秒数为输出秒数 + max(输出秒数, 输入视频秒数);续写只按新增秒数计费',
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
export default apimartKlingV4Model;
|
|
@@ -1,39 +1,35 @@
|
|
|
1
1
|
/** APIMart Midjourney 图生视频(运行时契约) */
|
|
2
|
+
import { CONTINUATION_PARAM } from '../../types/model.js';
|
|
3
|
+
import { readContinuation } from '../continuation.js';
|
|
2
4
|
import { defineModel } from '../defineModel.js';
|
|
3
|
-
|
|
5
|
+
const ANIMATE = 'animate';
|
|
6
|
+
/** 从 Midjourney 图片结果续接时,平台用来源任务的四宫格作首帧。 */
|
|
7
|
+
function continuedTaskId(params) {
|
|
8
|
+
const taskId = readContinuation(params, ANIMATE)?.reference.taskId;
|
|
9
|
+
return typeof taskId === 'string' ? taskId.trim() : '';
|
|
10
|
+
}
|
|
11
|
+
function isContinued(params) {
|
|
12
|
+
return continuedTaskId(params).length > 0;
|
|
13
|
+
}
|
|
4
14
|
export const apimartMidjourneyVideoModel = defineModel({
|
|
5
15
|
meta: {
|
|
6
16
|
id: 'apimart-midjourney-video', canonicalModelId: 'midjourney-video', seriesId: 'midjourney', seriesRank: 2,
|
|
7
17
|
provider: 'apimart', type: 'video',
|
|
8
|
-
tags: ['image-to-video', 'start-end-frame'
|
|
18
|
+
tags: ['image-to-video', 'start-end-frame'],
|
|
9
19
|
aliases: ['midjourney-video-apimart'], polling: { interval: 3000, maxAttempts: 300, expectedAttempts: 80 }
|
|
10
20
|
},
|
|
11
|
-
|
|
21
|
+
// 旧工程里手填的来源任务 ID 仍算有效输入,请求构建兼容读取它。
|
|
22
|
+
alternativeInputParamIds: [CONTINUATION_PARAM, 'apimartMidjourneyVideoTaskId'],
|
|
12
23
|
inputLimits: (params) => ({
|
|
13
|
-
images: {
|
|
14
|
-
max: typeof params.apimartMidjourneyVideoTaskId === 'string' &&
|
|
15
|
-
params.apimartMidjourneyVideoTaskId.trim().length > 0 &&
|
|
16
|
-
!hasUploadedImage(params)
|
|
17
|
-
? 0
|
|
18
|
-
: 2
|
|
19
|
-
},
|
|
24
|
+
images: { max: isContinued(params) ? 0 : 2 },
|
|
20
25
|
videos: { max: 0 },
|
|
21
26
|
audios: { max: 0 }
|
|
22
27
|
}),
|
|
23
28
|
params: [
|
|
24
|
-
{
|
|
25
|
-
id: 'apimartMidjourneyVideoTaskId', type: 'text', order: 10,
|
|
26
|
-
default: '',
|
|
27
|
-
visible: { condition: (params) => !hasUploadedImage(params) }
|
|
28
|
-
},
|
|
29
29
|
{
|
|
30
30
|
id: 'apimartMidjourneyVideoIndex', type: 'dropdown', order: 11,
|
|
31
31
|
default: '0',
|
|
32
|
-
visible: {
|
|
33
|
-
condition: (params) => !hasUploadedImage(params) &&
|
|
34
|
-
typeof params.apimartMidjourneyVideoTaskId === 'string' &&
|
|
35
|
-
params.apimartMidjourneyVideoTaskId.trim().length > 0
|
|
36
|
-
},
|
|
32
|
+
visible: { condition: isContinued },
|
|
37
33
|
options: ['0', '1', '2', '3'].map((value) => ({ value }))
|
|
38
34
|
},
|
|
39
35
|
{
|
|
@@ -42,8 +38,10 @@ export const apimartMidjourneyVideoModel = defineModel({
|
|
|
42
38
|
options: [{ value: '480p' }, { value: '720p' }]
|
|
43
39
|
},
|
|
44
40
|
{
|
|
41
|
+
// 自动动画由平台按来源任务自行写运动提示,官方要求必须有 task_id,上传首帧时不可用。
|
|
45
42
|
id: 'apimartMidjourneyVideoAnimateMode', type: 'dropdown', order: 12,
|
|
46
43
|
default: 'manual',
|
|
44
|
+
visible: { condition: isContinued },
|
|
47
45
|
options: [
|
|
48
46
|
{ value: 'manual' },
|
|
49
47
|
{ value: 'auto' }
|
|
@@ -67,34 +65,35 @@ export const apimartMidjourneyVideoModel = defineModel({
|
|
|
67
65
|
? value.filter((item) => typeof item === 'string' && item.trim().length > 0)
|
|
68
66
|
: [];
|
|
69
67
|
const uploaded = clean(params.uploadedFilePaths);
|
|
70
|
-
const
|
|
71
|
-
const
|
|
68
|
+
const continued = continuedTaskId(params);
|
|
69
|
+
const images = continued ? [] : uploaded.length > 0 ? uploaded : clean(params.images);
|
|
70
|
+
// 旧工程可能存着手填的来源任务 ID;参数已不再显示,只在没有续接与首帧时继续读取,保证旧工程能照常提交。
|
|
71
|
+
const legacyTaskId = typeof params.apimartMidjourneyVideoTaskId === 'string'
|
|
72
72
|
? params.apimartMidjourneyVideoTaskId.trim()
|
|
73
73
|
: '';
|
|
74
|
+
const taskId = continued || (images.length === 0 ? legacyTaskId : '');
|
|
74
75
|
if (images.length === 0 && !taskId)
|
|
75
|
-
throw new Error('Midjourney Video
|
|
76
|
+
throw new Error('Midjourney Video 需要上传首帧,或从 Midjourney 图片结果做成视频');
|
|
76
77
|
const resolution = params.apimartMidjourneyVideoResolution === '720p' ? '720' : '480';
|
|
77
78
|
const hasEndFrame = images.length > 1;
|
|
78
79
|
const body = {
|
|
79
80
|
prompt: typeof params.prompt === 'string' ? params.prompt.trim() : '',
|
|
80
81
|
video_type: `vid_1.1_i2v_${hasEndFrame ? 'start_end_' : ''}${resolution}`,
|
|
81
|
-
animate_mode:
|
|
82
|
+
animate_mode: taskId && params.apimartMidjourneyVideoAnimateMode === 'auto' ? 'auto' : 'manual',
|
|
82
83
|
motion: params.apimartMidjourneyVideoMotion === 'low' ? 'low' : 'high',
|
|
83
84
|
batch_size: ['2', '4'].includes(String(params.apimartMidjourneyVideoBatchSize))
|
|
84
85
|
? Number(params.apimartMidjourneyVideoBatchSize)
|
|
85
86
|
: 1
|
|
86
87
|
};
|
|
87
|
-
if (
|
|
88
|
-
body.image_urls = [images[0]];
|
|
89
|
-
if (images[1])
|
|
90
|
-
body.end_url = images[1];
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
88
|
+
if (taskId) {
|
|
93
89
|
body.task_id = taskId;
|
|
90
|
+
// 视频端点的 index 是 0–3,与其他 Midjourney 端点的 1–4 不同。
|
|
94
91
|
body.index = Math.min(3, Math.max(0, Number(params.apimartMidjourneyVideoIndex || 0)));
|
|
95
92
|
}
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
else {
|
|
94
|
+
body.image_urls = [images[0]];
|
|
95
|
+
if (images[1])
|
|
96
|
+
body.end_url = images[1];
|
|
98
97
|
}
|
|
99
98
|
return body;
|
|
100
99
|
}
|
|
@@ -8,7 +8,7 @@ export const apimartMidjourneyModel = defineModel({
|
|
|
8
8
|
seriesRank: 1,
|
|
9
9
|
provider: 'apimart',
|
|
10
10
|
type: 'image',
|
|
11
|
-
tags: ['text-to-image', 'image-to-image'
|
|
11
|
+
tags: ['text-to-image', 'image-to-image'],
|
|
12
12
|
aliases: [
|
|
13
13
|
'midjourney-apimart',
|
|
14
14
|
'apimart-midjourney-edit',
|
|
@@ -174,6 +174,16 @@ export const apimartMidjourneyModel = defineModel({
|
|
|
174
174
|
default: '',
|
|
175
175
|
},
|
|
176
176
|
],
|
|
177
|
+
continuations: [{
|
|
178
|
+
id: 'animate',
|
|
179
|
+
targetModelId: 'apimart-midjourney-video',
|
|
180
|
+
// 视频端点的 task_id 官方只认 Imagine 成功任务(四宫格),编辑与混图不能直接做成视频。
|
|
181
|
+
available: (params) => params.apimartMidjourneyMode !== 'edit' && params.apimartMidjourneyMode !== 'blend',
|
|
182
|
+
capture: ({ taskId }) => taskId ? { taskId } : null,
|
|
183
|
+
// 只带提示词:图片的速度、版本、参考图等参数视频模型没有对应含义。
|
|
184
|
+
params: (source) => ({ prompt: typeof source.prompt === 'string' ? source.prompt : '' }),
|
|
185
|
+
submit: 'edit',
|
|
186
|
+
}],
|
|
177
187
|
runtimeConstraints: {
|
|
178
188
|
mediaFields: [
|
|
179
189
|
{ field: 'cref', kind: 'image' },
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/** APIMart MiniMax H3 Max 文生、首尾帧与多模态参考视频模型(运行时契约) */
|
|
2
|
+
import { defineModel } from '../defineModel.js';
|
|
3
|
+
import { countUploadedImages, resolveUploadedImageSources, resolveUploadedVideoDurationSeconds, resolveUploadedVideoSources, hasUploadedImage } from '../shared/mediaPresence.js';
|
|
4
|
+
const RATIOS = ['21:9', '16:9', '4:3', '1:1', '3:4', '9:16'];
|
|
5
|
+
const RESOLUTIONS = ['480P', '768P', '1080P'];
|
|
6
|
+
const OUTPUT_RATES = { '480P': 0.03768, '768P': 0.05712, '1080P': 0.128 };
|
|
7
|
+
const VIDEO_INPUT_RATES = { '480P': 0.04232, '768P': 0.11088, '1080P': 0.11936 };
|
|
8
|
+
function resolution(params) {
|
|
9
|
+
return RESOLUTIONS.includes(String(params.apimartMiniMaxH3MaxResolution)) ? String(params.apimartMiniMaxH3MaxResolution) : '768P';
|
|
10
|
+
}
|
|
11
|
+
function duration(params) {
|
|
12
|
+
return Math.min(15, Math.max(5, Math.round(Number(params.apimartMiniMaxH3MaxDuration || 5))));
|
|
13
|
+
}
|
|
14
|
+
function audioSources(params) {
|
|
15
|
+
const pick = (value) => Array.isArray(value)
|
|
16
|
+
? value.filter((item) => typeof item === 'string' && item.trim().length > 0) : [];
|
|
17
|
+
const uploaded = pick(params.uploadedAudioFilePaths);
|
|
18
|
+
return uploaded.length > 0 ? uploaded : pick(params.audios);
|
|
19
|
+
}
|
|
20
|
+
export const apimartMiniMaxH3MaxModel = defineModel({
|
|
21
|
+
meta: {
|
|
22
|
+
id: 'apimart-minimax-h3-max', canonicalModelId: 'minimax-h3-max', seriesId: 'hailuo', seriesRank: 3.1,
|
|
23
|
+
provider: 'apimart', type: 'video',
|
|
24
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode'],
|
|
25
|
+
polling: { interval: 5000, maxAttempts: 180, expectedAttempts: 50 },
|
|
26
|
+
},
|
|
27
|
+
inputLimits: {
|
|
28
|
+
images: { max: 2 }, videos: { max: 0 }, audios: { max: 0 },
|
|
29
|
+
rules: [
|
|
30
|
+
{ when: 'apimartMiniMaxH3MaxMode === "reference-to-video"', images: { max: 9 }, videos: { max: 3 }, audios: { max: 3 } },
|
|
31
|
+
{ videoConstraints: { minDurationSec: 2, maxDurationSec: 15, maxSizeMB: 50 },
|
|
32
|
+
imageConstraints: { minShortSidePx: 256, maxLongSidePx: 5760, minAspectRatio: 0.4, maxAspectRatio: 2.5 } },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
requirements: [{
|
|
36
|
+
id: 'apimart-minimax-h3-max-prompt',
|
|
37
|
+
require: { prompt: true },
|
|
38
|
+
message: { title: '提示词必需', message: 'MiniMax H3 Max 需要填写提示词。', type: 'warning' },
|
|
39
|
+
}],
|
|
40
|
+
params: [
|
|
41
|
+
{
|
|
42
|
+
id: 'apimartMiniMaxH3MaxMode', type: 'dropdown', order: 1, default: 'text-image-to-video',
|
|
43
|
+
options: [{ value: 'text-image-to-video' }, { value: 'reference-to-video' }],
|
|
44
|
+
},
|
|
45
|
+
{ id: 'apimartMiniMaxH3MaxAspectRatio', type: 'dropdown', order: 2, visible: { condition: (params) => params.apimartMiniMaxH3MaxMode === 'reference-to-video' || !hasUploadedImage(params) }, default: 'smart', options: [{ value: 'smart' }, ...RATIOS.map(value => ({ value }))] },
|
|
46
|
+
{ id: 'apimartMiniMaxH3MaxResolution', type: 'dropdown', order: 3, default: '768P', options: RESOLUTIONS.map(value => ({ value })) },
|
|
47
|
+
{ id: 'apimartMiniMaxH3MaxDuration', type: 'number', order: 4, default: 5, min: 5, max: 15, step: 1 },
|
|
48
|
+
],
|
|
49
|
+
endpoints: '/v1/videos/generations',
|
|
50
|
+
request: {
|
|
51
|
+
builder: (params) => {
|
|
52
|
+
const images = resolveUploadedImageSources(params);
|
|
53
|
+
const videos = resolveUploadedVideoSources(params);
|
|
54
|
+
const audios = audioSources(params);
|
|
55
|
+
const prompt = typeof params.prompt === 'string' ? params.prompt.trim() : '';
|
|
56
|
+
if (!prompt)
|
|
57
|
+
throw new Error('MiniMax H3 Max 的提示词不能为空');
|
|
58
|
+
if (prompt.length > 7000)
|
|
59
|
+
throw new Error('MiniMax H3 Max 提示词最多 7000 字符');
|
|
60
|
+
const raw = String(params.apimartMiniMaxH3MaxAspectRatio || 'smart');
|
|
61
|
+
const body = {
|
|
62
|
+
model: 'MiniMax-H3-Max', prompt, duration: duration(params), resolution: resolution(params),
|
|
63
|
+
};
|
|
64
|
+
if (params.apimartMiniMaxH3MaxMode === 'reference-to-video') {
|
|
65
|
+
if (images.length + videos.length === 0)
|
|
66
|
+
throw new Error('MiniMax H3 Max 参考生视频至少需要一张参考图或一段参考视频');
|
|
67
|
+
body.aspect_ratio = RATIOS.includes(raw) ? raw : 'adaptive';
|
|
68
|
+
if (images.length > 0)
|
|
69
|
+
body.image_urls = images.slice(0, 9);
|
|
70
|
+
if (videos.length > 0)
|
|
71
|
+
body.video_urls = videos.slice(0, 3);
|
|
72
|
+
if (audios.length > 0)
|
|
73
|
+
body.audio_urls = audios.slice(0, 3);
|
|
74
|
+
}
|
|
75
|
+
else if (images.length > 0) {
|
|
76
|
+
// 图生视频的比例由输入图片决定,不发送比例。
|
|
77
|
+
body.first_frame_image = images[0];
|
|
78
|
+
if (images[1])
|
|
79
|
+
body.last_frame_image = images[1];
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
body.aspect_ratio = RATIOS.includes(raw) ? raw : '16:9';
|
|
83
|
+
}
|
|
84
|
+
return body;
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
pricing: {
|
|
88
|
+
currency: '$',
|
|
89
|
+
calculator: (params) => {
|
|
90
|
+
const tier = resolution(params);
|
|
91
|
+
const reference = params.apimartMiniMaxH3MaxMode === 'reference-to-video';
|
|
92
|
+
// 读不到素材时长时按输出时长估,不按 0 秒低估;平台规定参考视频合计不超过 15 秒。
|
|
93
|
+
const videoSeconds = reference ? Math.min(15, resolveUploadedVideoDurationSeconds(params, duration(params))) : 0;
|
|
94
|
+
return OUTPUT_RATES[tier] * duration(params)
|
|
95
|
+
+ Math.max(0, countUploadedImages(params) - 2) * 0.05712
|
|
96
|
+
+ VIDEO_INPUT_RATES[tier] * videoSeconds;
|
|
97
|
+
},
|
|
98
|
+
description: '每秒 480P $0.03768、768P $0.05712、1080P $0.128;输入图片前 2 张免费,之后 $0.05712/张;参考视频按源时长每秒 480P $0.04232、768P $0.11088、1080P $0.11936;参考音频免费',
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
export default apimartMiniMaxH3MaxModel;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** APIMart MiniMax H3 文生、首尾帧与多模态参考视频模型(运行时契约) */
|
|
2
2
|
import { defineModel } from '../defineModel.js';
|
|
3
|
-
import { countUploadedImages, resolveUploadedVideoDurationSeconds } from '../shared/mediaPresence.js';
|
|
3
|
+
import { countUploadedImages, resolveUploadedVideoDurationSeconds, hasUploadedImage } from '../shared/mediaPresence.js';
|
|
4
4
|
export const apimartMiniMaxH3Model = defineModel({
|
|
5
5
|
meta: {
|
|
6
|
-
id: 'apimart-minimax-h3', canonicalModelId: 'minimax-h3', seriesId: '
|
|
6
|
+
id: 'apimart-minimax-h3', canonicalModelId: 'minimax-h3', seriesId: 'hailuo', seriesRank: 3,
|
|
7
7
|
provider: 'apimart', type: 'video',
|
|
8
|
-
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode'
|
|
8
|
+
tags: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode'],
|
|
9
9
|
aliases: ['minimax-h3-apimart'], polling: { interval: 5000, maxAttempts: 180, expectedAttempts: 60 }
|
|
10
10
|
},
|
|
11
11
|
inputLimits: {
|
|
@@ -13,6 +13,9 @@ export const apimartMiniMaxH3Model = defineModel({
|
|
|
13
13
|
rules: [{
|
|
14
14
|
when: 'apimartMiniMaxH3Mode === "reference-to-video"',
|
|
15
15
|
images: { max: 9 }, videos: { max: 3 }, audios: { max: 3 }
|
|
16
|
+
}, {
|
|
17
|
+
imageConstraints: { minShortSidePx: 256, maxLongSidePx: 5760, minAspectRatio: 0.4, maxAspectRatio: 2.5 },
|
|
18
|
+
videoConstraints: { minShortSidePx: 256, maxLongSidePx: 5760, minAspectRatio: 0.4, maxAspectRatio: 2.5 }
|
|
16
19
|
}]
|
|
17
20
|
},
|
|
18
21
|
params: [
|
|
@@ -26,6 +29,8 @@ export const apimartMiniMaxH3Model = defineModel({
|
|
|
26
29
|
},
|
|
27
30
|
{
|
|
28
31
|
id: 'apimartMiniMaxH3AspectRatio', type: 'dropdown', order: 2,
|
|
32
|
+
// 首帧、首尾帧时比例由图片决定,不发送。
|
|
33
|
+
visible: { condition: (params) => params.apimartMiniMaxH3Mode === 'reference-to-video' || !hasUploadedImage(params) },
|
|
29
34
|
default: 'smart',
|
|
30
35
|
options: [
|
|
31
36
|
{ value: 'smart' },
|
|
@@ -9,7 +9,7 @@ export const apimartNanoBanana2LiteModel = defineModel({
|
|
|
9
9
|
seriesRank: 2.1,
|
|
10
10
|
provider: 'apimart',
|
|
11
11
|
type: 'image',
|
|
12
|
-
tags: ['text-to-image', 'image-to-image'
|
|
12
|
+
tags: ['text-to-image', 'image-to-image'],
|
|
13
13
|
aliases: ['nano-banana-2-lite-apimart'],
|
|
14
14
|
polling: { interval: 3000, maxAttempts: 200, expectedAttempts: 35 }
|
|
15
15
|
},
|