File size: 454 Bytes
38ceaf9
 
 
 
 
 
 
 
 
 
5d7708a
38ceaf9
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"use server"

import { ComfyDeployClient } from "@/lib/comfy-deploy"

const client = new ComfyDeployClient({
    apiToken: process.env.COMFY_API_TOKEN!,
})

export async function generate(prompt: string){
    return await client.run({
        deployment_id: process.env.COMFY_DEPLOYMENT_ID!,
        inputs: {
            "input_text": prompt
        }
    })
}

export async function checkStatus(run_id: string){
    return await client.getRun(run_id)
}