AI research and products that put safety at the frontier. Introducing Claude, a next-generation AI assistant for your tasks, no matter the scale.
Go to siteimport { axios } from "@pipedream/platform"
export default defineComponent({
props: {
anthropic: {
type: "app",
app: "anthropic",
}
},
async run({steps, $}) {
const data = {
"prompt": `Human: Tell me a haiku about trees. Assistant:`,
"model": `claude-v1`,
"max_tokens_to_sample": `300`,
}
return await axios($, {
method: "post",
url: `https://api.anthropic.com/v1/complete`,
headers: {
"x-api-key": `${this.anthropic.$auth.api_key}`,
"Content-Type": `application/json`,
},
data,
})
},
})
Anthropic (Claude) uses API keys for authentication. When you connect your Anthropic (Claude) account, Pipedream securely stores the keys so you can easily authenticate to Anthropic (Claude) APIs in both code and no-code steps.
To connect your Anthropic account to Pipedream,