@deep3labs/node-client
v0.0.4
Published
Deep3 Labs Node.js API client
Downloads
2
Readme
Deep3 Labs: Unlocking the potential of Web3.0 with the power of AI
Interested in trying it out? Visit https://developer.deep3.ai to get an API key
Deep3 Labs Node.js client
This client enables Deep3 Labs API access in Node.js applications.
Generated by OpenAPI Generator using the Deep3 Labs OpenAPI specification.
Installation
npm install @deep3labs/node-client
Usage
:warning: WARNING: using this client in browser will expose your API key. Only use in backend code
import { Configuration, Deep3Api } from '@deep3labs/node-client'
const config = new Configuration({
apiKey: process.env.DEEP3_API_KEY,
})
const deep3 = new Deep3Api(config)
try {
const prediction = await deep3.getPrediction({
model: 'HODL-C1',
chainId: 1,
publicAddress: '0x0000000000000000000000000000000000000000'
});
if (prediction.result === 200) {
console.log(`prediction is: ${prediction.value}`)
} else {
console.log('prediction unavailable')
}
} catch (error) {
console.error(error)
}
Documentation
Typedocs available here