14 lines
363 B
JavaScript
14 lines
363 B
JavaScript
import 'dotenv/config';
|
|
|
|
async function testReplicate() {
|
|
const token = process.env.REPLICATE_API_TOKEN || "test";
|
|
const response = await fetch('https://api.replicate.com/v1/models/black-forest-labs/flux-schnell', {
|
|
headers: {
|
|
'Authorization': `Bearer ${token}`
|
|
}
|
|
});
|
|
console.log(response.status, await response.text());
|
|
}
|
|
|
|
testReplicate();
|