Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.16 KB

README.md

File metadata and controls

45 lines (31 loc) · 1.16 KB

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