Skip to content

labinnovationdocapost/leia-api-nodejs-sdk

Repository files navigation

LEIA API SDK for Node.js npm version

LEIA API allows you to use a wide range of Deep Learning tools to inject intelligence into your projects.

Getting started

npm install leia-api-sdk

  • Get an API key

  • Read the documentation

  • Create a LeiaAPI object and authenticate to use the API

const leiaAPI = new LeiaAPI()
leiaAPI.login('apiKey').then((application) => {
    console.log("you", application)
})
...
leiaAPI.addDocument('test.jpg', image.buffer).then((document) => {
   documentId = document.id
   return leiaAPI.addModel('my model', model.buffer)
}).then((model) => {
   return leiaAPI.applyModelToDocument(model.id, [documentId])
}).then((job) => {
   ...
   // Poll job for result
   leiaAPI.getJob(job.id).then((job) => {
      console.log(job.result)
   })
   ...
})

You can also read the LEIA API documentation on leia.io.

Licence

Apache 2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published