carlpuvosx / cerveza-presidente

  • Public
  • 15 runs
  • H100

Run carlpuvosx/cerveza-presidente 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 carlpuvosx/cerveza-presidente 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 = {
    prompt: "TOKcerveza-Presidente",
    guidance_scale: 3.5,
    output_quality: 90
};

const output = await replicate.run("carlpuvosx/cerveza-presidente:48375433dbf9da71de56813ad7fa5a82cb5a1b9132b4d63ac9e75e572d049237", { input });

import { writeFile } from "node:fs/promises";
for (const [index, item] of Object.entries(output)) {
  await writeFile(`output_${index}.webp`, item);
}
//=> output_0.webp written to disk
Learn more