ts-api / pages /api /blackbox.js
Shuddho's picture
Upload 42 files
d04e364 verified
import axios from "axios";
export const config = {
"name": "blackbox",
"url": "/api/blackbox",
"description": "Get response from Blackbox AI Model. Blackbox AI is a very powerful AI that can do a lot of things.",
"query": "prompt",
"response": "text",
"testURL": "./api/blackbox?prompt=hello"
}
const {blackbox} = require('@shuddho11288/blackboxai-api')
export default async function handler(req, res) {
const prompt = req.query.prompt;
const response = await blackbox(prompt);
res.status(200).json({response});
}