typetext
{
"border_start": 0.2,
"border_width": 0.2,
"fps": 30,
"inpaint_model": "ideogram",
"num_frames": 80,
"output_format": "mp4",
"prompt": "cats sitting on clouds"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_asy**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run andreasjansson/fractal using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
border_start: 0.2,
border_width: 0.2,
fps: 30,
inpaint_model: "ideogram",
num_frames: 80,
output_format: "mp4",
prompt: "cats sitting on clouds"
};
const output = await replicate.run("andreasjansson/fractal", { input });
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_asy**********************************
This is your API token. Keep it to yourself.
import replicate
Run andreasjansson/fractal using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"andreasjansson/fractal",
input={
"border_start": 0.2,
"border_width": 0.2,
"fps": 30,
"inpaint_model": "ideogram",
"num_frames": 80,
"output_format": "mp4",
"prompt": "cats sitting on clouds"
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_asy**********************************
This is your API token. Keep it to yourself.
Run andreasjansson/fractal using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"input": {
"border_start": 0.2,
"border_width": 0.2,
"fps": 30,
"inpaint_model": "ideogram",
"num_frames": 80,
"output_format": "mp4",
"prompt": "cats sitting on clouds"
}
}' \
https://api.replicate.com/v1/models/andreasjansson/fractal/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "ab80ffp8zxrma0crmbybp652fg",
"model": "andreasjansson/fractal",
"version": "hidden",
"input": {
"border_start": 0.2,
"border_width": 0.2,
"fps": 30,
"inpaint_model": "ideogram",
"num_frames": 80,
"output_format": "mp4",
"prompt": "cats sitting on clouds"
},
"logs": "Using seed: 451456841\nCreating frame 1/80\nCreating frame 2/80\nCreating frame 3/80\nCreating frame 4/80\nCreating frame 5/80\nCreating frame 6/80\nCreating frame 7/80\nCreating frame 8/80\nCreating frame 9/80\nCreating frame 10/80\nCreating frame 11/80\nCreating frame 12/80\nCreating frame 13/80\nCreating frame 14/80\nCreating frame 15/80\nCreating frame 16/80\nCreating frame 17/80\nCreating frame 18/80\nCreating frame 19/80\nCreating frame 20/80\nCreating frame 21/80\nCreating frame 22/80\nCreating frame 23/80\nCreating frame 24/80\nCreating frame 25/80\nCreating frame 26/80\nCreating frame 27/80\nCreating frame 28/80\nCreating frame 29/80\nCreating frame 30/80\nCreating frame 31/80\nCreating frame 32/80\nCreating frame 33/80\nCreating frame 34/80\nCreating frame 35/80\nCreating frame 36/80\nCreating frame 37/80\nCreating frame 38/80\nCreating frame 39/80\nCreating frame 40/80\nCreating frame 41/80\nCreating frame 42/80\nCreating frame 43/80\nCreating frame 44/80\nCreating frame 45/80\nCreating frame 46/80\nCreating frame 47/80\nCreating frame 48/80\nCreating frame 49/80\nCreating frame 50/80\nCreating frame 51/80\nCreating frame 52/80\nCreating frame 53/80\nCreating frame 54/80\nCreating frame 55/80\nCreating frame 56/80\nCreating frame 57/80\nCreating frame 58/80\nCreating frame 59/80\nCreating frame 60/80\nCreating frame 61/80\nCreating frame 62/80\nCreating frame 63/80\nCreating frame 64/80\nCreating frame 65/80\nCreating frame 66/80\nCreating frame 67/80\nCreating frame 68/80\nCreating frame 69/80\nCreating frame 70/80\nCreating frame 71/80\nCreating frame 72/80\nCreating frame 73/80\nCreating frame 74/80\nCreating frame 75/80\nCreating frame 76/80\nCreating frame 77/80\nCreating frame 78/80\nCreating frame 79/80\nCreating frame 80/80\nffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers\n built with gcc 13.2.1 (Alpine 13.2.1_git20240309) 20240309\n configuration: --pkg-config-flags=--static --extra-cflags=-fopenmp --extra-ldflags='-fopenmp -Wl,--allow-multiple-definition -Wl,-z,stack-size=2097152' --toolchain=hardened --disable-debug --disable-shared --disable-ffplay --enable-static --enable-gpl --enable-version3 --enable-fontconfig --enable-gray --enable-iconv --enable-lcms2 --enable-libaom --enable-libaribb24 --enable-libass --enable-libbluray --enable-libdav1d --enable-libdavs2 --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libjxl --enable-libkvazaar --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librabbitmq --enable-librav1e --enable-librsvg --enable-librtmp --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxevd --enable-libxeve --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-openssl\n libavutil 59. 39.100 / 59. 39.100\n libavcodec 61. 19.101 / 61. 19.101\n libavformat 61. 7.100 / 61. 7.100\n libavdevice 61. 3.100 / 61. 3.100\n libavfilter 10. 4.100 / 10. 4.100\n libswscale 8. 3.100 / 8. 3.100\n libswresample 5. 3.100 / 5. 3.100\n libpostproc 58. 3.100 / 58. 3.100\nInput #0, image2, from '/tmp/cog-runner-tmp-310002985/tmpscwvvrg5/frame_%06d.png':\n Duration: 00:00:03.20, start: 0.000000, bitrate: N/A\n Stream #0:0: Video: png, rgb24(pc, gbr/unknown/unknown), 1024x1024, 25 fps, 25 tbr, 25 tbn\nStream mapping:\n Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))\nPress [q] to stop, [?] for help\n[libx264 @ 0x7a4671e81840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512\n[libx264 @ 0x7a4671e81840] profile High, level 3.2, 4:2:0, 8-bit\n[libx264 @ 0x7a4671e81840] 264 - core 164 r3108 31e19f9 - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00\nOutput #0, mp4, to 'output.mp4':\n Metadata:\n encoder : Lavf61.7.100\n Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, progressive), 1024x1024, q=2-31, 30 fps, 15360 tbn\n Metadata:\n encoder : Lavc61.19.101 libx264\n Side data:\n cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A\nframe= 0 fps=0.0 q=0.0 size= 0KiB time=N/A bitrate=N/A speed=N/A \rframe= 0 fps=0.0 q=0.0 size= 0KiB time=N/A bitrate=N/A speed=N/A \rframe= 0 fps=0.0 q=0.0 size= 0KiB time=N/A bitrate=N/A speed=N/A \rframe= 0 fps=0.0 q=0.0 size= 0KiB time=N/A bitrate=N/A speed=N/A \rframe= 4 fps=1.6 q=29.0 size= 0KiB time=00:00:00.06 bitrate= 5.8kbits/s speed=0.0266x \rframe= 9 fps=3.0 q=29.0 size= 0KiB time=00:00:00.23 bitrate= 1.6kbits/s speed=0.0777x \rframe= 14 fps=4.0 q=29.0 size= 0KiB time=00:00:00.40 bitrate= 1.0kbits/s speed=0.114x \rframe= 19 fps=4.7 q=29.0 size= 0KiB time=00:00:00.56 bitrate= 0.7kbits/s speed=0.142x \rframe= 25 fps=5.6 q=29.0 size= 0KiB time=00:00:00.76 bitrate= 0.5kbits/s speed=0.17x \rframe= 31 fps=6.2 q=29.0 size= 256KiB time=00:00:00.96 bitrate=2169.9kbits/s speed=0.193x \rframe= 37 fps=6.7 q=29.0 size= 256KiB time=00:00:01.16 bitrate=1797.9kbits/s speed=0.212x \rframe= 45 fps=7.5 q=29.0 size= 256KiB time=00:00:01.43 bitrate=1463.4kbits/s speed=0.239x \rframe= 52 fps=8.0 q=29.0 size= 256KiB time=00:00:01.66 bitrate=1258.5kbits/s speed=0.256x \rframe= 61 fps=8.7 q=29.0 size= 256KiB time=00:00:01.96 bitrate=1066.5kbits/s speed=0.281x \rframe= 69 fps=9.2 q=29.0 size= 512KiB time=00:00:02.23 bitrate=1878.2kbits/s speed=0.298x \rframe= 77 fps=9.6 q=29.0 size= 512KiB time=00:00:02.50 bitrate=1677.9kbits/s speed=0.312x \r[out#0/mp4 @ 0x7a4671e8a580] video:578KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.306025%\nframe= 80 fps=9.9 q=29.0 Lsize= 580KiB time=00:00:02.60 bitrate=1826.4kbits/s speed=0.32x \n[libx264 @ 0x7a4671e81840] frame I:1 Avg QP:22.03 size: 64803\n[libx264 @ 0x7a4671e81840] frame P:21 Avg QP:22.88 size: 16400\n[libx264 @ 0x7a4671e81840] frame B:58 Avg QP:26.54 size: 3136\n[libx264 @ 0x7a4671e81840] consecutive B-frames: 1.2% 5.0% 3.8% 90.0%\n[libx264 @ 0x7a4671e81840] mb I I16..4: 20.2% 68.2% 11.5%\n[libx264 @ 0x7a4671e81840] mb P I16..4: 0.7% 0.3% 0.0% P16..4: 49.0% 21.3% 16.6% 0.0% 0.0% skip:12.2%\n[libx264 @ 0x7a4671e81840] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 50.7% 1.5% 0.1% direct: 0.0% skip:47.7% L0:60.2% L1:36.1% BI: 3.8%\n[libx264 @ 0x7a4671e81840] 8x8 transform intra:61.7% inter:81.2%\n[libx264 @ 0x7a4671e81840] coded y,uvDC,uvAC intra: 56.6% 74.0% 26.4% inter: 7.9% 6.1% 0.1%\n[libx264 @ 0x7a4671e81840] i16 v,h,dc,p: 7% 32% 6% 55%\n[libx264 @ 0x7a4671e81840] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 26% 15% 6% 7% 6% 10% 7% 9%\n[libx264 @ 0x7a4671e81840] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 19% 9% 8% 12% 9% 12% 8% 8%\n[libx264 @ 0x7a4671e81840] i8c dc,h,v,p: 48% 25% 16% 11%\n[libx264 @ 0x7a4671e81840] Weighted P-Frames: Y:0.0% UV:0.0%\n[libx264 @ 0x7a4671e81840] ref P L0: 85.8% 10.8% 3.0% 0.4%\n[libx264 @ 0x7a4671e81840] ref B L0: 99.3% 0.6% 0.0%\n[libx264 @ 0x7a4671e81840] ref B L1: 99.8% 0.2%\n[libx264 @ 0x7a4671e81840] kb/s:1773.28",
"output": "https://replicate.delivery/xezq/0AMMU7d9V6KQJhZlJl3JvgL0HOvbFOzQ1CXOeWP6UrsfvhKVA/output.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-13T10:32:12.287Z",
"started_at": "2025-08-13T10:32:12.659551Z",
"completed_at": "2025-08-13T10:33:35.435821Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ab80ffp8zxrma0crmbybp652fg/cancel",
"children": "https://api.replicate.com/v1/predictions/ab80ffp8zxrma0crmbybp652fg/children",
"get": "https://api.replicate.com/v1/predictions/ab80ffp8zxrma0crmbybp652fg",
"root": "https://api.replicate.com/v1/predictions/ab80ffp8zxrma0crmbybp652fg",
"stream": "https://stream.replicate.com/v1/files/bcwr-yv4s7v6in7xsywpduhp5xz3hv2vb7facrpievawrphvavz6necba",
"web": "https://replicate.com/p/ab80ffp8zxrma0crmbybp652fg"
},
"metrics": {
"predict_time": 82.776270639,
"total_time": 83.148821
}
}