00:00 / 00:00
import requests
import json

url = "https://api.minimax.chat/v1/video_generation"
api_key="请填写您的api_key"
your_file_path = ""  # 在此填写图片文件路径

#base64编码形式输入
with open(your_file_path, "rb") as image_file:
    data = base64.b64encode(image_file.read()).decode('utf-8')

payload = json.dumps({
  "model": "I2V-01-Director", 
  "prompt": "男子拿起一本书[上升],然后阅读[固定]。",
  "first_frame_image": f"data:image/jpeg;base64,{data}"
})
headers = {
  'authorization': f'Bearer {api_key}',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text) by Hailuo AI Video Generator
AI梦姬 by Hailuo AI Video GeneratorAI梦姬
创意描述
复制

import requests import json url = "https://api.minimax.chat/v1/video_generation" api_key="请填写您的api_key" your_file_path = "" # 在此填写图片文件路径 #base64编码形式输入 with open(your_file_path, "rb") as image_file: data = base64.b64encode(image_file.read()).decode('utf-8') payload = json.dumps({ "model": "I2V-01-Director", "prompt": "男子拿起一本书[上升],然后阅读[固定]。", "first_frame_image": f"data:image/jpeg;base64,{data}" }) headers = { 'authorization': f'Bearer {api_key}', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)

Hailuo 01-Director
提示词优化
720p
内容由AI生成