File size: 546 Bytes
d04e364
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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});
}