maczzzzzzz / tang
- Public
- 16 runs
-
H100
Run maczzzzzzz/tang with an API
Use one of our client libraries to get started quickly.
Set the REPLICATE_API_TOKEN
environment variable
export REPLICATE_API_TOKEN=<paste-your-token-here>
Learn more about authentication
Install Replicate’s Node.js client library
npm install replicate
Run maczzzzzzz/tang using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
import { writeFile } from "fs/promises";
import Replicate from "replicate";
const replicate = new Replicate();
const input = {
prompt: "in the style of tang, 2d cartoon drawing, orangutan eating pancakes on a table",
guidance_scale: 3.5,
output_quality: 90
};
const output = await replicate.run("maczzzzzzz/tang:c56d5737c5bdfe9305e9555a8f3cc0c167d7912bfbc34e4c2881eec1c439d76c", { input });
// To access the file URLs:
console.log(output[0].url());
//=> "https://replicate.delivery/.../output_0.webp"
// To write the files to disk:
for (const [index, item] of Object.entries(output)) {
await writeFile(`output_${index}.webp`, item);
}
//=> output_0.webp written to disk