typefile
{
"image": "https://replicate.delivery/pbxt/Nec68MfOkBJCjAoYHPvbwNwkIWJaVEkyO80fVKiMuZOGiQDb/dc41883a-e110-4f0c-af50-a43543543a57.png"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_MRy**********************************
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 tomclive/sceneideas using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
image: "https://replicate.delivery/pbxt/Nec68MfOkBJCjAoYHPvbwNwkIWJaVEkyO80fVKiMuZOGiQDb/dc41883a-e110-4f0c-af50-a43543543a57.png"
};
for await (const event of replicate.stream("tomclive/sceneideas", { input })) {
process.stdout.write(event.toString());
};
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_MRy**********************************
This is your API token. Keep it to yourself.
import replicate
Run tomclive/sceneideas using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
# The tomclive/sceneideas model can stream output as it's running.
for event in replicate.stream(
"tomclive/sceneideas",
input={
"image": "https://replicate.delivery/pbxt/Nec68MfOkBJCjAoYHPvbwNwkIWJaVEkyO80fVKiMuZOGiQDb/dc41883a-e110-4f0c-af50-a43543543a57.png"
},
):
print(str(event), end="")
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_MRy**********************************
This is your API token. Keep it to yourself.
Run tomclive/sceneideas 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": {
"image": "https://replicate.delivery/pbxt/Nec68MfOkBJCjAoYHPvbwNwkIWJaVEkyO80fVKiMuZOGiQDb/dc41883a-e110-4f0c-af50-a43543543a57.png"
}
}' \
https://api.replicate.com/v1/models/tomclive/sceneideas/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "yyvf1ys2d1rme0cs2jtb0qdafr",
"model": "tomclive/sceneideas",
"version": "hidden",
"input": {
"image": "https://replicate.delivery/pbxt/Nec68MfOkBJCjAoYHPvbwNwkIWJaVEkyO80fVKiMuZOGiQDb/dc41883a-e110-4f0c-af50-a43543543a57.png"
},
"logs": "/app/.venv/lib/python3.13/site-packages/coglet/scope.py:36: ExperimentalFeatureWarning: current_scope is an experimental internal function. It may change or be removed without warning.\n warnings.warn(\nFailed to generate scene 1: [Errno 101] Network is unreachable",
"output": [
"https://replicate.delivery/xezq/nYUMU4pT5pZeCyfvGlhDcxOFeC6YlQ7OxjfrdkT3ir7tEOHVB/tmpe62rtf0a.jpeg",
"https://replicate.delivery/xezq/eZQA49bd0ficfo9UqVkcOEKpedRPIyDE9pm9UJxCOxPlFOHVB/tmpus2oxx1a.jpeg",
"https://replicate.delivery/xezq/Q6n0Ui1fqixQPyezXTZKxdXuxeVFxfAvm4jYX8sTtLXTGOHVB/tmpx_578z7o.jpeg",
"https://replicate.delivery/xezq/LX48iVecHwQnXCuEEfIh8FgpAuVc0xkgeze8UW967osFHOHVB/tmpivy2283f.jpeg",
"https://replicate.delivery/xezq/bz4S6hYD1U49MlsGC0Bpu20DGBwajj39ObUrPFkxnfeeDnjqA/tmpb2akdt6u.jpeg",
"https://replicate.delivery/xezq/QOWSMaPn0taBBl2oO6DTkxUWZ5yDZUbxhVQ3w6RcbXdi4cUF/tmp_pfeentz.jpeg",
"https://replicate.delivery/xezq/LSF9xjnBuqbzFRrige1fmisZyhjmszl5ukMdTJfPSrrtEnjqA/tmpru3b6ub2.jpeg"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-09-04T12:29:33.672Z",
"started_at": "2025-09-04T12:29:34.243945Z",
"completed_at": "2025-09-04T12:31:18.347848Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/yyvf1ys2d1rme0cs2jtb0qdafr/cancel",
"children": "https://api.replicate.com/v1/predictions/yyvf1ys2d1rme0cs2jtb0qdafr/children",
"get": "https://api.replicate.com/v1/predictions/yyvf1ys2d1rme0cs2jtb0qdafr",
"root": "https://api.replicate.com/v1/predictions/yyvf1ys2d1rme0cs2jtb0qdafr",
"stream": "https://stream.replicate.com/v1/files/bcwr-ajy5b26kqu75afb6r27mxk2jvf5naf4ucpwgoe4fwom5ldyfb7bq",
"web": "https://replicate.com/p/yyvf1ys2d1rme0cs2jtb0qdafr"
},
"metrics": {
"predict_time": 104.103902639,
"total_time": 104.675848
}
}
