MCPcopy
hub / github.com/erictik/midjourney-api / main

Function main

example/relax.ts:10–23  ·  view source on GitHub ↗

* * a simple example of using the relax api * ``` * npx tsx example/relax.ts * ```

()

Source from the content-addressed store, hash-verified

8 * ```
9 */
10async function main() {
11 const client = new Midjourney({
12 ServerId: <string>process.env.SERVER_ID,
13 ChannelId: <string>process.env.CHANNEL_ID,
14 SalaiToken: <string>process.env.SALAI_TOKEN,
15 Debug: true,
16 Ws: true,
17 });
18 await client.Connect();
19 await client.Relax();
20 const msg = await client.Info();
21 console.log({ msg });
22 client.Close();
23}
24main()
25 .then(() => {
26 console.log("finished");

Callers 1

relax.tsFile · 0.70

Calls 5

ConnectMethod · 0.95
RelaxMethod · 0.95
InfoMethod · 0.95
CloseMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected