import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
nightfall_ai: {
type: "app",
app: "nightfall_ai",
}
},
async run({steps, $}) {
const data = {
"fileSizeBytes": `123`,
}
return await axios($, {
method: "post",
url: `https://api.nightfall.ai/v3/upload`,
headers: {
Authorization: `Bearer ${this.nightfall_ai.$auth.api_key}`,
"Accept": `application/json`,
"Content-Type": `application/json`,
},
data,
})
},
})
Nightfall.ai uses API keys for authentication. When you connect your Nightfall.ai account, Pipedream securely stores the keys so you can easily authenticate to Nightfall.ai APIs in both code and no-code steps.
Sign in and copy your API key from the Manage API Keys page.