import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    stealthgpt: {
      type: "app",
      app: "stealthgpt",
    }
  },
  async run({steps, $}) {
    const data = {
      "prompt": `tell me something about modern backend architecture`,
      "size": `medium`,
    }
    return await axios($, {
      method: "POST",
      url: `https://stealthgpt.ai/api/stealthify/articles`,
      headers: {
        "Content-Type": `application/json`,
        "api-token": `${this.stealthgpt.$auth.api_key}`,
      },
      data,
    })
  },
})
StealthGPT uses API keys for authentication. When you connect your StealthGPT account, Pipedream securely stores the keys so you can easily authenticate to StealthGPT APIs in both code and no-code steps.