with Levity and Nutrient Document Web Services API?
The Levity API provides a platform for creating AI-powered workflows that can classify images, text, and data with ease. Using this API in Pipedream, you can automate decision-making processes, enhance data categorization, and streamline content moderation by leveraging machine learning models. It integrates smoothly within Pipedream's serverless environment, allowing you to build complex workflows without spinning up a single server.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
levity: {
type: "app",
app: "levity",
}
},
async run({steps, $}) {
const data = {
"url": `{replace_with_image_url}`,
}
return await axios($, {
method: "post",
url: `https://api.levity.ai/v1/classifiers/{your_classifier_id}/classify/`,
headers: {
"Authorization": `Token ${this.levity.$auth.api_key}`,
"Content-Type": `application/json`,
},
data,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
nutrient_document_web_services_api: {
type: "app",
app: "nutrient_document_web_services_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.nutrient.io/account/info`,
headers: {
Authorization: `Bearer ${this.nutrient_document_web_services_api.$auth.api_key}`,
},
})
},
})