Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
[![npm version](https://img.shields.io/npm/v/deepai.svg?style=flat-square)](https://www.npmjs.org/package/deepai)
Simple Javascript Client Library for Deep AI's APIs from Browser and Node.js
Node.js or other environments using npm:
npm install --save deepai
Browser:
<script src="https://cdnjs.deepai.org/deepai.min.js"></script>
Most examples are for Content Moderation, but you can subsitute any model name available at DeepAI.
Ensure that you pass the correct input names. Not all model input names are "image".
All examples use Async-Await syntax, so ensure you run the code in an async function.
####Browser:
// Ensure you load deepai with one of the methods in "Installation"
deepai.setApiKey('YOUR_API_KEY'); // get your free API key at https://deepai.org
Pass URL:
var result = await deepai.callStandardApi("content-moderation", {
image: "https://YOUR_IMAGE_URL"
});
Pass Literal Text:
var result = await deepai.callStandardApi("sentiment-analysis", {
text: "I am very happy to play with the newest APIs!"
});
Pass Image DOM Element:
var result = await deepai.callStandardApi("content-moderation", {
image: document.getElementById('yourImageId')
});
Pass File Picker Element:
var result = await deepai.callStandardApi("content-moderation", {
image: document.getElementById('yourFilePickerId')
});
####Node.js
const deepai = require('deepai');
deepai.setApiKey('YOUR_API_KEY'); // get your free API key at https://deepai.org
Pass URL:
var result = await deepai.callStandardApi("content-moderation", {
image: "https://YOUR_IMAGE_URL"
});
Pass Literal Text:
var result = await deepai.callStandardApi("sentiment-analysis", {
text: "I am very happy to play with the newest APIs!"
});
Pass File Upload:
const fs = require('fs');
<...>
var result = await deepai.callStandardApi("content-moderation", {
image: fs.createReadStream('/path/to/your/file.jpg')
});
npm install
npm run-script build
FAQs
[![npm version](https://img.shields.io/npm/v/deepai.svg?style=flat-square)](https://www.npmjs.org/package/deepai) [![CodeQL](https://github.com/deepai-org/deepai-js-client/actions/workflows/codeql.yml/badge.svg)](https://github.com/deepai-org/deepai-js-cl
The npm package deepai receives a total of 3,472 weekly downloads. As such, deepai popularity was classified as popular.
We found that deepai demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.