Created
July 10, 2022 01:56
-
-
Save 1998code/ed81862883c1b97a1210a47439a9edd2 to your computer and use it in GitHub Desktop.
DALL-E 2 API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Dalle } from "dalle-node" | |
export default async function handler(req, res) { | |
const dalle = new Dalle(req.query.k); | |
const generations = await dalle.generate(req.query.q); | |
res.status(200).json({ result: generations }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment