@henjicc/ai-sdk 0.2.8 → 0.4.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.
Files changed (244) hide show
  1. package/CHANGELOG.md +157 -141
  2. package/README.md +497 -455
  3. package/dist/capabilities/embedding/bailian.d.ts +23 -0
  4. package/dist/capabilities/embedding/bailian.js +10 -0
  5. package/dist/capabilities/embedding/bigmodel.d.ts +9 -0
  6. package/dist/capabilities/embedding/bigmodel.js +5 -0
  7. package/dist/capabilities/embedding/index.d.ts +1 -0
  8. package/dist/capabilities/embedding/index.js +1 -0
  9. package/dist/capabilities/embedding/ppio.d.ts +7 -0
  10. package/dist/capabilities/embedding/ppio.js +5 -0
  11. package/dist/capabilities/embedding/siliconflow.d.ts +21 -0
  12. package/dist/capabilities/embedding/siliconflow.js +10 -0
  13. package/dist/capabilities/embedding/volcengine.d.ts +10 -0
  14. package/dist/capabilities/embedding/volcengine.js +6 -0
  15. package/dist/capabilities/rerank/bailian.d.ts +21 -0
  16. package/dist/capabilities/rerank/bailian.js +14 -0
  17. package/dist/capabilities/rerank/bigmodel.d.ts +9 -0
  18. package/dist/capabilities/rerank/bigmodel.js +5 -0
  19. package/dist/capabilities/rerank/index.d.ts +1 -0
  20. package/dist/capabilities/rerank/index.js +1 -0
  21. package/dist/capabilities/rerank/ppio.d.ts +7 -0
  22. package/dist/capabilities/rerank/ppio.js +5 -0
  23. package/dist/capabilities/rerank/siliconflow.d.ts +21 -0
  24. package/dist/capabilities/rerank/siliconflow.js +10 -0
  25. package/dist/capabilities/retrieval/http.d.ts +3 -0
  26. package/dist/capabilities/retrieval/http.js +48 -0
  27. package/dist/capabilities/retrieval/module.d.ts +11 -0
  28. package/dist/capabilities/retrieval/module.js +110 -0
  29. package/dist/capabilities/retrieval/types.d.ts +54 -0
  30. package/dist/capabilities/retrieval/types.js +1 -0
  31. package/dist/capabilities/retrieval/validation.d.ts +10 -0
  32. package/dist/capabilities/retrieval/validation.js +65 -0
  33. package/dist/capabilities/types.d.ts +1 -1
  34. package/dist/catalog/apimart/gpt-image-2.5.model.d.ts +2 -0
  35. package/dist/catalog/apimart/gpt-image-2.5.model.js +51 -0
  36. package/dist/catalog/fal/gpt-image-2.5.model.d.ts +2 -0
  37. package/dist/catalog/fal/gpt-image-2.5.model.js +53 -0
  38. package/dist/catalog/fal/ic-light-v2.model.js +9 -13
  39. package/dist/catalog/grsai/gpt-image-2.5.model.d.ts +2 -0
  40. package/dist/catalog/grsai/gpt-image-2.5.model.js +54 -0
  41. package/dist/catalog/grsai/gptImage25Sizes.d.ts +1 -0
  42. package/dist/catalog/grsai/gptImage25Sizes.js +76 -0
  43. package/dist/catalog/index.js +112 -104
  44. package/dist/catalog/kie/gpt-image-2.5.model.d.ts +2 -0
  45. package/dist/catalog/kie/gpt-image-2.5.model.js +38 -0
  46. package/dist/catalog/shared/gptImage25.d.ts +16 -0
  47. package/dist/catalog/shared/gptImage25.js +48 -0
  48. package/dist/catalog/shared/gptImage25Pricing.d.ts +12 -0
  49. package/dist/catalog/shared/gptImage25Pricing.js +508 -0
  50. package/dist/llm/defaults.d.ts +1 -1
  51. package/dist/llm/defaults.js +1 -1
  52. package/dist/llm/discovery.d.ts +2 -0
  53. package/dist/llm/discovery.js +16 -5
  54. package/dist/llm/modelCatalogEntries.js +32 -0
  55. package/dist/llm/providerPresets.d.ts +3 -1
  56. package/dist/llm/providerPresets.js +6 -3
  57. package/dist/llm/providerReasoningRequest.js +14 -1
  58. package/dist/llm/siliconflow/index.d.ts +21 -0
  59. package/dist/llm/siliconflow/index.js +32 -0
  60. package/dist/llm/siliconflow/preset.d.ts +6 -0
  61. package/dist/llm/siliconflow/preset.js +33 -0
  62. package/dist/packs/models/apimart/gpt-image-2.5.d.ts +6 -0
  63. package/dist/packs/models/apimart/gpt-image-2.5.js +7 -0
  64. package/dist/packs/models/fal/gpt-image-2.5.d.ts +6 -0
  65. package/dist/packs/models/fal/gpt-image-2.5.js +7 -0
  66. package/dist/packs/models/grsai/gpt-image-2.5.d.ts +6 -0
  67. package/dist/packs/models/grsai/gpt-image-2.5.js +7 -0
  68. package/dist/packs/models/kie/gpt-image-2.5.d.ts +6 -0
  69. package/dist/packs/models/kie/gpt-image-2.5.js +7 -0
  70. package/dist/packs/provider-packs/apimart.d.ts +1 -1
  71. package/dist/packs/provider-packs/apimart.js +21 -20
  72. package/dist/packs/provider-packs/fal.d.ts +1 -1
  73. package/dist/packs/provider-packs/fal.js +37 -36
  74. package/dist/packs/provider-packs/grsai.d.ts +1 -1
  75. package/dist/packs/provider-packs/grsai.js +6 -5
  76. package/dist/packs/provider-packs/kie.d.ts +1 -1
  77. package/dist/packs/provider-packs/kie.js +28 -27
  78. package/dist/packs/tool-models/fal/{qwen-image-edit-2509-multiple-angles.d.ts → qwen-image-edit-2511-multiple-angles.d.ts} +1 -1
  79. package/dist/packs/tool-models/fal/{qwen-image-edit-2509-multiple-angles.js → qwen-image-edit-2511-multiple-angles.js} +1 -1
  80. package/dist/packs/tool-packs/fal-multi-angle-tools.js +1 -1
  81. package/dist/tool-packs/fal-multi-angle/models/qwen-image-edit-2511-multiple-angles.model.d.ts +2 -0
  82. package/dist/tool-packs/fal-multi-angle/models/{qwen-image-edit-2509-multiple-angles.model.js → qwen-image-edit-2511-multiple-angles.model.js} +20 -17
  83. package/docs/README.md +26 -26
  84. package/docs/consumers.md +56 -48
  85. package/docs/llm-adaptation/README.md +139 -137
  86. package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206/DeepSeek.md +103 -91
  87. package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206/Kimi.md +75 -75
  88. package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206/MiniMax.md +84 -84
  89. package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206//345/260/217/347/261/263MiMo.md +85 -85
  90. package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206//346/231/272/350/260/261GLM.md +232 -232
  91. 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 +87 -87
  92. package/docs/llm-adaptation//344/276/233/345/272/224/345/225/206//347/231/276/347/202/274Qwen.md +84 -84
  93. 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
  94. package/docs/model-adaptation/Bria-Eraser/Bria-Eraser_Fal.md +32 -32
  95. 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
  96. package/docs/model-adaptation/ControlLight/ControlLight_Fal.md +85 -85
  97. 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
  98. package/docs/model-adaptation/Finegrain-Eraser/Finegrain-Eraser_Fal.md +31 -31
  99. package/docs/model-adaptation/Flux-Pro-Erase/Flux-Pro-Erase_Fal.md +34 -34
  100. package/docs/model-adaptation/Fun-ASR/Fun-ASR_/347/231/276/347/202/274.md +43 -43
  101. package/docs/model-adaptation/Fun-ASR-Flash-2026-06-15/Fun-ASR-Flash-2026-06-15_/347/231/276/347/202/274.md +41 -41
  102. package/docs/model-adaptation/Fun-ASR-Realtime/Fun-ASR-Realtime_/347/231/276/347/202/274.md +37 -37
  103. 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
  104. package/docs/model-adaptation/GLM-5.3-Flash/GLM-5.3-Flash_/346/231/272/350/260/261.md +207 -207
  105. package/docs/model-adaptation/GPT-Image-2/GPT-Image-2_APIMart.md +173 -173
  106. package/docs/model-adaptation/GPT-Image-2/GPT-Image-2_Fal.md +94 -94
  107. package/docs/model-adaptation/GPT-Image-2/GPT-Image-2_Grsai.md +137 -137
  108. package/docs/model-adaptation/GPT-Image-2/GPT-Image-2_KIE.md +93 -93
  109. package/docs/model-adaptation/GPT-Image-2.5/GPT-Image-2.5_APIMart.md +66 -0
  110. package/docs/model-adaptation/GPT-Image-2.5/GPT-Image-2.5_Fal.md +55 -0
  111. package/docs/model-adaptation/GPT-Image-2.5/GPT-Image-2.5_Grsai.md +53 -0
  112. package/docs/model-adaptation/GPT-Image-2.5/GPT-Image-2.5_KIE.md +55 -0
  113. package/docs/model-adaptation/GPT-OSS-20B/GPT-OSS-20B_Groq.md +62 -62
  114. package/docs/model-adaptation/Gemini-Omni-Flash/Gemini-Omni-Flash_APIMart.md +124 -124
  115. package/docs/model-adaptation/Gemini-Omni-Flash/Gemini-Omni-Flash_Fal.md +84 -84
  116. package/docs/model-adaptation/Gemini-Omni-Flash/Gemini-Omni-Flash_KIE.md +129 -129
  117. package/docs/model-adaptation/Grok-Imagine/Grok-Imagine_KIE.md +36 -36
  118. package/docs/model-adaptation/Grok-Imagine-2.0/Grok-Imagine-2.0_APIMart.md +250 -250
  119. package/docs/model-adaptation/Grok-Imagine-2.0/Grok-Imagine-2.0_Fal.md +84 -84
  120. package/docs/model-adaptation/Grok-Imagine-2.0/Grok-Imagine-2.0_KIE.md +105 -105
  121. package/docs/model-adaptation/Hailuo-02/Hailuo-02_Fal.md +93 -93
  122. package/docs/model-adaptation/Hailuo-02/Hailuo-02_KIE.md +56 -56
  123. package/docs/model-adaptation/Hailuo-2.3/Hailuo-2.3_Fal.md +88 -88
  124. package/docs/model-adaptation/Hailuo-2.3/Hailuo-2.3_KIE.md +51 -51
  125. package/docs/model-adaptation/Hailuo-2.3/Hailuo-2.3_/346/264/276/346/254/247/344/272/221.md +70 -70
  126. package/docs/model-adaptation/IC-Light-v2/IC-Light-v2_Fal.md +97 -94
  127. 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
  128. 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
  129. 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
  130. 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
  131. 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
  132. package/docs/model-adaptation/Kling-3.0/Kling-3.0_APIMart.md +112 -112
  133. package/docs/model-adaptation/Kling-3.0/Kling-3.0_Fal.md +89 -89
  134. package/docs/model-adaptation/Kling-3.0/Kling-3.0_KIE.md +106 -106
  135. package/docs/model-adaptation/Kling-3.0/Kling-3.0_/346/264/276/346/254/247/344/272/221.md +119 -119
  136. package/docs/model-adaptation/Kling-3.0-Omni/Kling-3.0-Omni_APIMart.md +125 -125
  137. package/docs/model-adaptation/Kling-3.0-Omni/Kling-3.0-Omni_Fal.md +107 -107
  138. package/docs/model-adaptation/Kling-3.0-Omni/Kling-3.0-Omni_KIE.md +143 -143
  139. package/docs/model-adaptation/Kling-3.0-Turbo/Kling-3.0-Turbo_APIMart.md +85 -85
  140. package/docs/model-adaptation/Kling-3.0-Turbo/Kling-3.0-Turbo_Fal.md +83 -83
  141. package/docs/model-adaptation/Kling-3.0-Turbo/Kling-3.0-Turbo_KIE.md +84 -84
  142. package/docs/model-adaptation/Midjourney/Midjourney_APIMart.md +396 -396
  143. package/docs/model-adaptation/MiniMax-H3/MiniMax-H3_APIMart.md +234 -234
  144. package/docs/model-adaptation/MiniMax-H3/MiniMax-H3_Fal.md +108 -108
  145. package/docs/model-adaptation/MiniMax-H3/MiniMax-H3_KIE.md +111 -111
  146. package/docs/model-adaptation/MiniMax-Speech/MiniMax-Speech_/346/264/276/346/254/247/344/272/221.md +170 -170
  147. package/docs/model-adaptation/Nano-Banana-2/Nano-Banana-2_APIMart.md +89 -89
  148. package/docs/model-adaptation/Nano-Banana-2/Nano-Banana-2_Fal.md +99 -99
  149. package/docs/model-adaptation/Nano-Banana-2/Nano-Banana-2_Grsai.md +82 -82
  150. package/docs/model-adaptation/Nano-Banana-2/Nano-Banana-2_KIE.md +70 -70
  151. package/docs/model-adaptation/Nano-Banana-2-Lite/Nano-Banana-2-Lite_APIMart.md +79 -79
  152. package/docs/model-adaptation/Nano-Banana-2-Lite/Nano-Banana-2-Lite_Grsai.md +65 -65
  153. package/docs/model-adaptation/Nano-Banana-2-Lite/Nano-Banana-2-Lite_KIE.md +64 -64
  154. package/docs/model-adaptation/Nano-Banana-Pro/Nano-Banana-Pro_APIMart.md +83 -83
  155. package/docs/model-adaptation/Nano-Banana-Pro/Nano-Banana-Pro_Fal.md +89 -89
  156. package/docs/model-adaptation/Nano-Banana-Pro/Nano-Banana-Pro_Grsai.md +82 -82
  157. package/docs/model-adaptation/Nano-Banana-Pro/Nano-Banana-Pro_KIE.md +64 -64
  158. 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
  159. package/docs/model-adaptation/Qwen-Image-3.0/Qwen-Image-3.0_APIMart.md +117 -117
  160. package/docs/model-adaptation/Qwen-Image-3.0/Qwen-Image-3.0_Fal.md +84 -84
  161. package/docs/model-adaptation/Qwen-Image-3.0/Qwen-Image-3.0_KIE.md +103 -103
  162. package/docs/model-adaptation/Qwen-Image-3.0/Qwen-Image-3.0_/347/231/276/347/202/274.md +138 -138
  163. 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 -0
  164. package/docs/model-adaptation/Qwen-MT-Flash/Qwen-MT-Flash_/347/231/276/347/202/274.md +47 -47
  165. package/docs/model-adaptation/Qwen-MT-Lite/Qwen-MT-Lite_/347/231/276/347/202/274.md +39 -39
  166. package/docs/model-adaptation/Qwen-MT-Plus/Qwen-MT-Plus_/347/231/276/347/202/274.md +39 -39
  167. package/docs/model-adaptation/Qwen3-ASR-Flash/Qwen3-ASR-Flash_/347/231/276/347/202/274.md +40 -40
  168. package/docs/model-adaptation/Qwen3-ASR-Flash-2026-02-10/Qwen3-ASR-Flash-2026-02-10_/347/231/276/347/202/274.md +33 -33
  169. package/docs/model-adaptation/Qwen3-ASR-Flash-Filetrans/Qwen3-ASR-Flash-Filetrans_/347/231/276/347/202/274.md +41 -41
  170. package/docs/model-adaptation/Qwen3-ASR-Flash-Realtime/Qwen3-ASR-Flash-Realtime_/347/231/276/347/202/274.md +35 -35
  171. 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
  172. package/docs/model-adaptation/README.md +313 -295
  173. 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
  174. 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 +143 -143
  175. 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
  176. package/docs/model-adaptation/Seedance-2.0/Seedance-2.0_APIMart.md +121 -121
  177. package/docs/model-adaptation/Seedance-2.0/Seedance-2.0_Fal.md +97 -97
  178. package/docs/model-adaptation/Seedance-2.0/Seedance-2.0_KIE.md +86 -86
  179. package/docs/model-adaptation/Seedance-2.0-Fast/Seedance-2.0-Fast_APIMart.md +89 -89
  180. package/docs/model-adaptation/Seedance-2.0-Fast/Seedance-2.0-Fast_Fal.md +95 -95
  181. package/docs/model-adaptation/Seedance-2.0-Fast/Seedance-2.0-Fast_KIE.md +78 -78
  182. package/docs/model-adaptation/Seedance-2.0-Mini/Seedance-2.0-Mini_APIMart.md +89 -89
  183. package/docs/model-adaptation/Seedance-2.0-Mini/Seedance-2.0-Mini_Fal.md +96 -96
  184. package/docs/model-adaptation/Seedance-2.0-Mini/Seedance-2.0-Mini_KIE.md +78 -78
  185. package/docs/model-adaptation/Seedance-2.5/Seedance-2.5_APIMart.md +212 -212
  186. package/docs/model-adaptation/Seedance-2.5/Seedance-2.5_Fal.md +94 -94
  187. package/docs/model-adaptation/Seedance-2.5/Seedance-2.5_KIE.md +89 -89
  188. package/docs/model-adaptation/Seedream-5.0-Lite/Seedream-5.0-Lite_APIMart.md +106 -106
  189. package/docs/model-adaptation/Seedream-5.0-Lite/Seedream-5.0-Lite_Fal.md +91 -91
  190. package/docs/model-adaptation/Seedream-5.0-Lite/Seedream-5.0-Lite_KIE.md +89 -89
  191. 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 +108 -108
  192. package/docs/model-adaptation/Seedream-5.0-Pro/Seedream-5.0-Pro_APIMart.md +194 -194
  193. package/docs/model-adaptation/Seedream-5.0-Pro/Seedream-5.0-Pro_Fal.md +100 -100
  194. package/docs/model-adaptation/Seedream-5.0-Pro/Seedream-5.0-Pro_KIE.md +141 -141
  195. 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
  196. package/docs/model-adaptation/SenseVoiceSmall/SenseVoiceSmall_/347/241/205/345/237/272/346/265/201/345/212/250.md +69 -69
  197. package/docs/model-adaptation/TeleSpeechASR/TeleSpeechASR_/347/241/205/345/237/272/346/265/201/345/212/250.md +72 -72
  198. 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
  199. 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
  200. package/docs/model-adaptation/Wan-2.5-Preview/Wan-2.5-Preview_/346/264/276/346/254/247/344/272/221.md +82 -82
  201. package/docs/model-adaptation/Wan-2.6/Wan-2.6_/346/264/276/346/254/247/344/272/221.md +84 -84
  202. package/docs/model-adaptation/Wan-2.7/Wan-2.7_/346/264/276/346/254/247/344/272/221.md +122 -122
  203. package/docs/model-adaptation/Whisper-Large-v3/Whisper-Large-v3_Groq.md +76 -76
  204. package/docs/model-adaptation/Whisper-Large-v3-Turbo/Whisper-Large-v3-Turbo_Groq.md +75 -75
  205. package/docs/model-adaptation/Z-Image-Turbo/Z-Image-Turbo_APIMart.md +88 -88
  206. package/docs/model-adaptation/Z-Image-Turbo/Z-Image-Turbo_Fal.md +95 -95
  207. package/docs/model-adaptation/Z-Image-Turbo/Z-Image-Turbo_KIE.md +71 -71
  208. package/docs/model-adaptation/Z-Image-Turbo/Z-Image-Turbo_/347/231/276/347/202/274.md +122 -122
  209. package/docs/model-adaptation/Z-Image-Turbo/Z-Image-Turbo_/351/255/224/346/220/255.md +97 -97
  210. package/docs/model-adaptation//344/276/233/345/272/224/345/225/206/APIMart.md +238 -238
  211. package/docs/model-adaptation//344/276/233/345/272/224/345/225/206/Fal.md +172 -172
  212. package/docs/model-adaptation//344/276/233/345/272/224/345/225/206/Groq.md +121 -121
  213. package/docs/model-adaptation//344/276/233/345/272/224/345/225/206/Grsai.md +217 -217
  214. package/docs/model-adaptation//344/276/233/345/272/224/345/225/206/KIE.md +131 -131
  215. 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
  216. 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
  217. package/docs/model-adaptation//344/276/233/345/272/224/345/225/206//346/264/276/346/254/247/344/272/221.md +147 -138
  218. 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 +181 -171
  219. package/docs/model-adaptation//344/276/233/345/272/224/345/225/206//347/231/276/347/202/274.md +237 -227
  220. 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 +140 -75
  221. package/docs/model-adaptation//344/276/233/345/272/224/345/225/206//351/255/224/346/220/255.md +207 -207
  222. package/docs/model-adaptation//346/226/207/346/241/243/351/207/207/351/233/206/346/211/213/345/206/214.md +338 -311
  223. 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
  224. package/docs//346/216/245/345/205/245/346/214/207/345/215/227/Electron.md +77 -77
  225. package/docs//346/216/245/345/205/245/346/214/207/345/215/227/Tauri.md +81 -81
  226. package/docs//346/216/245/345/205/245/346/214/207/345/215/227/UXP.md +169 -169
  227. 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
  228. 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
  229. package/examples/form-renderer/README.md +17 -17
  230. package/examples/form-renderer/cli.ts +32 -32
  231. package/examples/form-renderer/index.ts +144 -144
  232. package/examples/form-renderer/package.json +16 -16
  233. package/examples/form-renderer/tsconfig.json +14 -14
  234. package/examples/llm-chat/README.md +32 -32
  235. package/examples/llm-chat/index.ts +100 -100
  236. package/examples/llm-chat/package.json +19 -19
  237. package/examples/llm-chat/tsconfig.json +14 -14
  238. package/examples/minimal-node/README.md +31 -31
  239. package/examples/minimal-node/index.ts +138 -138
  240. package/examples/minimal-node/package.json +17 -17
  241. package/examples/minimal-node/tsconfig.json +14 -14
  242. package/package.json +255 -195
  243. package/dist/tool-packs/fal-multi-angle/models/qwen-image-edit-2509-multiple-angles.model.d.ts +0 -2
  244. package/docs/model-adaptation/Qwen-Image-Edit-2509-/345/244/232/350/247/222/345/272/246/Qwen-Image-Edit-2509-/345/244/232/350/247/222/345/272/246_Fal.md +0 -116
