@@ -123,6 +123,65 @@ const [output] = await replicate.run(model, { input });
123123> upload the file to your own storage provider
124124> and pass a publicly accessible URL.
125125
126+ #### Tencent Hunyuan Image 3
127+
128+ ``` js
129+ import { writeFile } from " node:fs/promises" ;
130+ import Replicate from " replicate" ;
131+
132+ const replicate = new Replicate ();
133+ const input = {
134+ prompt:
135+ " An illustration of a pink and brown butterfly on a pink background, with the black text Hunyuan Image 3 on Replicate below." ,
136+ };
137+
138+ const output = await replicate .run (" tencent/hunyuan-image-3" , { input });
139+ await writeFile (" hunyuan-image-3.png" , output[0 ]);
140+ ```
141+
142+ #### Tencent Hunyuan Video
143+
144+ ``` js
145+ import { writeFile } from " node:fs/promises" ;
146+ import Replicate from " replicate" ;
147+
148+ const replicate = new Replicate ();
149+ const input = {
150+ prompt: " A cat walks on the grass, realistic style." ,
151+ width: 854 ,
152+ height: 480 ,
153+ video_length: 129 ,
154+ infer_steps: 50 ,
155+ seed: 42 ,
156+ };
157+
158+ const output = await replicate .run (" tencent/hunyuan-video" , { input });
159+ await writeFile (" hunyuan-video.mp4" , output);
160+ ```
161+
162+ #### Tencent Hunyuan3D-2mv
163+
164+ ``` js
165+ import { readFile , writeFile } from " node:fs/promises" ;
166+ import Replicate from " replicate" ;
167+
168+ const replicate = new Replicate ();
169+ const input = {
170+ front_image: await readFile (" ./front.png" ),
171+ // Optional additional views for better reconstruction:
172+ // back_image: await readFile("./back.png"),
173+ // left_image: await readFile("./left.png"),
174+ // right_image: await readFile("./right.png"),
175+ file_type: " glb" ,
176+ steps: 30 ,
177+ guidance_scale: 5 ,
178+ target_face_num: 10000 ,
179+ };
180+
181+ const output = await replicate .run (" tencent/hunyuan3d-2mv" , { input });
182+ await writeFile (" hunyuan3d-2mv.glb" , output);
183+ ```
184+
126185## TypeScript usage
127186
128187This library exports TypeScript definitions. You can import them like this:
0 commit comments