flux-kontext-apps / portrait-series
Create a series of portrait photos from a single image
- Public
- 27.4K runs
-
Commercial use
Prediction
flux-kontext-apps/portrait-seriesOfficial modelID82starwxxhrme0cq2cnr8qr468StatusSucceededSourceWebTotal durationCreatedInput
{ "background": "black", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5DZJkCEuP5rWGtu8XcfyZj9sXzm4W3OXOSfdJnj9NmlirP2/mona-lisa.png", "randomize_images": true }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run flux-kontext-apps/portrait-series using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { background: "black", num_images: 13, input_image: "https://replicate.delivery/pbxt/N5DZJkCEuP5rWGtu8XcfyZj9sXzm4W3OXOSfdJnj9NmlirP2/mona-lisa.png", randomize_images: true }; const output = await replicate.run("flux-kontext-apps/portrait-series", { input }); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run flux-kontext-apps/portrait-series using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "flux-kontext-apps/portrait-series", input={ "background": "black", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5DZJkCEuP5rWGtu8XcfyZj9sXzm4W3OXOSfdJnj9NmlirP2/mona-lisa.png", "randomize_images": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run flux-kontext-apps/portrait-series 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": { "background": "black", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5DZJkCEuP5rWGtu8XcfyZj9sXzm4W3OXOSfdJnj9NmlirP2/mona-lisa.png", "randomize_images": true } }' \ https://api.replicate.com/v1/models/flux-kontext-apps/portrait-series/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-05-27T19:15:23.669765Z", "created_at": "2025-05-27T19:15:15.052000Z", "data_removed": false, "error": null, "id": "82starwxxhrme0cq2cnr8qr468", "input": { "background": "black", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5DZJkCEuP5rWGtu8XcfyZj9sXzm4W3OXOSfdJnj9NmlirP2/mona-lisa.png", "randomize_images": true }, "logs": "Using seed: 253475353\nUsing seed: 189852403\nUsing seed: 644349696\nUsing seed: 1178211808\nUsing seed: 2069810435\nUsing seed: 541202083\nUsing seed: 81938328\nUsing seed: 1455250047\nUsing seed: 424774928\nUsing seed: 585032549\nUsing seed: 1293469216\nUsing seed: 574300998\nUsing seed: 69327141\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerated image in 5.1sec\nGenerated image in 5.1sec\nGenerated image in 5.2sec\nDownloading 1269457 bytes\nGenerated image in 5.3sec\nGenerated image in 5.6sec\nDownloading 1240442 bytes\nDownloaded 1.21MB in 0.61sec\nDownloading 1169956 bytes\nDownloading 699324 bytes\nDownloading 1183418 bytes\nGenerated image in 6.5sec\nDownloaded 1.18MB in 1.37sec\nDownloaded 1.12MB in 1.17sec\nDownloading 1322830 bytes\nDownloaded 0.67MB in 1.12sec\nGenerated image in 6.7sec\nDownloaded 1.26MB in 0.30sec\nDownloading 834590 bytes\nGenerated image in 6.9sec\nDownloaded 0.80MB in 0.22sec\nDownloading 1048971 bytes\nGenerated image in 7.1sec\nDownloaded 1.00MB in 0.22sec\nDownloading 1181332 bytes\nDownloaded 1.13MB in 2.29sec\nGenerated image in 7.4sec\nGenerated image in 7.4sec\nDownloaded 1.13MB in 0.32sec\nGenerated image in 7.5sec\nDownloading 970555 bytes\nDownloaded 0.93MB in 0.12sec\nGenerated image in 7.6sec\nDownloading 1184800 bytes\nDownloading 1241563 bytes\nDownloading 1061427 bytes\nDownloaded 1.18MB in 0.12sec\nDownloaded 1.13MB in 0.22sec\nDownloaded 1.01MB in 0.58sec", "metrics": { "image_count": 13, "predict_time": 8.607819619, "total_time": 8.617765 }, "output": [ "https://replicate.delivery/xezq/aEGdLCUksRb6MxNwEq8If0pabporqCRjRalIpaf6QVrLF8wUA/tmp27lath6p.png", "https://replicate.delivery/xezq/SxqFUe728fuezoIFEcFHWYf7Zb43KN4Xsovv23QKzvXtUwDTB/tmpyigycvvl.png", "https://replicate.delivery/xezq/Q7XDAToouAKONBbTdGFmsLO0Dw6ygxFEwcvELeeKTAQLF8wUA/tmp6kma458r.png", "https://replicate.delivery/xezq/mpTzflspDLWdKSCC1cgW3nSI9z0ELncXA82nBQiXXZ5lCewUA/tmpwc_lidms.png", "https://replicate.delivery/xezq/eRVfn90CgAmdg0a6LpgPw5bYx4Cpf8eJFXj8OFdPcHRuUwDTB/tmptczdxx21.png", "https://replicate.delivery/xezq/JpDGO2IS2o7iEtbK2dO40rRpwEF4RBKqkd0tEe1ba12lCewUA/tmpfba7q94s.png", "https://replicate.delivery/xezq/tQsTiPHwIE4QLdx9dogFSJOeCcfRA2peHy1bJH97vHmWK4hpA/tmpr8w2yjyv.png", "https://replicate.delivery/xezq/qGCoegH9wsWeHEXmxtkINYYy4daxfzS8xJBzK0CNhfhuUwDTB/tmp8o8oxiyv.png", "https://replicate.delivery/xezq/PgrfRskOg6SqZ61S41RilKL5omnTpgCzNdcBSfxfoI4XK4hpA/tmpeoi83otz.png", "https://replicate.delivery/xezq/8QenrvxKACWFQifMiYQgATSvlssqTQde5ZjIwQXILGcXK4hpA/tmpoyg7u7af.png", "https://replicate.delivery/xezq/YdMOoi3wNrbHBFEdWdChqOfrireyZ1JaKgm8eXIfCsdvUwDTB/tmpv4q7w7yv.png", "https://replicate.delivery/xezq/xNkOXVm4eVWwcioeREq09gTqw6lDvCrTNbGHv6BTwNtLF8wUA/tmpts2s2qwu.png", "https://replicate.delivery/xezq/1neVe5dl2VjcE0dzA0LaGnX3QsPkaNmH9WBhUARf00CWK4hpA/tmpjn_j9alz.png" ], "started_at": "2025-05-27T19:15:15.061945Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-hfwwqxaqjd6ma6iu3wlc365dffw4nqgackhmkiznnlsyswjl4pra", "get": "https://api.replicate.com/v1/predictions/82starwxxhrme0cq2cnr8qr468", "cancel": "https://api.replicate.com/v1/predictions/82starwxxhrme0cq2cnr8qr468/cancel" }, "version": "hidden" }
Generated inUsing seed: 253475353 Using seed: 189852403 Using seed: 644349696 Using seed: 1178211808 Using seed: 2069810435 Using seed: 541202083 Using seed: 81938328 Using seed: 1455250047 Using seed: 424774928 Using seed: 585032549 Using seed: 1293469216 Using seed: 574300998 Using seed: 69327141 Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generated image in 5.1sec Generated image in 5.1sec Generated image in 5.2sec Downloading 1269457 bytes Generated image in 5.3sec Generated image in 5.6sec Downloading 1240442 bytes Downloaded 1.21MB in 0.61sec Downloading 1169956 bytes Downloading 699324 bytes Downloading 1183418 bytes Generated image in 6.5sec Downloaded 1.18MB in 1.37sec Downloaded 1.12MB in 1.17sec Downloading 1322830 bytes Downloaded 0.67MB in 1.12sec Generated image in 6.7sec Downloaded 1.26MB in 0.30sec Downloading 834590 bytes Generated image in 6.9sec Downloaded 0.80MB in 0.22sec Downloading 1048971 bytes Generated image in 7.1sec Downloaded 1.00MB in 0.22sec Downloading 1181332 bytes Downloaded 1.13MB in 2.29sec Generated image in 7.4sec Generated image in 7.4sec Downloaded 1.13MB in 0.32sec Generated image in 7.5sec Downloading 970555 bytes Downloaded 0.93MB in 0.12sec Generated image in 7.6sec Downloading 1184800 bytes Downloading 1241563 bytes Downloading 1061427 bytes Downloaded 1.18MB in 0.12sec Downloaded 1.13MB in 0.22sec Downloaded 1.01MB in 0.58sec
Prediction
flux-kontext-apps/portrait-seriesOfficial modelIDec40ags8x9rm80cq2cpsrb0z9gStatusSucceededSourceWebTotal durationCreatedInput
{ "background": "white", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5Dav8Ccnd1nwStoIO0cyrbnnbJxBbn3ONHvO4NAexRFE3fX/0_3-1.webp", "randomize_images": true }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run flux-kontext-apps/portrait-series using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { background: "white", num_images: 13, input_image: "https://replicate.delivery/pbxt/N5Dav8Ccnd1nwStoIO0cyrbnnbJxBbn3ONHvO4NAexRFE3fX/0_3-1.webp", randomize_images: true }; const output = await replicate.run("flux-kontext-apps/portrait-series", { input }); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run flux-kontext-apps/portrait-series using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "flux-kontext-apps/portrait-series", input={ "background": "white", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5Dav8Ccnd1nwStoIO0cyrbnnbJxBbn3ONHvO4NAexRFE3fX/0_3-1.webp", "randomize_images": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run flux-kontext-apps/portrait-series 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": { "background": "white", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5Dav8Ccnd1nwStoIO0cyrbnnbJxBbn3ONHvO4NAexRFE3fX/0_3-1.webp", "randomize_images": true } }' \ https://api.replicate.com/v1/models/flux-kontext-apps/portrait-series/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-05-27T19:17:04.823034Z", "created_at": "2025-05-27T19:16:56.170000Z", "data_removed": false, "error": null, "id": "ec40ags8x9rm80cq2cpsrb0z9g", "input": { "background": "white", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5Dav8Ccnd1nwStoIO0cyrbnnbJxBbn3ONHvO4NAexRFE3fX/0_3-1.webp", "randomize_images": true }, "logs": "Using seed: 224196546\nUsing seed: 490767444\nUsing seed: 181920271\nUsing seed: 1283861047\nUsing seed: 1849070315\nUsing seed: 10733986\nUsing seed: 711330492\nUsing seed: 581133017\nUsing seed: 1783861194\nUsing seed: 1895824585\nUsing seed: 616960513\nUsing seed: 948991648\nUsing seed: 2072206190\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerated image in 5.4sec\nGenerated image in 5.5sec\nGenerated image in 5.8sec\nGenerated image in 5.7sec\nDownloading 1484382 bytes\nDownloading 1607518 bytes\nDownloading 1681879 bytes\nDownloading 1580351 bytes\nGenerated image in 6.5sec\nDownloaded 1.53MB in 1.17sec\nDownloaded 1.42MB in 1.28sec\nGenerated image in 6.7sec\nDownloading 1585159 bytes\nDownloading 1486290 bytes\nDownloaded 1.51MB in 0.33sec\nDownloaded 1.60MB in 1.37sec\nDownloaded 1.51MB in 1.47sec\nGenerated image in 7.2sec\nGenerated image in 7.4sec\nDownloading 1625428 bytes\nGenerated image in 7.4sec\nDownloading 1412147 bytes\nDownloaded 1.55MB in 0.23sec\nGenerated image in 7.4sec\nDownloading 1508618 bytes\nDownloaded 1.35MB in 0.21sec\nDownloading 1591541 bytes\nGenerated image in 7.7sec\nGenerated image in 7.6sec\nDownloaded 1.44MB in 0.35sec\nDownloaded 1.52MB in 0.22sec\nDownloading 1621454 bytes\nGenerated image in 7.8sec\nDownloading 1720305 bytes\nDownloaded 1.55MB in 0.21sec\nDownloaded 1.42MB in 1.39sec\nDownloading 1794245 bytes\nDownloaded 1.64MB in 0.32sec\nDownloaded 1.71MB in 0.22sec", "metrics": { "image_count": 13, "predict_time": 8.6440989, "total_time": 8.653034 }, "output": [ "https://replicate.delivery/xezq/9HtJKfbYh62gLi8JbFq1PeygEdtyBnw5InD0YbcCq2EwG8wUA/tmpjvaan63b.png", "https://replicate.delivery/xezq/3rrWysCeCDQ3X6ctJDeJVgDrbJQupGCyIlLkuNF1jBWwG8wUA/tmpddjrf52z.png", "https://replicate.delivery/xezq/MBqVRj0rHl5fOChRpI6Z8fh9mKhqrT789KkUdAhsHzjwG8wUA/tmp46buc_kh.png", "https://replicate.delivery/xezq/M7ucrTJgZ67pClzQTZUemhdGIW6pcHLqTAmQcV6lxuJYDewUA/tmp64s8p8tx.png", "https://replicate.delivery/xezq/M2PQS3pgWI7HGVNksI2MvERS7di4d7ENk0jvuFTMtKCsBPMF/tmpuj8r3ive.png", "https://replicate.delivery/xezq/FqN5mtokmxouPNnKlvzENRNcWQCXh19ioiFtY0jUckLsBPMF/tmp5danfm4q.png", "https://replicate.delivery/xezq/caAR4XFMQezoOqUwJeufa2jOEoyTSSJlnsuHrPJcA8mhN4hpA/tmpu_0a1hnd.png", "https://replicate.delivery/xezq/62iaPMIIYkJFO9qCFhPsCH1DwpfUR4WkO6qR3NvG0IUYDewUA/tmpezjh67xf.png", "https://replicate.delivery/xezq/5ffkhYHGHnu9F0Z6LBeYMlgG98Pf9WkHzJVSjpNVPegF2gHmC/tmp2ofi67mc.png", "https://replicate.delivery/xezq/nntP9W2Vz64vBpUnqherhe3htXwA4KIr7PPDHDGM3mywG8wUA/tmp3dv23nag.png", "https://replicate.delivery/xezq/uFvvrfNgEuT1SKGHeo8gm1OwTBgfMr95rjAXYlxeYBoCbwDTB/tmp51e9gd1q.png", "https://replicate.delivery/xezq/8K0fzL4SZ213M6r2pqUeq0FpuAr9JiMRY0i6dKhc1cSwG8wUA/tmpsrfp9q2s.png", "https://replicate.delivery/xezq/QIb8sX0CFcJsPBB5LNOaOdBwcHJVNKJ7EkTsCzzIisIsBPMF/tmpit_zzldr.png" ], "started_at": "2025-05-27T19:16:56.178935Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-dhuce2kc3faunl73ot2htspbg33mbtdkwm3hltaet5edksohre4a", "get": "https://api.replicate.com/v1/predictions/ec40ags8x9rm80cq2cpsrb0z9g", "cancel": "https://api.replicate.com/v1/predictions/ec40ags8x9rm80cq2cpsrb0z9g/cancel" }, "version": "hidden" }
Generated inUsing seed: 224196546 Using seed: 490767444 Using seed: 181920271 Using seed: 1283861047 Using seed: 1849070315 Using seed: 10733986 Using seed: 711330492 Using seed: 581133017 Using seed: 1783861194 Using seed: 1895824585 Using seed: 616960513 Using seed: 948991648 Using seed: 2072206190 Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generated image in 5.4sec Generated image in 5.5sec Generated image in 5.8sec Generated image in 5.7sec Downloading 1484382 bytes Downloading 1607518 bytes Downloading 1681879 bytes Downloading 1580351 bytes Generated image in 6.5sec Downloaded 1.53MB in 1.17sec Downloaded 1.42MB in 1.28sec Generated image in 6.7sec Downloading 1585159 bytes Downloading 1486290 bytes Downloaded 1.51MB in 0.33sec Downloaded 1.60MB in 1.37sec Downloaded 1.51MB in 1.47sec Generated image in 7.2sec Generated image in 7.4sec Downloading 1625428 bytes Generated image in 7.4sec Downloading 1412147 bytes Downloaded 1.55MB in 0.23sec Generated image in 7.4sec Downloading 1508618 bytes Downloaded 1.35MB in 0.21sec Downloading 1591541 bytes Generated image in 7.7sec Generated image in 7.6sec Downloaded 1.44MB in 0.35sec Downloaded 1.52MB in 0.22sec Downloading 1621454 bytes Generated image in 7.8sec Downloading 1720305 bytes Downloaded 1.55MB in 0.21sec Downloaded 1.42MB in 1.39sec Downloading 1794245 bytes Downloaded 1.64MB in 0.32sec Downloaded 1.71MB in 0.22sec
Prediction
flux-kontext-apps/portrait-seriesOfficial modelIDe35v2nzrbhrm80cq2cmtp2nsyrStatusSucceededSourceWebTotal durationCreatedInput
{ "background": "black", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5DXcBZiATNE0n0Wu7ghgVh5i7VoNzzfYtyGoNdbKYnZic7L/replicate-prediction-f2d25rg6gnrma0cq257vdw2n4c.png", "randomize_images": true }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run flux-kontext-apps/portrait-series using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { background: "black", num_images: 13, input_image: "https://replicate.delivery/pbxt/N5DXcBZiATNE0n0Wu7ghgVh5i7VoNzzfYtyGoNdbKYnZic7L/replicate-prediction-f2d25rg6gnrma0cq257vdw2n4c.png", randomize_images: true }; const output = await replicate.run("flux-kontext-apps/portrait-series", { input }); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run flux-kontext-apps/portrait-series using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "flux-kontext-apps/portrait-series", input={ "background": "black", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5DXcBZiATNE0n0Wu7ghgVh5i7VoNzzfYtyGoNdbKYnZic7L/replicate-prediction-f2d25rg6gnrma0cq257vdw2n4c.png", "randomize_images": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run flux-kontext-apps/portrait-series 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": { "background": "black", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5DXcBZiATNE0n0Wu7ghgVh5i7VoNzzfYtyGoNdbKYnZic7L/replicate-prediction-f2d25rg6gnrma0cq257vdw2n4c.png", "randomize_images": true } }' \ https://api.replicate.com/v1/models/flux-kontext-apps/portrait-series/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-05-27T19:13:37.821839Z", "created_at": "2025-05-27T19:13:27.132000Z", "data_removed": false, "error": null, "id": "e35v2nzrbhrm80cq2cmtp2nsyr", "input": { "background": "black", "num_images": 13, "input_image": "https://replicate.delivery/pbxt/N5DXcBZiATNE0n0Wu7ghgVh5i7VoNzzfYtyGoNdbKYnZic7L/replicate-prediction-f2d25rg6gnrma0cq257vdw2n4c.png", "randomize_images": true }, "logs": "Using seed: 418123222\nUsing seed: 114580291\nUsing seed: 174960113\nUsing seed: 1660622592\nUsing seed: 718474419\nUsing seed: 551268014\nUsing seed: 1588693419\nUsing seed: 1574924760\nUsing seed: 665427376\nUsing seed: 1339784564\nUsing seed: 1164059653\nUsing seed: 763793531\nUsing seed: 945000035\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerated image in 5.3sec\nGenerated image in 5.4sec\nGenerated image in 5.4sec\nGenerated image in 5.4sec\nDownloading 1136972 bytes\nGenerated image in 6.0sec\nGenerated image in 6.1sec\nDownloading 1143702 bytes\nGenerated image in 6.4sec\nDownloading 1202219 bytes\nDownloaded 1.08MB in 1.19sec\nDownloading 1047529 bytes\nGenerated image in 6.9sec\nDownloading 1215579 bytes\nDownloading 1164288 bytes\nDownloading 1222544 bytes\nDownloaded 1.16MB in 0.32sec\nGenerated image in 7.4sec\nDownloading 1016774 bytes\nGenerated image in 7.5sec\nDownloading 1170616 bytes\nGenerated image in 7.5sec\nGenerated image in 7.5sec\nGenerated image in 7.6sec\nDownloaded 0.97MB in 0.23sec\nDownloaded 1.00MB in 2.41sec\nDownloaded 1.09MB in 2.57sec\nDownloaded 1.15MB in 2.61sec\nDownloaded 1.11MB in 2.26sec\nDownloaded 1.17MB in 2.41sec\nDownloading 1137913 bytes\nDownloading 1188303 bytes\nDownloading 1153930 bytes\nDownloading 997857 bytes\nDownloaded 1.12MB in 2.44sec\nDownloaded 1.09MB in 2.28sec\nDownloaded 1.13MB in 2.43sec\nDownloaded 0.95MB in 2.41sec\nDownloaded 1.10MB in 2.58sec", "metrics": { "image_count": 13, "predict_time": 10.670727686, "total_time": 10.689839 }, "output": [ "https://replicate.delivery/xezq/q4XZRfXey5gelpzjw4hn4vOe5fVLZSltMWwPnvsC6rjJcgHmC/tmpcj600j35.png", "https://replicate.delivery/xezq/OKWfR6jlQwzekkSsfQOppX55O3vaNv6xZ4qY6RfHjwQHOwDTB/tmp9p3v3brc.png", "https://replicate.delivery/xezq/851Nz3fJzjyPB6zMpV2d2IPk016I6Sc1fiwBe8M95SZDH4hpA/tmp6ujoauxu.png", "https://replicate.delivery/xezq/ea82c5sHQJS4AKOUScLxrXIS7PTNeiCJJvHl7atHLZ5hD8wUA/tmpc64f9ioz.png", "https://replicate.delivery/xezq/vupbeXCmqmWaIalRVtPbilRtjGfH6cZ7pge7KsxFYEhDH4hpA/tmpd1wq503g.png", "https://replicate.delivery/xezq/YSMIZMYt8e1AGCp3kfruzf5pvq75if5QoB3L9HfcHt4LcgHmC/tmpx8rf31v2.png", "https://replicate.delivery/xezq/WObGZp2Y1N4XLxNOtl9dmPbyc9DoEZdj5KNzc9d9ATY4APMF/tmpm5158btm.png", "https://replicate.delivery/xezq/Kj0oSnOCoX59Nhb39PsofFbeXRzCnijm01Mev2AQiJlDH4hpA/tmpnucmiqqf.png", "https://replicate.delivery/xezq/DmVu3ffatPnEok7JmMgHb7WUu5K9bujJdepT3EieyaVFOwDTB/tmpqt982r_e.png", "https://replicate.delivery/xezq/N53gjg9CmO5sHxAyli047Z933Ufq39PYQnbx2Zlvrf5hD8wUA/tmp16ffikxv.png", "https://replicate.delivery/xezq/Uan4GFIwgdppI1nMU9AdEViKBXseRe4e4yegRxKLiguGOwDTB/tmppz2pz0pf.png", "https://replicate.delivery/xezq/6DZkEvkQYyJwPpoAs8kccfigTIZxTFbBfBjcerHLAfNGOwDTB/tmpvpp_y5ly.png", "https://replicate.delivery/xezq/VYMR2ELN8cYfQKVaoJs9N6mz67zHrYPUqhAiqWCDe65hD8wUA/tmpbtt14n8g.png" ], "started_at": "2025-05-27T19:13:27.151112Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-n56xmukt2mcf6cyt3w4rqbds2h4rhzult2t7u2clsy6qpufhk7mq", "get": "https://api.replicate.com/v1/predictions/e35v2nzrbhrm80cq2cmtp2nsyr", "cancel": "https://api.replicate.com/v1/predictions/e35v2nzrbhrm80cq2cmtp2nsyr/cancel" }, "version": "hidden" }
Generated inUsing seed: 418123222 Using seed: 114580291 Using seed: 174960113 Using seed: 1660622592 Using seed: 718474419 Using seed: 551268014 Using seed: 1588693419 Using seed: 1574924760 Using seed: 665427376 Using seed: 1339784564 Using seed: 1164059653 Using seed: 763793531 Using seed: 945000035 Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generating... Generated image in 5.3sec Generated image in 5.4sec Generated image in 5.4sec Generated image in 5.4sec Downloading 1136972 bytes Generated image in 6.0sec Generated image in 6.1sec Downloading 1143702 bytes Generated image in 6.4sec Downloading 1202219 bytes Downloaded 1.08MB in 1.19sec Downloading 1047529 bytes Generated image in 6.9sec Downloading 1215579 bytes Downloading 1164288 bytes Downloading 1222544 bytes Downloaded 1.16MB in 0.32sec Generated image in 7.4sec Downloading 1016774 bytes Generated image in 7.5sec Downloading 1170616 bytes Generated image in 7.5sec Generated image in 7.5sec Generated image in 7.6sec Downloaded 0.97MB in 0.23sec Downloaded 1.00MB in 2.41sec Downloaded 1.09MB in 2.57sec Downloaded 1.15MB in 2.61sec Downloaded 1.11MB in 2.26sec Downloaded 1.17MB in 2.41sec Downloading 1137913 bytes Downloading 1188303 bytes Downloading 1153930 bytes Downloading 997857 bytes Downloaded 1.12MB in 2.44sec Downloaded 1.09MB in 2.28sec Downloaded 1.13MB in 2.43sec Downloaded 0.95MB in 2.41sec Downloaded 1.10MB in 2.58sec
Prediction
flux-kontext-apps/portrait-seriesOfficial modelIDtt111kv6jdrme0cq2esvv61n7mStatusSucceededSourceWebTotal durationCreatedInput
{ "background": "black", "num_images": 4, "input_image": "https://replicate.delivery/xezq/YevCNziLpNQHGaEkqsmjuMfFcEX2gnmfKmuh3hRz4qKCU8hpA/tmpglusgsda.png", "randomize_images": true }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run flux-kontext-apps/portrait-series using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { background: "black", num_images: 4, input_image: "https://replicate.delivery/xezq/YevCNziLpNQHGaEkqsmjuMfFcEX2gnmfKmuh3hRz4qKCU8hpA/tmpglusgsda.png", randomize_images: true }; const output = await replicate.run("flux-kontext-apps/portrait-series", { input }); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run flux-kontext-apps/portrait-series using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "flux-kontext-apps/portrait-series", input={ "background": "black", "num_images": 4, "input_image": "https://replicate.delivery/xezq/YevCNziLpNQHGaEkqsmjuMfFcEX2gnmfKmuh3hRz4qKCU8hpA/tmpglusgsda.png", "randomize_images": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run flux-kontext-apps/portrait-series 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": { "background": "black", "num_images": 4, "input_image": "https://replicate.delivery/xezq/YevCNziLpNQHGaEkqsmjuMfFcEX2gnmfKmuh3hRz4qKCU8hpA/tmpglusgsda.png", "randomize_images": true } }' \ https://api.replicate.com/v1/models/flux-kontext-apps/portrait-series/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-05-27T21:43:40.702268Z", "created_at": "2025-05-27T21:43:33.779000Z", "data_removed": false, "error": null, "id": "tt111kv6jdrme0cq2esvv61n7m", "input": { "background": "black", "num_images": 4, "input_image": "https://replicate.delivery/xezq/YevCNziLpNQHGaEkqsmjuMfFcEX2gnmfKmuh3hRz4qKCU8hpA/tmpglusgsda.png", "randomize_images": true }, "logs": "Using seed: 1991753620\nUsing seed: 1292982147\nUsing seed: 335954020\nUsing seed: 353761696\nGenerating...\nGenerating...\nGenerating...\nGenerating...\nGenerated image in 5.3sec\nGenerated image in 5.3sec\nGenerated image in 5.3sec\nGenerated image in 5.4sec\nDownloading 909084 bytes\nDownloading 1184530 bytes\nDownloading 1066332 bytes\nDownloading 949426 bytes\nDownloaded 0.91MB in 1.14sec\nDownloaded 1.02MB in 1.34sec\nDownloaded 1.13MB in 1.43sec\nDownloaded 0.87MB in 1.53sec", "metrics": { "image_count": 4, "predict_time": 6.91369131, "total_time": 6.923268 }, "output": [ "https://replicate.delivery/xezq/OcAVg61yzRK2ABb44sanZ8C5UJroOwyaiQrrTDliPeSGIfwUA/tmp7glcmr5g.png", "https://replicate.delivery/xezq/yE52QYXvBHIhDVPUXRIBkAuH1YiCASSA6OZiYPyko5BDkPMF/tmpgc76dpkb.png", "https://replicate.delivery/xezq/eIgZpO5XatVIUq0Mxvpvfgc16xBJQFUy5NkH0UfsDnUYg8hpA/tmp4ebxzu7_.png", "https://replicate.delivery/xezq/XjLrbaIQfFUoJKB5gRaYcSetZ5ga8B0NrehefzVQZEMnByHmC/tmpqmz5vy8q.png" ], "started_at": "2025-05-27T21:43:33.788576Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-glajziziq52olu5fgvq2ncrhv47sxzx4ioccojbj6ya4kdvmn23q", "get": "https://api.replicate.com/v1/predictions/tt111kv6jdrme0cq2esvv61n7m", "cancel": "https://api.replicate.com/v1/predictions/tt111kv6jdrme0cq2esvv61n7m/cancel" }, "version": "hidden" }
Generated inUsing seed: 1991753620 Using seed: 1292982147 Using seed: 335954020 Using seed: 353761696 Generating... Generating... Generating... Generating... Generated image in 5.3sec Generated image in 5.3sec Generated image in 5.3sec Generated image in 5.4sec Downloading 909084 bytes Downloading 1184530 bytes Downloading 1066332 bytes Downloading 949426 bytes Downloaded 0.91MB in 1.14sec Downloaded 1.02MB in 1.34sec Downloaded 1.13MB in 1.43sec Downloaded 0.87MB in 1.53sec
Want to make some of these yourself?
Run this model