@henjicc/ai-sdk 0.9.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 +50 -0
- package/README.md +580 -577
- package/dist/capabilities/speech-recognition/bailian/module.js +12 -13
- 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/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 +27 -23
- 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 +3 -4
- 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.js +2 -2
- package/dist/catalog/volcengine-speech/seed-tts-2.0.model.js +2 -2
- package/dist/discovery/index.js +13 -6
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -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.js +22 -5
- package/dist/providers/volcengine-voice-clone.js +13 -4
- 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/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-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 +156 -148
- 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 -125
- 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 -130
- 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 +379 -338
- 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 -65
- 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 +115 -69
- 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 -288
- 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 -339
- 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,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 元素(角色 / 物体主体)参数的值结构与校验,供 Kling 4.0 在 Fal 与 KIE 上共用。
|
|
3
|
+
*
|
|
4
|
+
* 值结构:`[{ id?, name?, kind: 'image' | 'video', images: string[], videos: string[], videoSeconds? }]`,
|
|
5
|
+
* `videoSeconds` 是上传时读到的视频时长,只用于估价,不发给平台。
|
|
6
|
+
* 图片元素第 1 张是正面主图、其余是其他角度;视频元素只用一段 3–8 秒单镜头视频。
|
|
7
|
+
* Fal 在提示词里按顺序写 `@Element1`,KIE 写元素名 `@名称`,所以名称只对 KIE 有意义。
|
|
8
|
+
* 媒体值是本地受管路径,由公共上传预处理按字段名(`frontal_image_url`、`image_urls`、`video_url`)上传替换。
|
|
9
|
+
*/
|
|
10
|
+
/** 两家对元素的共同上限:最多 7 个,其中视频元素最多 3 个;图片元素 2–4 张图。 */
|
|
11
|
+
export const SUBJECT_ELEMENT_LIMITS = { maxItems: 7, maxVideoItems: 3, minImages: 2, maxImages: 4 };
|
|
12
|
+
/** 视频元素时长读不到时按官方上限 8 秒估价,宁可估高,避免付费授权金额偏低。 */
|
|
13
|
+
const SUBJECT_ELEMENT_VIDEO_MAX_SECONDS = 8;
|
|
14
|
+
const KIE_NAME_PATTERN = /^[一-龥A-Za-z0-9_]{1,20}$/;
|
|
15
|
+
const KIE_RESERVED_NAME = /^(?:(?:image|video|keyframe|object|audio)_\d+|first_frame|last_frame)$/i;
|
|
16
|
+
function isObject(value) {
|
|
17
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
18
|
+
}
|
|
19
|
+
function sources(value) {
|
|
20
|
+
if (typeof value === 'string')
|
|
21
|
+
return value.trim() ? [value.trim()] : [];
|
|
22
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === 'string' && item.trim().length > 0).map(item => item.trim()) : [];
|
|
23
|
+
}
|
|
24
|
+
export function readSubjectElements(value) {
|
|
25
|
+
if (!Array.isArray(value))
|
|
26
|
+
return [];
|
|
27
|
+
return value.filter(isObject).map((element) => {
|
|
28
|
+
const images = sources(element.images);
|
|
29
|
+
const videos = sources(element.videos);
|
|
30
|
+
const kind = element.kind === 'video' || (element.kind !== 'image' && videos.length > 0 && images.length === 0) ? 'video' : 'image';
|
|
31
|
+
return {
|
|
32
|
+
name: typeof element.name === 'string' ? element.name.trim() : '',
|
|
33
|
+
kind,
|
|
34
|
+
images: kind === 'image' ? images : [],
|
|
35
|
+
...(kind === 'video' && videos[0] ? { video: videos[0] } : {}),
|
|
36
|
+
...(kind === 'video' && typeof element.videoSeconds === 'number' && element.videoSeconds > 0 ? { videoSeconds: element.videoSeconds } : {}),
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** 视频元素按视频输入计费的总秒数:用上传时读到的时长,读不到按上限计。 */
|
|
41
|
+
export function subjectElementVideoSeconds(value) {
|
|
42
|
+
return readSubjectElements(value)
|
|
43
|
+
.filter(element => element.kind === 'video')
|
|
44
|
+
.reduce((total, element) => total + Math.min(SUBJECT_ELEMENT_VIDEO_MAX_SECONDS, element.videoSeconds ?? SUBJECT_ELEMENT_VIDEO_MAX_SECONDS), 0);
|
|
45
|
+
}
|
|
46
|
+
function validate(elements, modelName) {
|
|
47
|
+
const limits = SUBJECT_ELEMENT_LIMITS;
|
|
48
|
+
if (elements.length > limits.maxItems)
|
|
49
|
+
throw new Error(`${modelName} 最多 ${limits.maxItems} 个元素`);
|
|
50
|
+
if (elements.filter(element => element.kind === 'video').length > limits.maxVideoItems)
|
|
51
|
+
throw new Error(`${modelName} 最多 ${limits.maxVideoItems} 个视频元素`);
|
|
52
|
+
elements.forEach((element, index) => {
|
|
53
|
+
const label = `${modelName} 第 ${index + 1} 个元素`;
|
|
54
|
+
if (element.kind === 'video') {
|
|
55
|
+
if (!element.video)
|
|
56
|
+
throw new Error(`${label}还没有上传视频`);
|
|
57
|
+
}
|
|
58
|
+
else if (element.images.length < limits.minImages || element.images.length > limits.maxImages) {
|
|
59
|
+
throw new Error(`${label}需要 ${limits.minImages}–${limits.maxImages} 张图(第 1 张为正面主图)`);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/** Fal:图片元素拆成正面主图与其他角度,视频元素只给视频;提示词按顺序引用 `@Element1`。 */
|
|
64
|
+
export function buildFalSubjectElements(value, modelName) {
|
|
65
|
+
const elements = readSubjectElements(value);
|
|
66
|
+
validate(elements, modelName);
|
|
67
|
+
return elements.map((element) => element.kind === 'video'
|
|
68
|
+
? { video_url: element.video }
|
|
69
|
+
: { frontal_image_url: element.images[0], reference_image_urls: element.images.slice(1) });
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* KIE:每个元素必须有唯一名称,提示词用 `@名称` 引用。
|
|
73
|
+
* Flash 端点用 `type` 区分图片与视频元素,标准版没有这个字段。
|
|
74
|
+
*/
|
|
75
|
+
export function buildKieSubjectElements(value, modelName, options) {
|
|
76
|
+
const elements = readSubjectElements(value);
|
|
77
|
+
validate(elements, modelName);
|
|
78
|
+
const seen = new Set();
|
|
79
|
+
return elements.map((element, index) => {
|
|
80
|
+
const label = `${modelName} 第 ${index + 1} 个元素`;
|
|
81
|
+
if (!KIE_NAME_PATTERN.test(element.name))
|
|
82
|
+
throw new Error(`${label}的名称须为 1–20 个汉字、字母、数字或下划线`);
|
|
83
|
+
if (KIE_RESERVED_NAME.test(element.name))
|
|
84
|
+
throw new Error(`${label}的名称“${element.name}”是保留名,请换一个`);
|
|
85
|
+
const key = element.name.toLowerCase();
|
|
86
|
+
if (seen.has(key))
|
|
87
|
+
throw new Error(`${label}的名称“${element.name}”与前面的元素重复`);
|
|
88
|
+
seen.add(key);
|
|
89
|
+
if (element.kind === 'video')
|
|
90
|
+
return { name: element.name, video_url: element.video, ...(options.sendType ? { type: 'video' } : {}) };
|
|
91
|
+
return { name: element.name, image_urls: element.images };
|
|
92
|
+
});
|
|
93
|
+
}
|
|
@@ -3,7 +3,7 @@ import { speechCharacterPrice, speechString, speechText } from '../audio/tts-com
|
|
|
3
3
|
export const siliconflowMossTtsd05Model = defineModel({
|
|
4
4
|
meta: {
|
|
5
5
|
id: 'siliconflow-moss-ttsd-0.5', canonicalModelId: 'moss-ttsd-v0.5', provider: 'siliconflow', type: 'audio',
|
|
6
|
-
tags: ['text-to-audio'],
|
|
6
|
+
tags: ['text-to-audio', 'multi-speaker-dialogue'],
|
|
7
7
|
},
|
|
8
8
|
inputLimits: { images: { max: 0 }, videos: { max: 0 } },
|
|
9
9
|
params: [
|
package/dist/catalog/validate.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* 同样的报错文案),应用侧改为调用本模块,不再维护第二份判断,避免源码与副本
|
|
9
9
|
* 静默分叉。
|
|
10
10
|
*/
|
|
11
|
+
import { isModelTag } from '../types/modelTags.js';
|
|
11
12
|
export class ModelRuntimeValidationError extends Error {
|
|
12
13
|
constructor(message) {
|
|
13
14
|
super(message);
|
|
@@ -55,6 +56,10 @@ function validateMeta(model, fail) {
|
|
|
55
56
|
if (!Array.isArray(meta.tags)) {
|
|
56
57
|
fail('Model meta.tags must be an array');
|
|
57
58
|
}
|
|
59
|
+
const unknown = meta.tags.filter((tag) => typeof tag !== 'string' || !isModelTag(tag));
|
|
60
|
+
if (unknown.length) {
|
|
61
|
+
fail(`Model meta.tags has tags outside MODEL_TAG_DEFINITIONS: ${unknown.join(', ')}`);
|
|
62
|
+
}
|
|
58
63
|
}
|
|
59
64
|
if (meta.polling) {
|
|
60
65
|
if (typeof meta.polling.interval !== 'number' || meta.polling.interval <= 0) {
|
|
@@ -276,6 +281,9 @@ function validatePricing(model, fail) {
|
|
|
276
281
|
fail('Model pricing.currency is required and must be a string');
|
|
277
282
|
}
|
|
278
283
|
const hasFixed = typeof pricing.fixed === 'number';
|
|
284
|
+
if (pricing.billingMode !== undefined && pricing.billingMode !== 'estimated') {
|
|
285
|
+
fail('Model pricing.billingMode must be estimated');
|
|
286
|
+
}
|
|
279
287
|
const hasCalculator = typeof pricing.calculator === 'function';
|
|
280
288
|
if (!hasFixed && !hasCalculator) {
|
|
281
289
|
fail('Model pricing must have either fixed or calculator');
|
|
@@ -323,10 +331,15 @@ function validatePricing(model, fail) {
|
|
|
323
331
|
? ['megapixels', 'width', 'height', 'fileSizeBytes'].includes(requirement.metric)
|
|
324
332
|
: requirement.mediaType === 'video'
|
|
325
333
|
? ['durationSeconds', 'megapixels', 'width', 'height'].includes(requirement.metric)
|
|
326
|
-
:
|
|
334
|
+
: requirement.mediaType === 'audio'
|
|
335
|
+
? requirement.metric === 'durationSeconds'
|
|
336
|
+
: false;
|
|
327
337
|
if (!validMetric) {
|
|
328
338
|
fail(`${prefix} has an unsupported mediaType/metric combination`);
|
|
329
339
|
}
|
|
340
|
+
if (requirement.when !== undefined && typeof requirement.when !== 'function') {
|
|
341
|
+
fail(`${prefix}.when must be a function`);
|
|
342
|
+
}
|
|
330
343
|
const multiplier = requirement.multiplier;
|
|
331
344
|
if (!multiplier)
|
|
332
345
|
return;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createVolcengineSeedanceModel } from './seedance.js';
|
|
2
|
+
// 价格:https://www.volcengine.com/docs/82379/1544106 (在线推理 token 单价,分输入含 / 不含视频两档)
|
|
3
|
+
export const volcengineSeedance20FastModel = createVolcengineSeedanceModel({
|
|
4
|
+
id: 'volcengine-seedance-2.0-fast', canonicalModelId: 'seedance-2.0-fast', seriesRank: 2.1,
|
|
5
|
+
apiModel: 'doubao-seedance-2-0-fast-260128', paramPrefix: 'volcengineSeedance20Fast', generation: '2.0',
|
|
6
|
+
resolutions: ['480p', '720p'],
|
|
7
|
+
tokenPrices: { '480p': 37, '720p': 37 },
|
|
8
|
+
videoTokenPrices: { '480p': 22, '720p': 22 },
|
|
9
|
+
priceDescription: '按 token 计费:480p/720p ¥37 每百万 token;token ≈ 时长 × 宽 × 高 × 24 / 1024(720p 16:9 5 秒约 ¥4.00);带参考视频时 480p/720p ¥22 每百万 token,输入视频时长也计入(不足 4 秒按 4 秒)',
|
|
10
|
+
});
|
|
11
|
+
export default volcengineSeedance20FastModel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createVolcengineSeedanceModel } from './seedance.js';
|
|
2
|
+
// 价格:https://www.volcengine.com/docs/82379/1544106 (在线推理 token 单价,分输入含 / 不含视频两档)
|
|
3
|
+
export const volcengineSeedance20MiniModel = createVolcengineSeedanceModel({
|
|
4
|
+
id: 'volcengine-seedance-2.0-mini', canonicalModelId: 'seedance-2.0-mini', seriesRank: 2.05,
|
|
5
|
+
apiModel: 'doubao-seedance-2-0-mini-260615', paramPrefix: 'volcengineSeedance20Mini', generation: '2.0',
|
|
6
|
+
resolutions: ['480p', '720p'],
|
|
7
|
+
tokenPrices: { '480p': 23, '720p': 23 },
|
|
8
|
+
videoTokenPrices: { '480p': 14, '720p': 14 },
|
|
9
|
+
priceDescription: '按 token 计费:480p/720p ¥23 每百万 token;token ≈ 时长 × 宽 × 高 × 24 / 1024(720p 16:9 5 秒约 ¥2.48);带参考视频时 480p/720p ¥14 每百万 token,输入视频时长也计入(不足 4 秒按 4 秒)',
|
|
10
|
+
});
|
|
11
|
+
export default volcengineSeedance20MiniModel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createVolcengineSeedanceModel } from './seedance.js';
|
|
2
|
+
// 价格:https://www.volcengine.com/docs/82379/1544106 (在线推理 token 单价,分输入含 / 不含视频两档)
|
|
3
|
+
export const volcengineSeedance20Model = createVolcengineSeedanceModel({
|
|
4
|
+
id: 'volcengine-seedance-2.0', canonicalModelId: 'seedance-2.0', seriesRank: 2,
|
|
5
|
+
apiModel: 'doubao-seedance-2-0-260128', paramPrefix: 'volcengineSeedance20', generation: '2.0',
|
|
6
|
+
resolutions: ['480p', '720p', '1080p', '4k'],
|
|
7
|
+
tokenPrices: { '480p': 46, '720p': 46, '1080p': 51, '4k': 26 },
|
|
8
|
+
videoTokenPrices: { '480p': 28, '720p': 28, '1080p': 31, '4k': 16 },
|
|
9
|
+
priceDescription: '按 token 计费:480p/720p ¥46、1080p ¥51、4K ¥26 每百万 token;token ≈ 时长 × 宽 × 高 × 24 / 1024(720p 16:9 5 秒约 ¥4.97);带参考视频时 480p/720p ¥28、1080p ¥31、4K ¥16 每百万 token,输入视频时长也计入(不足 4 秒按 4 秒)',
|
|
10
|
+
});
|
|
11
|
+
export default volcengineSeedance20Model;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createVolcengineSeedanceModel } from './seedance.js';
|
|
2
|
+
// 价格:https://www.volcengine.com/docs/82379/1544106 (在线推理 token 单价,分输入含 / 不含视频两档)
|
|
3
|
+
export const volcengineSeedance25Model = createVolcengineSeedanceModel({
|
|
4
|
+
id: 'volcengine-seedance-2.5', canonicalModelId: 'seedance-2.5', seriesRank: 2.5,
|
|
5
|
+
apiModel: 'doubao-seedance-2-5-260628', paramPrefix: 'volcengineSeedance25', generation: '2.5',
|
|
6
|
+
resolutions: ['480p', '720p', '1080p'],
|
|
7
|
+
tokenPrices: { '480p': 70, '720p': 70, '1080p': 77 },
|
|
8
|
+
videoTokenPrices: { '480p': 42, '720p': 42, '1080p': 46 },
|
|
9
|
+
priceDescription: '按 token 计费:480p/720p ¥70、1080p ¥77 每百万 token;token ≈ 时长 × 宽 × 高 × 24 / 1024(720p 16:9 5 秒约 ¥7.56);自动时长按 30 秒预估;带参考视频时 480p/720p ¥42、1080p ¥46 每百万 token,输入视频时长也计入(不足 4 秒按 4 秒)',
|
|
10
|
+
});
|
|
11
|
+
export default volcengineSeedance25Model;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** 火山方舟官方 Seedance 2.5 / 2.0 系列视频生成模型的共用运行时契约。 */
|
|
2
|
+
export interface VolcengineSeedanceConfig {
|
|
3
|
+
id: string;
|
|
4
|
+
canonicalModelId: string;
|
|
5
|
+
seriesRank: number;
|
|
6
|
+
apiModel: string;
|
|
7
|
+
/** 参数 ID 前缀,例如 `volcengineSeedance25`。 */
|
|
8
|
+
paramPrefix: string;
|
|
9
|
+
generation: '2.5' | '2.0';
|
|
10
|
+
resolutions: string[];
|
|
11
|
+
/** 输入不含视频时的在线推理 token 单价(元/百万 token),按输出分辨率。 */
|
|
12
|
+
tokenPrices: Record<string, number>;
|
|
13
|
+
/** 输入含参考视频时的 token 单价(元/百万 token);输入视频时长同样计入 token 用量。 */
|
|
14
|
+
videoTokenPrices: Record<string, number>;
|
|
15
|
+
priceDescription: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function createVolcengineSeedanceModel(config: VolcengineSeedanceConfig): import("../../index.js").ModelRuntimeDefinition;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/** 火山方舟官方 Seedance 2.5 / 2.0 系列视频生成模型的共用运行时契约。 */
|
|
2
|
+
import { defineModel } from '../defineModel.js';
|
|
3
|
+
import { hasUploadedImage, resolveUploadedImageSources, resolveUploadedVideoDurationSeconds, resolveUploadedVideoSources } from '../shared/mediaPresence.js';
|
|
4
|
+
const RATIOS = ['16:9', '4:3', '1:1', '3:4', '9:16', '21:9'];
|
|
5
|
+
const MIN_BILLED_INPUT_VIDEO_SECONDS = 4;
|
|
6
|
+
/** 官方「不同宽高比对应的宽高像素值」表;2.5 与 2.0 系列在 480p 档取值不同。 */
|
|
7
|
+
const PIXELS = {
|
|
8
|
+
'2.5': {
|
|
9
|
+
'480p': { '16:9': [854, 480], '4:3': [752, 560], '1:1': [640, 640], '3:4': [560, 752], '9:16': [480, 854], '21:9': [992, 432] },
|
|
10
|
+
'720p': { '16:9': [1280, 720], '4:3': [1112, 834], '1:1': [960, 960], '3:4': [834, 1112], '9:16': [720, 1280], '21:9': [1470, 630] },
|
|
11
|
+
'1080p': { '16:9': [1920, 1080], '4:3': [1664, 1248], '1:1': [1440, 1440], '3:4': [1248, 1664], '9:16': [1080, 1920], '21:9': [2206, 946] },
|
|
12
|
+
},
|
|
13
|
+
'2.0': {
|
|
14
|
+
'480p': { '16:9': [864, 496], '4:3': [752, 560], '1:1': [640, 640], '3:4': [560, 752], '9:16': [496, 864], '21:9': [992, 432] },
|
|
15
|
+
'720p': { '16:9': [1280, 720], '4:3': [1112, 834], '1:1': [960, 960], '3:4': [834, 1112], '9:16': [720, 1280], '21:9': [1470, 630] },
|
|
16
|
+
'1080p': { '16:9': [1920, 1080], '4:3': [1664, 1248], '1:1': [1440, 1440], '3:4': [1248, 1664], '9:16': [1080, 1920], '21:9': [2206, 946] },
|
|
17
|
+
'4k': { '16:9': [3840, 2160], '4:3': [3326, 2494], '1:1': [2880, 2880], '3:4': [2494, 3326], '9:16': [2160, 3840], '21:9': [4398, 1886] },
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
function audioSources(params) {
|
|
21
|
+
const pick = (value) => Array.isArray(value)
|
|
22
|
+
? value.filter((item) => typeof item === 'string' && item.trim().length > 0) : [];
|
|
23
|
+
const uploaded = pick(params.uploadedAudioFilePaths);
|
|
24
|
+
return uploaded.length > 0 ? uploaded : pick(params.audios);
|
|
25
|
+
}
|
|
26
|
+
export function createVolcengineSeedanceModel(config) {
|
|
27
|
+
const key = (name) => config.paramPrefix + name;
|
|
28
|
+
const is25 = config.generation === '2.5';
|
|
29
|
+
const maxDuration = is25 ? 30 : 15;
|
|
30
|
+
const maxReferenceImages = is25 ? 30 : 9;
|
|
31
|
+
const maxReferenceAudios = is25 ? 10 : 3;
|
|
32
|
+
// 参考视频:2.5 最多 10 段、合计 ≤ 30 秒;2.0 系列最多 3 段、合计 ≤ 15 秒。只收公网 URL,本地文件经通用文件上传服务托管。
|
|
33
|
+
const maxReferenceVideos = is25 ? 10 : 3;
|
|
34
|
+
const maxReferenceVideoSeconds = is25 ? 30 : 15;
|
|
35
|
+
// 2.5 才有显式任务类型;编辑、延长都要求至少一段参考视频且比例自适应,编辑还不能指定时长。
|
|
36
|
+
// 默认显式发 reference:提交时就校验限制,也不会因提示词里的“替换”被平台判成编辑任务后异步失败。
|
|
37
|
+
const taskType = (params) => {
|
|
38
|
+
const value = String(params[key('TaskType')] ?? 'reference');
|
|
39
|
+
return is25 && (value === 'auto' || value === 'edit' || value === 'extend') ? value : 'reference';
|
|
40
|
+
};
|
|
41
|
+
const editing = `${key('Mode')} === "reference-to-video" && ${key('TaskType')} === "edit"`;
|
|
42
|
+
const resolution = (params) => {
|
|
43
|
+
const value = String(params[key('Resolution')] ?? '720p');
|
|
44
|
+
return config.resolutions.includes(value) ? value : '720p';
|
|
45
|
+
};
|
|
46
|
+
const autoDuration = (params) => is25 && params[key('AutoDuration')] === true;
|
|
47
|
+
const duration = (params) => Math.min(maxDuration, Math.max(4, Math.round(Number(params[key('Duration')] || 5))));
|
|
48
|
+
const params = [
|
|
49
|
+
{
|
|
50
|
+
id: key('Mode'), type: 'dropdown', order: 1,
|
|
51
|
+
// 参考模式不设素材下限(2.5 可以只传音频),默认放在文/图生视频,带多图或音频时由按素材选模式切过去。
|
|
52
|
+
default: 'text-image-to-video',
|
|
53
|
+
options: [{ value: 'text-image-to-video' }, { value: 'reference-to-video' }],
|
|
54
|
+
},
|
|
55
|
+
...(is25 ? [{
|
|
56
|
+
id: key('TaskType'), type: 'dropdown', order: 2, default: 'reference',
|
|
57
|
+
visible: { condition: `${key('Mode')} === "reference-to-video"` },
|
|
58
|
+
options: [{ value: 'reference' }, { value: 'edit' }, { value: 'extend' }, { value: 'auto' }],
|
|
59
|
+
}] : []),
|
|
60
|
+
{
|
|
61
|
+
id: key('AspectRatio'), type: 'dropdown', order: 3,
|
|
62
|
+
// 2.5 的首帧 / 首尾帧与编辑、延长任务只接受 adaptive,比例跟随素材。
|
|
63
|
+
...(is25 ? { visible: { condition: (params) => params[key('Mode')] === 'reference-to-video'
|
|
64
|
+
? !['edit', 'extend'].includes(String(params[key('TaskType')]))
|
|
65
|
+
: !hasUploadedImage(params) } } : {}),
|
|
66
|
+
default: 'smart',
|
|
67
|
+
options: [{ value: 'smart' }, ...['1:1', '4:3', '3:4', '16:9', '9:16', '21:9'].map((value) => ({ value }))],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: key('Resolution'), type: 'dropdown', order: 4,
|
|
71
|
+
default: '720p',
|
|
72
|
+
options: config.resolutions.map((value) => ({ value })),
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: key('Duration'), type: 'number', order: 5,
|
|
76
|
+
default: 5, min: 4, max: maxDuration, step: 1,
|
|
77
|
+
...(is25 ? { visible: { condition: `!(${editing})` } } : {}),
|
|
78
|
+
},
|
|
79
|
+
...(is25 ? [{ id: key('AutoDuration'), type: 'switch', order: 6, default: false, visible: { condition: `!(${editing})` } }] : []),
|
|
80
|
+
{ id: key('GenerateAudio'), type: 'switch', order: 7, default: true },
|
|
81
|
+
{ id: key('ReturnLastFrame'), type: 'switch', order: 8, default: false },
|
|
82
|
+
{ id: key('WebSearch'), type: 'switch', order: 9, default: false },
|
|
83
|
+
];
|
|
84
|
+
return defineModel({
|
|
85
|
+
meta: {
|
|
86
|
+
id: config.id, canonicalModelId: config.canonicalModelId, seriesId: 'seedance', seriesRank: config.seriesRank,
|
|
87
|
+
provider: 'volcengine', type: 'video',
|
|
88
|
+
tags: is25
|
|
89
|
+
? ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode', 'video-to-video', 'video-extension']
|
|
90
|
+
: ['text-to-video', 'image-to-video', 'start-end-frame', 'reference-mode'],
|
|
91
|
+
polling: { interval: 5000, maxAttempts: 400, expectedAttempts: 60 },
|
|
92
|
+
},
|
|
93
|
+
inputLimits: {
|
|
94
|
+
images: { max: 2 }, videos: { max: 0 }, audios: { max: 0 },
|
|
95
|
+
rules: [
|
|
96
|
+
{
|
|
97
|
+
when: `${key('Mode')} === "reference-to-video"`,
|
|
98
|
+
images: { max: maxReferenceImages }, videos: { max: maxReferenceVideos }, audios: { max: maxReferenceAudios },
|
|
99
|
+
},
|
|
100
|
+
...(is25 ? [{
|
|
101
|
+
when: `${key('Mode')} === "reference-to-video" && (${key('TaskType')} === "edit" || ${key('TaskType')} === "extend")`,
|
|
102
|
+
images: { max: maxReferenceImages }, videos: { min: 1, max: maxReferenceVideos }, audios: { max: maxReferenceAudios },
|
|
103
|
+
}] : []),
|
|
104
|
+
{ imageConstraints: { minShortSidePx: 300, maxLongSidePx: 6000, minAspectRatio: 0.4, maxAspectRatio: 2.5 } },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
params,
|
|
108
|
+
endpoints: '/api/v3/contents/generations/tasks',
|
|
109
|
+
request: {
|
|
110
|
+
builder: (input) => {
|
|
111
|
+
const images = resolveUploadedImageSources(input);
|
|
112
|
+
const audios = audioSources(input);
|
|
113
|
+
const videos = resolveUploadedVideoSources(input);
|
|
114
|
+
const reference = input[key('Mode')] !== 'text-image-to-video';
|
|
115
|
+
const rawRatio = String(input[key('AspectRatio')] || 'smart');
|
|
116
|
+
const prompt = typeof input.prompt === 'string' ? input.prompt.trim() : '';
|
|
117
|
+
const content = [];
|
|
118
|
+
if (prompt)
|
|
119
|
+
content.push({ type: 'text', text: prompt });
|
|
120
|
+
const body = {
|
|
121
|
+
model: config.apiModel,
|
|
122
|
+
content,
|
|
123
|
+
resolution: resolution(input),
|
|
124
|
+
ratio: RATIOS.includes(rawRatio) ? rawRatio : 'adaptive',
|
|
125
|
+
duration: autoDuration(input) ? -1 : duration(input),
|
|
126
|
+
generate_audio: input[key('GenerateAudio')] !== false,
|
|
127
|
+
return_last_frame: input[key('ReturnLastFrame')] === true,
|
|
128
|
+
watermark: false,
|
|
129
|
+
};
|
|
130
|
+
if (input[key('WebSearch')] === true)
|
|
131
|
+
body.tools = [{ type: 'web_search' }];
|
|
132
|
+
if (reference) {
|
|
133
|
+
if (images.length + audios.length + videos.length === 0)
|
|
134
|
+
throw new Error(`Seedance ${config.generation} 参考生视频至少需要一张参考图、一段参考视频或参考音频`);
|
|
135
|
+
if (!is25 && audios.length > 0 && images.length + videos.length === 0)
|
|
136
|
+
throw new Error('Seedance 2.0 的参考音频必须与参考图或参考视频一起使用');
|
|
137
|
+
const task = taskType(input);
|
|
138
|
+
if ((task === 'edit' || task === 'extend') && videos.length === 0) {
|
|
139
|
+
throw new Error(`Seedance 2.5 的${task === 'edit' ? '视频编辑' : '视频延长'}至少需要一段参考视频`);
|
|
140
|
+
}
|
|
141
|
+
if (is25)
|
|
142
|
+
body.omni_reference_task_type = task;
|
|
143
|
+
if (task === 'edit' || task === 'extend')
|
|
144
|
+
body.ratio = 'adaptive';
|
|
145
|
+
// 编辑任务的输出时长跟随原视频,官方只接受 -1。
|
|
146
|
+
if (task === 'edit')
|
|
147
|
+
body.duration = -1;
|
|
148
|
+
for (const url of images.slice(0, maxReferenceImages))
|
|
149
|
+
content.push({ type: 'image_url', image_url: { url }, role: 'reference_image' });
|
|
150
|
+
for (const url of videos.slice(0, maxReferenceVideos))
|
|
151
|
+
content.push({ type: 'video_url', video_url: { url }, role: 'reference_video' });
|
|
152
|
+
for (const url of audios.slice(0, maxReferenceAudios))
|
|
153
|
+
content.push({ type: 'audio_url', audio_url: { url }, role: 'reference_audio' });
|
|
154
|
+
return body;
|
|
155
|
+
}
|
|
156
|
+
if (!prompt && images.length === 0)
|
|
157
|
+
throw new Error(`Seedance ${config.generation} 文生视频需要填写提示词`);
|
|
158
|
+
images.slice(0, 2).forEach((url, index) => {
|
|
159
|
+
content.push({ type: 'image_url', image_url: { url }, role: index === 0 ? 'first_frame' : 'last_frame' });
|
|
160
|
+
});
|
|
161
|
+
// 2.5 首帧、首尾帧任务只接受 adaptive,输出比例跟随首帧。
|
|
162
|
+
if (is25 && images.length > 0)
|
|
163
|
+
body.ratio = 'adaptive';
|
|
164
|
+
return body;
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
pricing: {
|
|
168
|
+
currency: '¥',
|
|
169
|
+
calculator: (input) => {
|
|
170
|
+
const res = resolution(input);
|
|
171
|
+
const rawRatio = String(input[key('AspectRatio')] || 'smart');
|
|
172
|
+
const table = PIXELS[config.generation][res] ?? PIXELS[config.generation]['720p'];
|
|
173
|
+
const [width, height] = table[rawRatio] ?? table['16:9'];
|
|
174
|
+
const withVideo = input[key('Mode')] !== 'text-image-to-video' && resolveUploadedVideoSources(input).length > 0;
|
|
175
|
+
const task = taskType(input);
|
|
176
|
+
// 读不到参考视频时长时按输出时长估,并封顶到平台的合计上限。
|
|
177
|
+
const inputSeconds = withVideo
|
|
178
|
+
? Math.min(maxReferenceVideoSeconds, resolveUploadedVideoDurationSeconds(input, duration(input)))
|
|
179
|
+
: 0;
|
|
180
|
+
// 编辑任务输出时长跟随原视频;自动时长按上限预估。
|
|
181
|
+
const outputSeconds = task === 'edit' && withVideo ? inputSeconds : autoDuration(input) ? maxDuration : duration(input);
|
|
182
|
+
// 官方 token 用量估算:(输入视频时长 + 输出时长) × 宽 × 高 × 24fps / 1024。
|
|
183
|
+
// 含视频时另有最低 token 用量:官方价格示例里输入 2–4 秒同价,即输入视频不足 4 秒按 4 秒计。
|
|
184
|
+
const billedInputSeconds = withVideo ? Math.max(MIN_BILLED_INPUT_VIDEO_SECONDS, inputSeconds) : 0;
|
|
185
|
+
const tokens = (billedInputSeconds + outputSeconds) * width * height * 24 / 1024;
|
|
186
|
+
const prices = withVideo ? config.videoTokenPrices : config.tokenPrices;
|
|
187
|
+
return tokens * (prices[res] ?? prices['720p']) / 1_000_000;
|
|
188
|
+
},
|
|
189
|
+
description: config.priceDescription,
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
}
|
|
@@ -6,7 +6,8 @@ export const volcengineSeedream50LiteModel = defineModel({
|
|
|
6
6
|
meta: {
|
|
7
7
|
id: 'volcengine-seedream-5.0-lite', canonicalModelId: 'seedream-5.0-lite', seriesId: 'seedream', seriesRank: 5,
|
|
8
8
|
provider: 'volcengine', type: 'image',
|
|
9
|
-
|
|
9
|
+
deprecated: '火山方舟 2026-11-24 关停 doubao-seedream-5-0-260128,官方替代为 5.0 Pro',
|
|
10
|
+
tags: ['text-to-image', 'image-to-image'],
|
|
10
11
|
aliases: ['seedream-5-lite-official']
|
|
11
12
|
},
|
|
12
13
|
inputLimits: { images: { max: 14 }, videos: { max: 0 } },
|
|
@@ -9,7 +9,7 @@ export function createSeedream50Model(config) {
|
|
|
9
9
|
meta: {
|
|
10
10
|
id: config.id, canonicalModelId: config.canonicalModelId, seriesId: 'seedream', seriesRank: 5.1,
|
|
11
11
|
provider: 'volcengine', type: 'image',
|
|
12
|
-
tags: ['text-to-image', 'image-to-image', '
|
|
12
|
+
tags: ['text-to-image', 'image-to-image', 'layer-decomposition', 'transparent-background'],
|
|
13
13
|
aliases: config.aliases
|
|
14
14
|
},
|
|
15
15
|
inputLimits: {
|
|
@@ -7,7 +7,7 @@ export const VOLC_CLONE_LANGUAGES = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1
|
|
|
7
7
|
export const volcengineSeedIcl20Model = defineModel({
|
|
8
8
|
meta: {
|
|
9
9
|
id: 'volcengine-seed-icl-2.0', canonicalModelId: 'seed-icl-2.0', provider: 'volcengine-speech', type: 'audio',
|
|
10
|
-
tags: ['text-to-audio', 'voice-clone', '
|
|
10
|
+
tags: ['text-to-audio', 'voice-clone', 'timestamps'],
|
|
11
11
|
polling: { interval: 3000, maxAttempts: 120 },
|
|
12
12
|
},
|
|
13
13
|
inputLimits: { images: { max: 0 }, videos: { max: 0 } },
|
|
@@ -59,7 +59,7 @@ export const volcengineSeedIcl20Model = defineModel({
|
|
|
59
59
|
throw new Error('后付费音色首次正式合成将收取 138 元槽位费并锁定音色,请先确认费用');
|
|
60
60
|
return {
|
|
61
61
|
resource_id: systemVoice ? 'seed-tts-2.0' : 'seed-icl-2.0',
|
|
62
|
-
req_params: { text: speechText(params), ...(!systemVoice ? { model: 'seed-tts-2.0-standard' } : {}), speaker, audio_params: { format: 'mp3', sample_rate: 24000 } },
|
|
62
|
+
req_params: { text: speechText(params), ...(!systemVoice ? { model: 'seed-tts-2.0-standard' } : {}), speaker, audio_params: { format: 'mp3', sample_rate: 24000, enable_subtitle: true } },
|
|
63
63
|
};
|
|
64
64
|
},
|
|
65
65
|
},
|
|
@@ -3,7 +3,7 @@ import { speechCharacterPrice, speechString, speechText } from '../audio/tts-com
|
|
|
3
3
|
export const volcengineSeedTts20Model = defineModel({
|
|
4
4
|
meta: {
|
|
5
5
|
id: 'volcengine-seed-tts-2.0', canonicalModelId: 'seed-tts-2.0', provider: 'volcengine-speech', type: 'audio',
|
|
6
|
-
tags: ['text-to-audio', '
|
|
6
|
+
tags: ['text-to-audio', 'timestamps'],
|
|
7
7
|
},
|
|
8
8
|
inputLimits: { images: { max: 0 }, videos: { max: 0 } },
|
|
9
9
|
params: [
|
|
@@ -16,7 +16,7 @@ export const volcengineSeedTts20Model = defineModel({
|
|
|
16
16
|
req_params: {
|
|
17
17
|
text: speechText(params),
|
|
18
18
|
speaker: speechString(params.volcSeedTtsSpeaker) ?? 'zh_female_vv_uranus_bigtts',
|
|
19
|
-
audio_params: { format: 'mp3', sample_rate: 24000 },
|
|
19
|
+
audio_params: { format: 'mp3', sample_rate: 24000, enable_subtitle: true },
|
|
20
20
|
},
|
|
21
21
|
}),
|
|
22
22
|
},
|
package/dist/discovery/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getModelTagDefinition, isModelTag } from '../types/modelTags.js';
|
|
1
2
|
import { AiRuntimeError } from '../runtime/AiRuntimeError.js';
|
|
2
3
|
import { normalizeCapabilityStableId, validateCapabilityDescriptor, } from '../capabilities/validation.js';
|
|
3
4
|
import { validateLlmModuleDescriptor } from '../llm/modules/validation.js';
|
|
@@ -20,9 +21,13 @@ export function createModelCapabilityDiscovery(input) {
|
|
|
20
21
|
...(input.generationPacks ?? []).flatMap((pack) => pack.models),
|
|
21
22
|
]);
|
|
22
23
|
for (const model of generation) {
|
|
24
|
+
if (model.meta.deprecated)
|
|
25
|
+
continue;
|
|
23
26
|
add({ sourceKind: 'generation-model', id: model.meta.id, profile: profileGenerationModel(model), source: model });
|
|
24
27
|
}
|
|
25
28
|
for (const entry of input.llmEntries ?? []) {
|
|
29
|
+
if (entry.deprecated)
|
|
30
|
+
continue;
|
|
26
31
|
add({ sourceKind: 'llm-model', id: entry.id, profile: profileLlmCatalogEntry(entry), source: entry });
|
|
27
32
|
}
|
|
28
33
|
for (const model of input.llmModels ?? []) {
|
|
@@ -48,7 +53,8 @@ export function createModelCapabilityDiscovery(input) {
|
|
|
48
53
|
}
|
|
49
54
|
export function profileGenerationModel(model) {
|
|
50
55
|
const tags = [...new Set(model.meta.tags ?? [])];
|
|
51
|
-
|
|
56
|
+
// 未经 defineModel 校验的模型可能带词表外的旧标签:照样留在 tags 里,只是不参与推导操作
|
|
57
|
+
const operations = deriveGenerationOperations(model.meta.type, tags.filter(isModelTag));
|
|
52
58
|
const inputs = new Set();
|
|
53
59
|
if (model.acceptsPrompt !== false)
|
|
54
60
|
inputs.add('text');
|
|
@@ -64,7 +70,7 @@ export function profileGenerationModel(model) {
|
|
|
64
70
|
operations,
|
|
65
71
|
acceptedInputContentKinds: [...inputs],
|
|
66
72
|
outputContentKinds: [output],
|
|
67
|
-
features: tags.filter((tag) => !
|
|
73
|
+
features: tags.filter((tag) => !operations.includes(tag)),
|
|
68
74
|
tags,
|
|
69
75
|
};
|
|
70
76
|
}
|
|
@@ -143,18 +149,19 @@ function deriveGenerationOperations(type, tags) {
|
|
|
143
149
|
operations.add('image-generation');
|
|
144
150
|
if (tags.includes('text-to-image'))
|
|
145
151
|
operations.add('text-to-image');
|
|
146
|
-
|
|
152
|
+
// 发现接口的图片操作只分生成与编辑,专项都归入编辑。
|
|
153
|
+
if (tags.some((tag) => tag === 'image-to-image' || getModelTagDefinition(tag).layer === 'specialty'))
|
|
147
154
|
operations.add('image-edit');
|
|
148
155
|
}
|
|
149
156
|
else if (type === 'video') {
|
|
150
157
|
operations.add('video-generation');
|
|
151
158
|
if (tags.includes('text-to-video'))
|
|
152
159
|
operations.add('text-to-video');
|
|
153
|
-
if (tags.
|
|
160
|
+
if (tags.includes('image-to-video'))
|
|
154
161
|
operations.add('image-to-video');
|
|
155
|
-
if (tags.
|
|
162
|
+
if (tags.includes('reference-mode'))
|
|
156
163
|
operations.add('reference-to-video');
|
|
157
|
-
if (tags.some((tag) =>
|
|
164
|
+
if (tags.some((tag) => tag === 'video-to-video' || tag === 'video-extension'))
|
|
158
165
|
operations.add('video-edit');
|
|
159
166
|
}
|
|
160
167
|
else if (type === 'audio') {
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from './protocols/index.js';
|
|
|
20
20
|
export * from './upload/index.js';
|
|
21
21
|
export * from './providers/index.js';
|
|
22
22
|
export * from './types/index.js';
|
|
23
|
+
export type { SpeechTimings, GenerationOutputTimings } from './types/speechTimings.js';
|
|
23
24
|
export * from './structured-output/index.js';
|
|
24
25
|
export * from './catalog/index.js';
|
|
25
26
|
export * from './pricing/index.js';
|
|
@@ -31,3 +32,5 @@ export * from './capabilities/speech-recognition/bailian/index.js';
|
|
|
31
32
|
export * from './capabilities/speech-recognition/volcengine/index.js';
|
|
32
33
|
export * from './capabilities/speech-recognition/siliconflow/index.js';
|
|
33
34
|
export * from './capabilities/speech-recognition/groq/index.js';
|
|
35
|
+
export * from './capabilities/translation/index.js';
|
|
36
|
+
export * from './capabilities/translation/bailian/index.js';
|
package/dist/index.js
CHANGED
|
@@ -45,3 +45,5 @@ export * from './capabilities/speech-recognition/bailian/index.js';
|
|
|
45
45
|
export * from './capabilities/speech-recognition/volcengine/index.js';
|
|
46
46
|
export * from './capabilities/speech-recognition/siliconflow/index.js';
|
|
47
47
|
export * from './capabilities/speech-recognition/groq/index.js';
|
|
48
|
+
export * from './capabilities/translation/index.js';
|
|
49
|
+
export * from './capabilities/translation/bailian/index.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createLlmCapabilitiesForModel } from '../defaults.js';
|
|
2
2
|
import { resolveLlmEndpointIdentity } from '../endpointProfiles.js';
|
|
3
|
+
import { findLlmModelCatalogEntry } from '../modelCatalog.js';
|
|
3
4
|
import { BIGMODEL_ENDPOINT_PROFILE_FAMILY, BIGMODEL_PROVIDER_FAMILY_ID, } from './profiles.js';
|
|
4
5
|
export function createBigmodelProvider(options = {}) {
|
|
5
6
|
const profileId = options.endpointProfile ?? 'cn';
|
|
@@ -36,7 +37,7 @@ export function createBigmodelModels(provider) {
|
|
|
36
37
|
const profile = BIGMODEL_ENDPOINT_PROFILE_FAMILY.profiles.find(item => item.id === identity.endpointProfile);
|
|
37
38
|
if (!profile)
|
|
38
39
|
throw new Error('[llm_endpoint_profile_unknown] resolved BigModel endpoint profile is unavailable');
|
|
39
|
-
return profile.modelIds.map(modelId => ({
|
|
40
|
+
return profile.modelIds.filter(modelId => !findLlmModelCatalogEntry(modelId)?.deprecated).map(modelId => ({
|
|
40
41
|
providerId: identity.providerId,
|
|
41
42
|
providerFamilyId: identity.providerFamilyId,
|
|
42
43
|
endpointProfile: identity.endpointProfile,
|
|
@@ -42,12 +42,6 @@ export const BIGMODEL_GLM_5_3_FLASH_PRICING = {
|
|
|
42
42
|
inputPerMillionTokens: 0.8,
|
|
43
43
|
outputPerMillionTokens: 2.8,
|
|
44
44
|
cacheReadPerMillionTokens: 0.23,
|
|
45
|
-
promotion: {
|
|
46
|
-
inputPerMillionTokens: 0.4,
|
|
47
|
-
outputPerMillionTokens: 1.4,
|
|
48
|
-
cacheReadPerMillionTokens: 0.115,
|
|
49
|
-
observedAt: '2026-08-28',
|
|
50
|
-
},
|
|
51
45
|
},
|
|
52
46
|
global: {
|
|
53
47
|
currency: 'USD',
|
package/dist/llm/chat.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ export interface LlmChatCompletedInfo {
|
|
|
27
27
|
output: string;
|
|
28
28
|
reasoningOutput: string;
|
|
29
29
|
usage: LlmUsageDto | null;
|
|
30
|
+
/** 发出请求到第一个字(含思考内容)的毫秒数;没有任何输出时为 null。 */
|
|
31
|
+
firstTokenMs: number | null;
|
|
32
|
+
/** 首字之后的输出速度(输出 token / 秒,含思考 token);供应商没给用量时为 null。 */
|
|
33
|
+
outputTokensPerSecond: number | null;
|
|
30
34
|
finishReason: string | null;
|
|
31
35
|
truncated: boolean;
|
|
32
36
|
toolCalls?: LlmStreamToolCall[];
|
|
@@ -47,6 +51,10 @@ export interface LlmChatStreamOutcome {
|
|
|
47
51
|
output: string;
|
|
48
52
|
reasoningOutput: string;
|
|
49
53
|
usage: LlmUsageDto | null;
|
|
54
|
+
/** 发出请求到第一个字(含思考内容)的毫秒数;没有任何输出时为 null。 */
|
|
55
|
+
firstTokenMs: number | null;
|
|
56
|
+
/** 首字之后的输出速度(输出 token / 秒,含思考 token);供应商没给用量时为 null。 */
|
|
57
|
+
outputTokensPerSecond: number | null;
|
|
50
58
|
finishReason: string | null;
|
|
51
59
|
truncated: boolean;
|
|
52
60
|
toolCalls?: LlmStreamToolCall[];
|