catacolabs / cartoonify

Turn your image into a cartoon

  • Public
  • 640.3K runs
  • L40S
  • GitHub
  • License

Run catacolabs/cartoonify 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
Learn more about setup

Run catacolabs/cartoonify using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

import Replicate from "replicate";
const replicate = new Replicate();

const input = {
    seed: 2862431,
    image: "https://replicate.delivery/pbxt/JbiN55mmFQztbsQphxEk0vZyySVuWJdKCJSSIf9BIr58J19O/puppy.jpg"
};

const output = await replicate.run("catacolabs/cartoonify:f109015d60170dfb20460f17da8cb863155823c85ece1115e1e9e4ec7ef51d3b", { input });

import { writeFile } from "node:fs/promises";
await writeFile("output.png", output);
//=> output.png written to disk
Learn more