@@ -1,95 +1,95 @@
1
- # Z-Image Turbo · Fal
2
-
3
- | 项目 | 内容 |
4
- |---|---|
5
- | 最后更新 | 2026-08-28 |
6
- | 模态 | 图片 |
7
- | 供应商 | fal.ai(聚合平台) |
8
- | 平台模型 ID | `fal-ai/z-image/turbo`、`fal-ai/z-image/turbo/image-to-image` |
9
- | 接口形态 | 队列异步(推荐)或同步直连 |
10
- | 文档可见性 | 公开,无需登录 |
11
- | 价格可见性 | 公开,无需登录 |
12
-
13
- > **Fal 是唯一提供 Z-Image 图生图能力的供应商**(百炼官方、APIMart、KIE 都只有文生图)。
14
-
15
- ## 1. 接入协议(Fal 通用)
16
-
17
- - **鉴权**:`Authorization: Key $FAL_KEY`
18
- - **同步**:`POST https://fal.run/<endpoint-id>`
19
- - **队列**:`POST https://queue.fal.run/<endpoint-id>` → `{ request_id, status_url, response_url, cancel_url }`;`GET .../requests/{id}/status`(`IN_QUEUE` / `IN_PROGRESS` / `COMPLETED`);`GET .../requests/{id}` 取结果
20
- - **权威 schema**:`https://fal.ai/models/<endpoint-id>/llms.txt`
21
-
22
- ## 2. 能力清单
23
-
24
- | 能力 | endpoint id |
25
- |---|---|
26
- | 文生图 | `fal-ai/z-image/turbo` |
27
- | 图生图(单图 + 强度) | `fal-ai/z-image/turbo/image-to-image` |
28
-
29
- ## 3. 请求参数(两个端点共有)
30
-
31
- | 字段 | 类型 | 必填 | 默认 | 取值与说明 |
32
- |---|---|---|---|---|
33
- | `prompt` | string | 必填 | — | 生成描述 |
34
- | `image_size` | 枚举或对象 | 可选 | 文生图 `landscape_4_3`;图生图 `auto` | 枚举 `square_hd`、`square`、`portrait_4_3`、`portrait_16_9`、`landscape_4_3`、`landscape_16_9`(图生图还支持 `auto`),或 `{ width, height }` |
35
- | `num_inference_steps` | integer | 可选 | `8` | **1–8**。Turbo 模型步数很低 |
36
- | `seed` | integer | 可选 | 随机 | **本项目规则:绝对不显示**,不下发 |
37
- | `sync_mode` | boolean | 可选 | `false` | `true` 时以 data URI 返回且不入请求历史 |
38
- | `num_images` | integer | 可选 | `1` | **1–4** |
39
- | `enable_safety_checker` | boolean | 可选 | `true` | 关闭需账号授权;**被判定为不安全的图会返回黑图** |
40
- | `output_format` | string | 可选 | `png` | `jpeg` / `png` / `webp` |
41
- | `acceleration` | string | 可选 | `regular` | `none` / `regular` / `high` |
42
- | `enable_prompt_expansion` | boolean | 可选 | `false` | 提示词扩写。**每次请求加价 0.0025 credits** |
43
-
44
- **仅 `image-to-image` 有:**
45
-
46
- | 字段 | 类型 | 必填 | 默认 | 说明 |
47
- |---|---|---|---|---|
48
- | `image_url` | string | 必填 | — | **单张**输入图 URL(不是数组) |
49
- | `strength` | float | 可选 | `0.6` | 图生图条件强度 |
50
-
51
- ## 4. 响应结构
52
-
53
- ```json
54
- {
55
- "images": [ { "url": "https://.../z-image-turbo-output.png", "content_type": "image/png", "width": 1024, "height": 768 } ],
56
- "timings": { },
57
- "seed": 42,
58
- "has_nsfw_concepts": [false],
59
- "prompt": "(实际用于生成的提示词)"
60
- }
61
- ```
62
-
63
- `images`、`timings`、`seed`、`has_nsfw_concepts`、`prompt` 都是必返回字段。`images[]` 元素带 `content_type` / `width` / `height`,比其他供应商信息更全。
64
-
65
- ## 5. 价格
66
-
67
- 来源:两个端点的 `llms.txt`(2026-08-22 读取)。
68
-
69
- | 项 | 价格 |
70
- |---|---|
71
- | 基础 | **$0.005 / 百万像素(megapixel)** |
72
- | `enable_prompt_expansion: true` | 每次请求额外 **+0.0025 credits** |
73
-
74
- > Fal 这里按**像素面积**计价,与百炼(按张 0.1/0.2 元)、APIMart(按张 $0.01/$0.02)、KIE(按张 $0.004)的计价口径完全不同。1024×1024 约 1.05 MP,折合约 $0.00524/张。
75
-
76
- ## 6. 适配要点
77
-
78
- - 本项目默认**绝对不显示**:`seed`、负面提示词。Fal 本端点**有 `seed`**(不下发),无负面提示词字段。
79
- - `output_format`、`sync_mode` 按项目约定不展示、不请求;`acceleration` 与 `num_inference_steps` 是已公开的成本/速度控制,SDK 保留为可选参数。
80
- - SDK 新增独立 `falZImageTurboImageSize` 请求档:默认 `provider` 保持 0.1.5 的长边 1K/2K 语义,显式 `1MP` 则按比例发送约 1024²、16 对齐的对象,供需要精确复刻旧插件尺寸语义的 adapter 使用。
81
- - 这是唯一有图生图的 Z-Image 供应商,`image_url` 是**单张字符串**,不是数组。
82
- - `num_images` 最多 4(其他供应商固定 1),是否开放由产品决定。
83
- - 关闭安全检查时不安全图会返回**黑图**而不是报错,结果解析要能识别。
84
- - 计价按像素面积,成本估算逻辑不能沿用「按张」的模型。
85
-
86
- ## 7. 原始链接索引
87
-
88
- | 信息 | 链接 | 是否需登录 |
89
- |---|---|---|
90
- | 文生图模型页 | https://fal.ai/models/fal-ai/z-image/turbo | 否 |
91
- | 文生图 schema + 价格 | https://fal.ai/models/fal-ai/z-image/turbo/llms.txt | 否 |
92
- | 图生图模型页 | https://fal.ai/models/fal-ai/z-image/turbo/image-to-image | 否 |
93
- | 图生图 schema + 价格 | https://fal.ai/models/fal-ai/z-image/turbo/image-to-image/llms.txt | 否 |
94
- | 队列协议 | https://fal.ai/docs/documentation/model-apis/inference/queue | 否 |
95
- | API Key 创建 | https://fal.ai/dashboard/keys | **是** |
1
+ # Z-Image Turbo · Fal
2
+
3
+ | 项目 | 内容 |
4
+ |---|---|
5
+ | 最后更新 | 2026-08-28 |
6
+ | 模态 | 图片 |
7
+ | 供应商 | fal.ai(聚合平台) |
8
+ | 平台模型 ID | `fal-ai/z-image/turbo`、`fal-ai/z-image/turbo/image-to-image` |
9
+ | 接口形态 | 队列异步(推荐)或同步直连 |
10
+ | 文档可见性 | 公开,无需登录 |
11
+ | 价格可见性 | 公开,无需登录 |
12
+
13
+ > **Fal 是唯一提供 Z-Image 图生图能力的供应商**(百炼官方、APIMart、KIE 都只有文生图)。
14
+
15
+ ## 1. 接入协议(Fal 通用)
16
+
17
+ - **鉴权**:`Authorization: Key $FAL_KEY`
18
+ - **同步**:`POST https://fal.run/<endpoint-id>`
19
+ - **队列**:`POST https://queue.fal.run/<endpoint-id>` → `{ request_id, status_url, response_url, cancel_url }`;`GET .../requests/{id}/status`(`IN_QUEUE` / `IN_PROGRESS` / `COMPLETED`);`GET .../requests/{id}` 取结果
20
+ - **权威 schema**:`https://fal.ai/models/<endpoint-id>/llms.txt`
21
+
22
+ ## 2. 能力清单
23
+
24
+ | 能力 | endpoint id |
25
+ |---|---|
26
+ | 文生图 | `fal-ai/z-image/turbo` |
27
+ | 图生图(单图 + 强度) | `fal-ai/z-image/turbo/image-to-image` |
28
+
29
+ ## 3. 请求参数(两个端点共有)
30
+
31
+ | 字段 | 类型 | 必填 | 默认 | 取值与说明 |
32
+ |---|---|---|---|---|
33
+ | `prompt` | string | 必填 | — | 生成描述 |
34
+ | `image_size` | 枚举或对象 | 可选 | 文生图 `landscape_4_3`;图生图 `auto` | 枚举 `square_hd`、`square`、`portrait_4_3`、`portrait_16_9`、`landscape_4_3`、`landscape_16_9`(图生图还支持 `auto`),或 `{ width, height }` |
35
+ | `num_inference_steps` | integer | 可选 | `8` | **1–8**。Turbo 模型步数很低 |
36
+ | `seed` | integer | 可选 | 随机 | **本项目规则:绝对不显示**,不下发 |
37
+ | `sync_mode` | boolean | 可选 | `false` | `true` 时以 data URI 返回且不入请求历史 |
38
+ | `num_images` | integer | 可选 | `1` | **1–4** |
39
+ | `enable_safety_checker` | boolean | 可选 | `true` | 关闭需账号授权;**被判定为不安全的图会返回黑图** |
40
+ | `output_format` | string | 可选 | `png` | `jpeg` / `png` / `webp` |
41
+ | `acceleration` | string | 可选 | `regular` | `none` / `regular` / `high` |
42
+ | `enable_prompt_expansion` | boolean | 可选 | `false` | 提示词扩写。**每次请求加价 0.0025 credits** |
43
+
44
+ **仅 `image-to-image` 有:**
45
+
46
+ | 字段 | 类型 | 必填 | 默认 | 说明 |
47
+ |---|---|---|---|---|
48
+ | `image_url` | string | 必填 | — | **单张**输入图 URL(不是数组) |
49
+ | `strength` | float | 可选 | `0.6` | 图生图条件强度 |
50
+
51
+ ## 4. 响应结构
52
+
53
+ ```json
54
+ {
55
+ "images": [ { "url": "https://.../z-image-turbo-output.png", "content_type": "image/png", "width": 1024, "height": 768 } ],
56
+ "timings": { },
57
+ "seed": 42,
58
+ "has_nsfw_concepts": [false],
59
+ "prompt": "(实际用于生成的提示词)"
60
+ }
61
+ ```
62
+
63
+ `images`、`timings`、`seed`、`has_nsfw_concepts`、`prompt` 都是必返回字段。`images[]` 元素带 `content_type` / `width` / `height`,比其他供应商信息更全。
64
+
65
+ ## 5. 价格
66
+
67
+ 来源:两个端点的 `llms.txt`(2026-08-22 读取)。
68
+
69
+ | 项 | 价格 |
70
+ |---|---|
71
+ | 基础 | **$0.005 / 百万像素(megapixel)** |
72
+ | `enable_prompt_expansion: true` | 每次请求额外 **+0.0025 credits** |
73
+
74
+ > Fal 这里按**像素面积**计价,与百炼(按张 0.1/0.2 元)、APIMart(按张 $0.01/$0.02)、KIE(按张 $0.004)的计价口径完全不同。1024×1024 约 1.05 MP,折合约 $0.00524/张。
75
+
76
+ ## 6. 适配要点
77
+
78
+ - 本项目默认**绝对不显示**:`seed`、负面提示词。Fal 本端点**有 `seed`**(不下发),无负面提示词字段。
79
+ - `output_format`、`sync_mode` 按项目约定不展示、不请求;`acceleration` 与 `num_inference_steps` 是已公开的成本/速度控制,SDK 保留为可选参数。
80
+ - SDK 新增独立 `falZImageTurboImageSize` 请求档:默认 `provider` 保持 0.1.5 的长边 1K/2K 语义,显式 `1MP` 则按比例发送约 1024²、16 对齐的对象,供需要精确复刻旧插件尺寸语义的 adapter 使用。
81
+ - 这是唯一有图生图的 Z-Image 供应商,`image_url` 是**单张字符串**,不是数组。
82
+ - `num_images` 最多 4(其他供应商固定 1),是否开放由产品决定。
83
+ - 关闭安全检查时不安全图会返回**黑图**而不是报错,结果解析要能识别。
84
+ - 计价按像素面积,成本估算逻辑不能沿用「按张」的模型。
85
+
86
+ ## 7. 原始链接索引
87
+
88
+ | 信息 | 链接 | 是否需登录 |
89
+ |---|---|---|
90
+ | 文生图模型页 | https://fal.ai/models/fal-ai/z-image/turbo | 否 |
91
+ | 文生图 schema + 价格 | https://fal.ai/models/fal-ai/z-image/turbo/llms.txt | 否 |
92
+ | 图生图模型页 | https://fal.ai/models/fal-ai/z-image/turbo/image-to-image | 否 |
93
+ | 图生图 schema + 价格 | https://fal.ai/models/fal-ai/z-image/turbo/image-to-image/llms.txt | 否 |
94
+ | 队列协议 | https://fal.ai/docs/documentation/model-apis/inference/queue | 否 |
95
+ | API Key 创建 | https://fal.ai/dashboard/keys | **是** |
@@ -1,71 +1,71 @@
1
- # Z-Image Turbo · KIE
2
-
3
- | 项目 | 内容 |
4
- |---|---|
5
- | 最后更新 | 2026-08-22 |
6
- | 模态 | 图片 |
7
- | 供应商 | KIE.ai(聚合平台) |
8
- | 平台模型 ID | `z-image` |
9
- | 接口形态 | **异步任务**(`createTask` + `recordInfo`) |
10
- | 文档可见性 | 公开,无需登录 |
11
- | 价格可见性 | 公开,无需登录 |
12
-
13
- > KIE 的 model 名是 **`z-image`**(不带 `-turbo`),定价页条目名为 `Qwen z-image`。
14
-
15
- ## 1. 接入协议
16
-
17
- - **Base URL**:`https://api.kie.ai`
18
- - **鉴权**:`Authorization: Bearer <API_KEY>`
19
- - **提交**:`POST /api/v1/jobs/createTask`,体为 `{ model: "z-image", callBackUrl?, input }`
20
- - **查询**:`GET /api/v1/jobs/recordInfo?taskId=...`
21
- - **终态**:`state` ∈ `waiting` / `queuing` / `generating` / `success` / `fail`
22
- - **结果**:`JSON.parse(resultJson)` → `{ resultUrls: [...] }`;失败读 `failCode` / `failMsg`
23
-
24
- ## 2. 能力清单
25
-
26
- 仅**文生图**一个端点 `z-image`。
27
-
28
- ## 3. 请求参数
29
-
30
- | 字段 | 类型 | 必填 | 默认 | 取值与说明 |
31
- |---|---|---|---|---|
32
- | `model` | string | 必填 | `z-image` | 必须是 `z-image` |
33
- | `input.prompt` | string | 必填 | — | **最长 1000 字符**(官方百炼是 800,APIMart 是 800) |
34
- | `input.aspect_ratio` | string | 必填 | `1:1` | **只有 5 个**:`1:1`、`4:3`、`3:4`、`16:9`、`9:16` |
35
- | `input.nsfw_checker` | boolean | 可选 | `false` | `false` 时关闭内容过滤,结果直接返回 |
36
-
37
- > ⚠️ **文档自相矛盾**:`aspect_ratio` 的描述文字写了「选择 `auto` 可匹配首张输入图像的比例(需传入输入图像)」,但枚举里**没有 `auto`**,`input` 中也**没有输入图字段**。这段描述应属复制粘贴残留,接入时按枚举的 5 个比例处理,不要下发 `auto`。
38
-
39
- **没有分辨率档位参数**(无 `resolution` / `size`),也**没有 `prompt_extend`**——这两点与百炼官方和 APIMart 都不同。
40
-
41
- ## 4. 响应结构
42
-
43
- `state=success` 后 `JSON.parse(resultJson)` → `{ "resultUrls": ["https://..."] }`。
44
-
45
- ## 5. 价格
46
-
47
- 来源:[KIE 定价页](https://kie.ai/pricing)(2026-08-22 读取,搜索 `z-image`;1 Credit = $0.005)。
48
-
49
- | 规格 | 积分 | 我们的价格 | 官方 / Fal 参考价 | 节省 |
50
- |---|---|---|---|---|
51
- | `Qwen z-image`, text-to-image, 1.0s | 0.8 /张 | **$0.004/张** | $0.005 | 20% |
52
-
53
- KIE 只有一个价格档,不区分分辨率,也不区分是否开启提示词改写。
54
-
55
- ## 6. 适配要点
56
-
57
- - 本项目默认**绝对不显示**:`seed`、负面提示词。KIE 本接口两个字段都没有。
58
- - 比例集合只有 5 个,是所有供应商里最少的;跨供应商共享比例集合时必须按供应商裁剪。
59
- - 没有分辨率档位,输出尺寸完全由比例决定,UI 不要出现 1K/2K 选择。
60
- - 提示词上限 1000 字符(与另两家的 800 不同)。
61
- - `resultJson` 是 JSON 字符串,必须二次 parse。
62
-
63
- ## 7. 原始链接索引
64
-
65
- | 信息 | 链接 | 是否需登录 |
66
- |---|---|---|
67
- | z-image 生成端点 | https://docs.kie.ai/cn/market/z-image/z-image | 否 |
68
- | 获取任务详情 | https://docs.kie.ai/cn/market/common/get-task-detail | 否 |
69
- | 通用 API 快速入门 | https://docs.kie.ai/cn/common-api/quickstart | 否 |
70
- | 定价页(搜 `z-image`) | https://kie.ai/pricing | 否 |
71
- | API Key 管理 | https://kie.ai/api-key | **是** |
1
+ # Z-Image Turbo · KIE
2
+
3
+ | 项目 | 内容 |
4
+ |---|---|
5
+ | 最后更新 | 2026-08-22 |
6
+ | 模态 | 图片 |
7
+ | 供应商 | KIE.ai(聚合平台) |
8
+ | 平台模型 ID | `z-image` |
9
+ | 接口形态 | **异步任务**(`createTask` + `recordInfo`) |
10
+ | 文档可见性 | 公开,无需登录 |
11
+ | 价格可见性 | 公开,无需登录 |
12
+
13
+ > KIE 的 model 名是 **`z-image`**(不带 `-turbo`),定价页条目名为 `Qwen z-image`。
14
+
15
+ ## 1. 接入协议
16
+
17
+ - **Base URL**:`https://api.kie.ai`
18
+ - **鉴权**:`Authorization: Bearer <API_KEY>`
19
+ - **提交**:`POST /api/v1/jobs/createTask`,体为 `{ model: "z-image", callBackUrl?, input }`
20
+ - **查询**:`GET /api/v1/jobs/recordInfo?taskId=...`
21
+ - **终态**:`state` ∈ `waiting` / `queuing` / `generating` / `success` / `fail`
22
+ - **结果**:`JSON.parse(resultJson)` → `{ resultUrls: [...] }`;失败读 `failCode` / `failMsg`
23
+
24
+ ## 2. 能力清单
25
+
26
+ 仅**文生图**一个端点 `z-image`。
27
+
28
+ ## 3. 请求参数
29
+
30
+ | 字段 | 类型 | 必填 | 默认 | 取值与说明 |
31
+ |---|---|---|---|---|
32
+ | `model` | string | 必填 | `z-image` | 必须是 `z-image` |
33
+ | `input.prompt` | string | 必填 | — | **最长 1000 字符**(官方百炼是 800,APIMart 是 800) |
34
+ | `input.aspect_ratio` | string | 必填 | `1:1` | **只有 5 个**:`1:1`、`4:3`、`3:4`、`16:9`、`9:16` |
35
+ | `input.nsfw_checker` | boolean | 可选 | `false` | `false` 时关闭内容过滤,结果直接返回 |
36
+
37
+ > ⚠️ **文档自相矛盾**:`aspect_ratio` 的描述文字写了「选择 `auto` 可匹配首张输入图像的比例(需传入输入图像)」,但枚举里**没有 `auto`**,`input` 中也**没有输入图字段**。这段描述应属复制粘贴残留,接入时按枚举的 5 个比例处理,不要下发 `auto`。
38
+
39
+ **没有分辨率档位参数**(无 `resolution` / `size`),也**没有 `prompt_extend`**——这两点与百炼官方和 APIMart 都不同。
40
+
41
+ ## 4. 响应结构
42
+
43
+ `state=success` 后 `JSON.parse(resultJson)` → `{ "resultUrls": ["https://..."] }`。
44
+
45
+ ## 5. 价格
46
+
47
+ 来源:[KIE 定价页](https://kie.ai/pricing)(2026-08-22 读取,搜索 `z-image`;1 Credit = $0.005)。
48
+
49
+ | 规格 | 积分 | 我们的价格 | 官方 / Fal 参考价 | 节省 |
50
+ |---|---|---|---|---|
51
+ | `Qwen z-image`, text-to-image, 1.0s | 0.8 /张 | **$0.004/张** | $0.005 | 20% |
52
+
53
+ KIE 只有一个价格档,不区分分辨率,也不区分是否开启提示词改写。
54
+
55
+ ## 6. 适配要点
56
+
57
+ - 本项目默认**绝对不显示**:`seed`、负面提示词。KIE 本接口两个字段都没有。
58
+ - 比例集合只有 5 个,是所有供应商里最少的;跨供应商共享比例集合时必须按供应商裁剪。
59
+ - 没有分辨率档位,输出尺寸完全由比例决定,UI 不要出现 1K/2K 选择。
60
+ - 提示词上限 1000 字符(与另两家的 800 不同)。
61
+ - `resultJson` 是 JSON 字符串,必须二次 parse。
62
+
63
+ ## 7. 原始链接索引
64
+
65
+ | 信息 | 链接 | 是否需登录 |
66
+ |---|---|---|
67
+ | z-image 生成端点 | https://docs.kie.ai/cn/market/z-image/z-image | 否 |
68
+ | 获取任务详情 | https://docs.kie.ai/cn/market/common/get-task-detail | 否 |
69
+ | 通用 API 快速入门 | https://docs.kie.ai/cn/common-api/quickstart | 否 |
70
+ | 定价页(搜 `z-image`) | https://kie.ai/pricing | 否 |
71
+ | API Key 管理 | https://kie.ai/api-key | **是** |
@@ -1,122 +1,122 @@
1
- # Z-Image Turbo · 百炼(阿里云百炼,官方)
2
-
3
- | 项目 | 内容 |
4
- |---|---|
5
- | 最后更新 | 2026-08-22 |
6
- | 模态 | 图片 |
7
- | 供应商 | 阿里云百炼(Model Studio / DashScope),模型原厂官方接口 |
8
- | 平台模型 ID | `z-image-turbo` |
9
- | 接口形态 | **HTTP 同步调用** |
10
- | 文档可见性 | 公开,无需登录 |
11
- | 价格可见性 | 公开,无需登录 |
12
-
13
- 模型定位:轻量级**文生图**模型,快速出图,支持中英文字渲染,灵活适配多种分辨率与宽高比。
14
-
15
- | 模型 | 简介 | 输出图像规格 |
16
- |---|---|---|
17
- | `z-image-turbo` | 轻量模型,快速生图 | 分辨率:总像素 `[512*512, 2048*2048]`;格式 **PNG**;**张数固定 1 张** |
18
-
19
- ## 1. 接入协议
20
-
21
- `POST https://{WorkspaceId}.<region>.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation`
22
-
23
- | 地域 | `<region>` |
24
- |---|---|
25
- | 华北 2(北京) | `cn-beijing` |
26
- | 新加坡 | `ap-southeast-1` |
27
-
28
- 旧域名 `https://dashscope.aliyuncs.com` / `https://dashscope-intl.aliyuncs.com` 仍可用。`{WorkspaceId}` 在百炼控制台业务空间详情页查看。
29
-
30
- 请求头:`Content-Type: application/json`、`Authorization: Bearer sk-xxxx`。
31
-
32
- **结果时效**:图像 URL **仅保留 24 小时**,超时自动清除。
33
-
34
- ## 2. 能力清单
35
-
36
- 仅**文生图**一种能力。`content` 数组**必须且只能包含 1 个 `text` 对象**,不传或传多个会报错。**当前仅支持单轮对话**(`messages` 只能一组 role/content)。
37
-
38
- Z-Image 在百炼官方**没有图生图 / 图像编辑端点**。
39
-
40
- ## 3. 请求参数
41
-
42
- | 字段 | 类型 | 必填 | 默认 | 取值与说明 |
43
- |---|---|---|---|---|
44
- | `model` | string | 必选 | — | 必须为 `z-image-turbo` |
45
- | `input.messages[0].role` | string | 必选 | — | 固定 `user` |
46
- | `input.messages[0].content[0].text` | string | 必选 | — | 正向提示词。支持中英文,**长度不超过 800 个字符**(每个汉字、字母、数字或符号计 1 个字符),超出自动截断 |
47
- | `parameters.size` | string | 可选 | `1024*1536` | 格式 `宽*高`。总像素须在 `[512*512, 2048*2048]`;**推荐总像素在 `[1024*1024, 1536*1536]` 之间效果更佳** |
48
- | `parameters.prompt_extend` | bool | 可选 | `false` | 智能提示词改写。**直接影响费用:`true` 的价格是 `false` 的 2 倍**。开启后额外返回改写后的提示词与思考过程,并增加响应时间 |
49
- | `parameters.seed` | integer | 可选 | 随机 | `[0, 2147483647]`。**本项目规则:绝对不显示**,不下发 |
50
-
51
- ### 官方推荐分辨率(按总像素档)
52
-
53
- **总像素 1024×1024 档**:1:1 `1024*1024`;2:3 `832*1248`;3:2 `1248*832`;3:4 `864*1152`;4:3 `1152*864`;7:9 `896*1152`;9:7 `1152*896`;9:16 `720*1280`;9:21 `576*1344`;16:9 `1280*720`;21:9 `1344*576`
54
-
55
- **总像素 1280×1280 档**:1:1 `1280*1280`;2:3 `1024*1536`;3:2 `1536*1024`;3:4 `1104*1472`;4:3 `1472*1104`;7:9 `1120*1440`;9:7 `1440*1120`;9:16 `864*1536`;9:21 `720*1680`;16:9 `1536*864`;21:9 `1680*720`
56
-
57
- **总像素 1536×1536 档**:1:1 `1536*1536`;2:3 `1248*1872`;3:2 `1872*1248`;3:4 `1296*1728`;4:3 `1728*1296`;7:9 `1344*1728`;9:7 `1728*1344`;9:16 `1152*2048`;9:21 `864*2016`;16:9 `2048*1152`;21:9 `2016*864`
58
-
59
- > 官方给出 **11 种比例**(含 7:9、9:7、9:21),比任何聚合平台都多。
60
-
61
- ## 4. 响应结构
62
-
63
- ```json
64
- {
65
- "output": { "choices": [ { "finish_reason": "stop", "message": {
66
- "content": [ { "image": "https://dashscope-result-bj...png?Expires=..." },
67
- { "text": "(prompt_extend=false 时为原提示词;true 时为改写后提示词)" } ],
68
- "reasoning_content": "", "role": "assistant" } } ] },
69
- "usage": { "height": 1440, "image_count": 1, "input_tokens": 0, "output_tokens": 0, "total_tokens": 0, "width": 1120 },
70
- "request_id": "..."
71
- }
72
- ```
73
-
74
- | 字段 | 说明 |
75
- |---|---|
76
- | `output.choices[].message.content[].image` | 生成图像 URL,**PNG**,24 小时有效 |
77
- | `output.choices[].message.content[].text` | `prompt_extend=false` 时为输入提示词;`true` 时为改写后提示词 |
78
- | `output.choices[].message.reasoning_content` | 思考过程,**仅 `prompt_extend=true` 时返回** |
79
- | `usage.width` / `usage.height` | 输出图宽高 |
80
- | `usage.image_count` | 固定为 1 |
81
- | `usage.input_tokens` / `output_tokens` / `total_tokens` | `prompt_extend=false` 时固定为 0 |
82
- | `usage.output_tokens_details.reasoning_tokens` | 仅 `prompt_extend=true` 时返回 |
83
-
84
- **失败**:返回 `request_id`、`code`、`message`,例如 `{"code":"InvalidParameter","message":"num_images_per_prompt must be 1"}`。内容审核不通过会报 `IPInfringementSuspect` 或 `DataInspectionFailed`。
85
-
86
- ## 5. 价格(官方,人民币)
87
-
88
- 来源:[百炼模型价格](https://help.aliyun.com/zh/model-studio/model-pricing)(2026-08-22 读取)。
89
-
90
- **华北 2(北京)**
91
-
92
- | 模型 | 单价 | 免费额度 |
93
- |---|---|---|
94
- | `z-image-turbo` | `prompt_extend=false`:**0.1 元/张**<br>`prompt_extend=true`:**0.2 元/张** | 100 张 |
95
-
96
- **新加坡(国际)**
97
-
98
- | 模型 | 单价 |
99
- |---|---|
100
- | `z-image-turbo` | `false`:0.110089 元/张;`true`:0.220177 元/张 |
101
-
102
- 按**成功生成的图像张数**计费;调用失败或处理错误不产生费用,也不消耗免费额度。免费额度有效期为开通百炼 / 模型发布 / 申请通过之日起 90 天内(以较晚者为准)。
103
-
104
- ## 6. 适配要点
105
-
106
- - 本项目默认**绝对不显示**:`seed`、负面提示词。官方有 `seed`(不下发),无负面提示词字段。
107
- - `prompt_extend` **直接翻倍计费**,若要暴露给用户必须在 UI 上说明,或固定为 `false`。
108
- - `size` 分隔符是 `*` 不是 `x`。
109
- - 固定出 1 张,UI 不要出现数量选择。
110
- - 输出固定 PNG,无 `output_format`。
111
- - 提示词硬上限 800 字符且**超出静默截断**,前端应做长度提示。
112
- - 官方仅文生图,本模型如果要在项目里支持图生图,只能走 Fal 的 `image-to-image` 端点。
113
-
114
- ## 7. 原始链接索引
115
-
116
- | 信息 | 链接 | 是否需登录 |
117
- |---|---|---|
118
- | Z-Image API 参考(参数、响应、限制、计费) | https://help.aliyun.com/zh/model-studio/z-image-api-reference | 否 |
119
- | 用户清单给出的控制台入口(同内容) | https://bailian.console.aliyun.com/cn-beijing?tab=api#/api/?type=model&url=3002354 | **是**(控制台);公开页见上一行 |
120
- | 模型价格 | https://help.aliyun.com/zh/model-studio/model-pricing | 否 |
121
- | 各地域支持的模型列表 | https://help.aliyun.com/zh/model-studio/models | 否 |
122
- | API Key 获取 | https://bailian.console.aliyun.com/?apiKey=1#/api-key | **是** |
1
+ # Z-Image Turbo · 百炼(阿里云百炼,官方)
2
+
3
+ | 项目 | 内容 |
4
+ |---|---|
5
+ | 最后更新 | 2026-08-22 |
6
+ | 模态 | 图片 |
7
+ | 供应商 | 阿里云百炼(Model Studio / DashScope),模型原厂官方接口 |
8
+ | 平台模型 ID | `z-image-turbo` |
9
+ | 接口形态 | **HTTP 同步调用** |
10
+ | 文档可见性 | 公开,无需登录 |
11
+ | 价格可见性 | 公开,无需登录 |
12
+
13
+ 模型定位:轻量级**文生图**模型,快速出图,支持中英文字渲染,灵活适配多种分辨率与宽高比。
14
+
15
+ | 模型 | 简介 | 输出图像规格 |
16
+ |---|---|---|
17
+ | `z-image-turbo` | 轻量模型,快速生图 | 分辨率:总像素 `[512*512, 2048*2048]`;格式 **PNG**;**张数固定 1 张** |
18
+
19
+ ## 1. 接入协议
20
+
21
+ `POST https://{WorkspaceId}.<region>.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation`
22
+
23
+ | 地域 | `<region>` |
24
+ |---|---|
25
+ | 华北 2(北京) | `cn-beijing` |
26
+ | 新加坡 | `ap-southeast-1` |
27
+
28
+ 旧域名 `https://dashscope.aliyuncs.com` / `https://dashscope-intl.aliyuncs.com` 仍可用。`{WorkspaceId}` 在百炼控制台业务空间详情页查看。
29
+
30
+ 请求头:`Content-Type: application/json`、`Authorization: Bearer sk-xxxx`。
31
+
32
+ **结果时效**:图像 URL **仅保留 24 小时**,超时自动清除。
33
+
34
+ ## 2. 能力清单
35
+
36
+ 仅**文生图**一种能力。`content` 数组**必须且只能包含 1 个 `text` 对象**,不传或传多个会报错。**当前仅支持单轮对话**(`messages` 只能一组 role/content)。
37
+
38
+ Z-Image 在百炼官方**没有图生图 / 图像编辑端点**。
39
+
40
+ ## 3. 请求参数
41
+
42
+ | 字段 | 类型 | 必填 | 默认 | 取值与说明 |
43
+ |---|---|---|---|---|
44
+ | `model` | string | 必选 | — | 必须为 `z-image-turbo` |
45
+ | `input.messages[0].role` | string | 必选 | — | 固定 `user` |
46
+ | `input.messages[0].content[0].text` | string | 必选 | — | 正向提示词。支持中英文,**长度不超过 800 个字符**(每个汉字、字母、数字或符号计 1 个字符),超出自动截断 |
47
+ | `parameters.size` | string | 可选 | `1024*1536` | 格式 `宽*高`。总像素须在 `[512*512, 2048*2048]`;**推荐总像素在 `[1024*1024, 1536*1536]` 之间效果更佳** |
48
+ | `parameters.prompt_extend` | bool | 可选 | `false` | 智能提示词改写。**直接影响费用:`true` 的价格是 `false` 的 2 倍**。开启后额外返回改写后的提示词与思考过程,并增加响应时间 |
49
+ | `parameters.seed` | integer | 可选 | 随机 | `[0, 2147483647]`。**本项目规则:绝对不显示**,不下发 |
50
+
51
+ ### 官方推荐分辨率(按总像素档)
52
+
53
+ **总像素 1024×1024 档**:1:1 `1024*1024`;2:3 `832*1248`;3:2 `1248*832`;3:4 `864*1152`;4:3 `1152*864`;7:9 `896*1152`;9:7 `1152*896`;9:16 `720*1280`;9:21 `576*1344`;16:9 `1280*720`;21:9 `1344*576`
54
+
55
+ **总像素 1280×1280 档**:1:1 `1280*1280`;2:3 `1024*1536`;3:2 `1536*1024`;3:4 `1104*1472`;4:3 `1472*1104`;7:9 `1120*1440`;9:7 `1440*1120`;9:16 `864*1536`;9:21 `720*1680`;16:9 `1536*864`;21:9 `1680*720`
56
+
57
+ **总像素 1536×1536 档**:1:1 `1536*1536`;2:3 `1248*1872`;3:2 `1872*1248`;3:4 `1296*1728`;4:3 `1728*1296`;7:9 `1344*1728`;9:7 `1728*1344`;9:16 `1152*2048`;9:21 `864*2016`;16:9 `2048*1152`;21:9 `2016*864`
58
+
59
+ > 官方给出 **11 种比例**(含 7:9、9:7、9:21),比任何聚合平台都多。
60
+
61
+ ## 4. 响应结构
62
+
63
+ ```json
64
+ {
65
+ "output": { "choices": [ { "finish_reason": "stop", "message": {
66
+ "content": [ { "image": "https://dashscope-result-bj...png?Expires=..." },
67
+ { "text": "(prompt_extend=false 时为原提示词;true 时为改写后提示词)" } ],
68
+ "reasoning_content": "", "role": "assistant" } } ] },
69
+ "usage": { "height": 1440, "image_count": 1, "input_tokens": 0, "output_tokens": 0, "total_tokens": 0, "width": 1120 },
70
+ "request_id": "..."
71
+ }
72
+ ```
73
+
74
+ | 字段 | 说明 |
75
+ |---|---|
76
+ | `output.choices[].message.content[].image` | 生成图像 URL,**PNG**,24 小时有效 |
77
+ | `output.choices[].message.content[].text` | `prompt_extend=false` 时为输入提示词;`true` 时为改写后提示词 |
78
+ | `output.choices[].message.reasoning_content` | 思考过程,**仅 `prompt_extend=true` 时返回** |
79
+ | `usage.width` / `usage.height` | 输出图宽高 |
80
+ | `usage.image_count` | 固定为 1 |
81
+ | `usage.input_tokens` / `output_tokens` / `total_tokens` | `prompt_extend=false` 时固定为 0 |
82
+ | `usage.output_tokens_details.reasoning_tokens` | 仅 `prompt_extend=true` 时返回 |
83
+
84
+ **失败**:返回 `request_id`、`code`、`message`,例如 `{"code":"InvalidParameter","message":"num_images_per_prompt must be 1"}`。内容审核不通过会报 `IPInfringementSuspect` 或 `DataInspectionFailed`。
85
+
86
+ ## 5. 价格(官方,人民币)
87
+
88
+ 来源:[百炼模型价格](https://help.aliyun.com/zh/model-studio/model-pricing)(2026-08-22 读取)。
89
+
90
+ **华北 2(北京)**
91
+
92
+ | 模型 | 单价 | 免费额度 |
93
+ |---|---|---|
94
+ | `z-image-turbo` | `prompt_extend=false`:**0.1 元/张**<br>`prompt_extend=true`:**0.2 元/张** | 100 张 |
95
+
96
+ **新加坡(国际)**
97
+
98
+ | 模型 | 单价 |
99
+ |---|---|
100
+ | `z-image-turbo` | `false`:0.110089 元/张;`true`:0.220177 元/张 |
101
+
102
+ 按**成功生成的图像张数**计费;调用失败或处理错误不产生费用,也不消耗免费额度。免费额度有效期为开通百炼 / 模型发布 / 申请通过之日起 90 天内(以较晚者为准)。
103
+
104
+ ## 6. 适配要点
105
+
106
+ - 本项目默认**绝对不显示**:`seed`、负面提示词。官方有 `seed`(不下发),无负面提示词字段。
107
+ - `prompt_extend` **直接翻倍计费**,若要暴露给用户必须在 UI 上说明,或固定为 `false`。
108
+ - `size` 分隔符是 `*` 不是 `x`。
109
+ - 固定出 1 张,UI 不要出现数量选择。
110
+ - 输出固定 PNG,无 `output_format`。
111
+ - 提示词硬上限 800 字符且**超出静默截断**,前端应做长度提示。
112
+ - 官方仅文生图,本模型如果要在项目里支持图生图,只能走 Fal 的 `image-to-image` 端点。
113
+
114
+ ## 7. 原始链接索引
115
+
116
+ | 信息 | 链接 | 是否需登录 |
117
+ |---|---|---|
118
+ | Z-Image API 参考(参数、响应、限制、计费) | https://help.aliyun.com/zh/model-studio/z-image-api-reference | 否 |
119
+ | 用户清单给出的控制台入口(同内容) | https://bailian.console.aliyun.com/cn-beijing?tab=api#/api/?type=model&url=3002354 | **是**(控制台);公开页见上一行 |
120
+ | 模型价格 | https://help.aliyun.com/zh/model-studio/model-pricing | 否 |
121
+ | 各地域支持的模型列表 | https://help.aliyun.com/zh/model-studio/models | 否 |
122
+ | API Key 获取 | https://bailian.console.aliyun.com/?apiKey=1#/api-key | **是** |