Docs/ Getting started
Introduction
Set up your Zyentra account, authenticate, and make your first API call.
Installation
npm install @zyentra/sdkAuthentication
import { Zyentra } from '@zyentra/sdk'
const zy = new Zyentra({
apiKey: process.env.ZYENTRA_API_KEY
})
const status = await zy.ping()
// { ok: true, latency: '12ms' }First API call
const apis = await zy.discover({
query: 'sentiment',
agentCompatible: true,
})
await zy.subscribe('sentiment-api', { plan: 'pro' })
const result = await zy.call('sentiment-api', {
text: 'Zyentra is fast.'
})
// { sentiment: 'positive', score: 0.94 }