00:00 / 00:00
![import requests, base64
# 使用局部特写背景(雨滴特写)
with open("rain_closeup.jpg", "rb") as f:
img = base64.b64encode(f.read()).decode()
# 简化但强化核心雨滴效果
config = {
"focus": "raindrop_macro", # 雨滴微距模式
"drops": [
{"color": "#FF0055", "size": 1.8, "refraction": 1.2}, # 强化红光折射
{"color": "#FFAA00", "size": 1.6, "refraction": 1.1},
{"color": "#FFFF33", "size": 1.4, "refraction": 1.0},
{"color": "#00FF77", "size": 1.2, "refraction": 0.9},
{"color": "#0088FF", "size": 1.0, "refraction": 0.8},
{"color": "#8800FF", "size": 0.8, "refraction": 0.7},
{"color": "#FF00FF", "size": 0.6, "refraction": 0.6}
],
"speed": 18.0,
"density": 0.7 # 高密度雨幕
}
r = requests.post(
"https://api.minimax.chat/v1/image_to_video",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"model": "i2v-01-basic",
"image": img,
"prompt": "4K雨滴微距特写:七彩水晶雨滴慢动作飞溅",
"effects": config,
"res": "1920x1080", # 降低分辨率
"dur": 6, # 缩短时长
"fps": 60, # 标准帧率
"close_up": True # 启用特写模式
}
)
print("视频URL:", r.json()['video_url']) by Hailuo AI Video Generator](https://cdn.hailuoai.com/prod/2025-06-09-10/video_cover/1749437819013581717-cover_265c5472a2f8ea433917bfc7b3dd93f1.jpeg?x-oss-process=image/resize,w_540/format,webp)

创意描述
复制
import requests, base64
# 使用局部特写背景(雨滴特写)
with open("rain_closeup.jpg", "rb") as f:
img = base64.b64encode(f.read()).decode()
# 简化但强化核心雨滴效果
config = {
"focus": "raindrop_macro", # 雨滴微距模式
"drops": [
{"color": "#FF0055", "size": 1.8, "refraction": 1.2}, # 强化红光折射
{"color": "#FFAA00", "size": 1.6, "refraction": 1.1},
{"color": "#FFFF33", "size": 1.4, "refraction": 1.0},
{"color": "#00FF77", "size": 1.2, "refraction": 0.9},
{"color": "#0088FF", "size": 1.0, "refraction": 0.8},
{"color": "#8800FF", "size": 0.8, "refraction": 0.7},
{"color": "#FF00FF", "size": 0.6, "refraction": 0.6}
],
"speed": 18.0,
"density": 0.7 # 高密度雨幕
}
r = requests.post(
"https://api.minimax.chat/v1/image_to_video",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"model": "i2v-01-basic",
"image": img,
"prompt": "4K雨滴微距特写:七彩水晶雨滴慢动作飞溅",
"effects": config,
"res": "1920x1080", # 降低分辨率
"dur": 6, # 缩短时长
"fps": 60, # 标准帧率
"close_up": True # 启用特写模式
}
)
print("视频URL:", r.json()['video_url'])
Hailuo 01-Director
提示词优化
720p
内容由AI生成