Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/bu-bu-xxx_video-chain.json
T

1 line
2.9 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"repo": "bu-bu-xxx/video-chain", "files": {"GOAL.md": {"5afa85a1f88de9a6116bdcb02807a77a199751dd": {"t": 1785768965.1595068, "n": 2281, "h": "acf08b0fe651964d", "c": "我想实现一个workflow:\n用户输入图片和文字描述需求,根据用户需求生成每个视频片段的文字prompt,通过sora2 api输入文字prompt,并且输入上一个视频的最后帧画面作为图片prompt输入,进行每个视频片段的生成,以确保视频的coherent,最后拼接成一个长视频输出\n\ndevelopment requriement:\n1. 我们会使用`aihubmix`提供的sora2模型和gemini-3-pro-preview模型的api实现workflow\n \n2. 所有提示词用中文\n \n3. `aihubmix` `sora2` 模型调用方式Example:\n\nGenerate With a Reference Image:\n```python\nimport requests\n\nurl = \"https://aihubmix.com/v1/videos\"\n\nheaders = {\n \"Authorization\": \"Bearer sk-***\"\n}\n\n\n# Prepare the multipart/form-data payload\nfiles = {\n \"prompt\": (None, \"The kitten is taking a nap under the tree.\"),\n \"model\": (None, \"sora-2-pro\"),\n \"size\": (None, \"1280x720\"),\n \"seconds\": (None, \"4\"),\n\n \"input_reference\": (\n \"cat.jpeg\",\n open(\"cat.jpeg\", \"rb\"),\n \"image/jpeg\"\n )\n}\n\nresponse = requests.post(url, headers=headers, files=files)\n\nprint(\"Status:\", response.status_code)\nprint(\"Response:\", response.text)\n```\n\nGenerate Without a Reference Image:\n```python\nimport requests\nimport json\n\nurl = \"https://aihubmix.com/v1/videos\"\nheaders = {\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"Bearer sk-***\"\n}\n\npayload = {\n \"model\": \"sora-2\",\n \"prompt\": \"A astronaut floating in space, holding a glowing plant, with Earth and stars in the background, slow-motion movement\",\n \"size\": \"720x1280\",\n \"seconds\": '4',\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\n\nprint(\"Status Code:\", response.status_code)\nprint(\"Response:\", response.text)\n```\n\n\n4. `aihubmix` `gemini-3-pro-preview` 模型调用方式Example:\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=\"AIHUBMIX_API_KEY\", # Your Key \"sk-***\"\n base_url=\"https://aihubmix.com/v1\"\n)\n\nresponse = client.responses.create(\n model=\"gemini-3-pro-preview\", \n input=[\n {\n \"role\": \"user\",\n \"content\": [\n { \"type\": \"input_text\", \"text\": \"what is in this image?\" },\n {\n \"type\": \"input_image\",\n \"image_url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"\n }\n ]\n }\n ]\n)\n\nprint(response)\n```\n\n4. 先开发一个command line方式运行这个workflow,然后开发一个web界面可以运行以及展示\n"}}}}