Last updated 1 year ago
Step1: Get your Discord TokenJoin the Beta
Step2: Join Discord Server
Step3: Install midjourney
Step3: Use the imagine api
import { Midjourney } from "midjourney"; const client = new Midjourney({ ServerId: "1082500871478329374", ChannelId: "1094892992281718894", SalaiToken: "your discord token", Debug: true, }); const msg = await client.Imagine( "A little white elephant", (uri: string, progress: string) => { console.log("loading:", uri, "progress:", progress); } ); console.log({ msg });
const { Midjourney } = require("midjourney"); const client = new Midjourney({ ServerId: "1082500871478329374", ChannelId: "1094892992281718894", SalaiToken: "your discord token", Debug: true, Ws:true, }); const msg = await client.Imagine("A little pink elephant", (uri, progress) => { console.log("loading:", uri, "progress:", progress); }); console.log({ msg });