Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
hellojixian /sd-promot-converter:3c1e3b8f
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run hellojixian/sd-promot-converter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"hellojixian/sd-promot-converter:3c1e3b8fca2b18e1faab8fd0c435db3f517d789c78a716b387a308e5744ab18c",
{
input: {
story: "A gnarble left his cozy bed along the ocean floor.\n\nHe dreamt about a place that he had never seen before!\n\nHe headed to the surface for a glimpse of sun and sky.\n\nA trip so long and perilous, he’d be the first to try!\n\nThe Journey of the Noble Gnarble is a number one best-selling ebook that has been adapted into a hardcover book and play. Through rhyming verse and engaging illustrations, the Noble Gnarble teaches kids about perseverance and determination in the face of obstacles. Dream Big!\n\n"
}
}
);
console.log(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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run hellojixian/sd-promot-converter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"hellojixian/sd-promot-converter:3c1e3b8fca2b18e1faab8fd0c435db3f517d789c78a716b387a308e5744ab18c",
input={
"story": "A gnarble left his cozy bed along the ocean floor.\n\nHe dreamt about a place that he had never seen before!\n\nHe headed to the surface for a glimpse of sun and sky.\n\nA trip so long and perilous, he’d be the first to try!\n\nThe Journey of the Noble Gnarble is a number one best-selling ebook that has been adapted into a hardcover book and play. Through rhyming verse and engaging illustrations, the Noble Gnarble teaches kids about perseverance and determination in the face of obstacles. Dream Big!\n\n"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run hellojixian/sd-promot-converter 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 $'{
"version": "hellojixian/sd-promot-converter:3c1e3b8fca2b18e1faab8fd0c435db3f517d789c78a716b387a308e5744ab18c",
"input": {
"story": "A gnarble left his cozy bed along the ocean floor.\\n\\nHe dreamt about a place that he had never seen before!\\n\\nHe headed to the surface for a glimpse of sun and sky.\\n\\nA trip so long and perilous, he’d be the first to try!\\n\\nThe Journey of the Noble Gnarble is a number one best-selling ebook that has been adapted into a hardcover book and play. Through rhyming verse and engaging illustrations, the Noble Gnarble teaches kids about perseverance and determination in the face of obstacles. Dream Big!\\n\\n"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{
"completed_at": "2024-04-29T21:33:37.783234Z",
"created_at": "2024-04-29T21:33:32.439000Z",
"data_removed": false,
"error": null,
"id": "txw432fxjxrgc0cf5f3axexb8m",
"input": {
"story": "A gnarble left his cozy bed along the ocean floor.\n\nHe dreamt about a place that he had never seen before!\n\nHe headed to the surface for a glimpse of sun and sky.\n\nA trip so long and perilous, he’d be the first to try!\n\nThe Journey of the Noble Gnarble is a number one best-selling ebook that has been adapted into a hardcover book and play. Through rhyming verse and engaging illustrations, the Noble Gnarble teaches kids about perseverance and determination in the face of obstacles. Dream Big!\n\n"
},
"logs": null,
"metrics": {
"predict_time": 5.329611,
"total_time": 5.344234
},
"output": "{\n \"prompts\": [\n \"gnarble ocean floor cozy bed\",\n \"gnarble dreaming of unknown places\",\n \"gnarble journey to the ocean surface\",\n \"illustration of a gnarble overcoming obstacles\"\n ]\n}",
"started_at": "2024-04-29T21:33:32.453623Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/txw432fxjxrgc0cf5f3axexb8m",
"cancel": "https://api.replicate.com/v1/predictions/txw432fxjxrgc0cf5f3axexb8m/cancel"
},
"version": "3c1e3b8fca2b18e1faab8fd0c435db3f517d789c78a716b387a308e5744ab18c"
}