📖
MidJourney Node Client Doc
GithubSponsor
  • 👋MidJourney Node Client
  • 📓Getting started
    • Quickstart
    • Install
    • Config
    • API Reference
      • imagine
      • variation
      • upscale
      • reroll
      • blend
      • describe
      • info
      • fast
      • relax
      • setting
      • reset
    • Example
      • Imagine
  • FAQ
    • vercel
    • node.js <18
    • proxy
    • How to get your Discord Token
    • Invite Midjourney Bot to Your Server
  • Join the Beta
  • Use Cases
    • 🎨Web UI
    • 🤖Discord Bot
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Getting started
  2. API Reference

imagine

import { Midjourney } from "midjourney";
async function main() {
  const client = new Midjourney({
    ServerId: "1082500871478329374",
    ChannelId: "1094892992281718894",
    SalaiToken: "your discord token",
  });
  await client.Connect();
  const Imagine = await client.Imagine(
    "Red hamster smoking a cigaret",
    (uri: string, progress: string) => {
      console.log("Imagine.loading", uri, "progress", progress);
    }
  );
  console.log( Imagine );
  client.Close();
}
PreviousAPI ReferenceNextvariation

Last updated 1 year ago

Was this helpful?

📓