with Partnerize and AI/ML API?
The Partnerize API enables you to interact programmatically with the Partnerize platform, which specializes in partner marketing and affiliate management. With this API, you can automate tasks related to tracking, commissioning, and reporting on marketing campaigns. In Pipedream, you can leverage these capabilities to create automated workflows that respond to various triggers (like webhooks), manipulate data, and integrate with a myriad of other services without having to manage servers or complex infrastructure.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
partnerize: {
type: "app",
app: "partnerize",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.partnerize.com/network`,
auth: {
username: `${this.partnerize.$auth.user_app_key}`,
password: `${this.partnerize.$auth.user_api_key}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
ai_ml_api: {
type: "app",
app: "ai_ml_api",
}
},
async run({steps, $}) {
const data = {
"model": "mistralai/Mistral-7B-v0.1",
"messages": [
{
"role": "system",
"content": "You are an AI assistant who knows everything.",
},
{
"role": "user",
"content": "Tell me, why is the sky blue?"
},
]
}
return await axios($, {
method: "POST",
url: `https://api.aimlapi.com/chat/completions`,
headers: {
Authorization: `Bearer ${this.ai_ml_api.$auth.api_key}`,
},
data,
})
},
})