File size: 478 Bytes
dcb1206 4c0098a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import got from 'got';
async function FluxSchnell(message) {
const run = await got.post(`https://api.cloudflare.com/client/v4/accounts/${process.env['ACCOUNT_ID']}/ai/run/@cf/black-forest-labs/flux-1-schnell`, {
headers: {
'Authorization': `Bearer ${process.env['CLOUDFLARE_API_KEY']}`,
'Content-Type': 'application/json'
},
json: {'prompt': message};
}).json();
return run.result.response;
}
export { FluxSchnell }; |