SDK

Client

new Lirovo(config) is the entry point. It takes a single config object, holds your API key, and exposes the schemas, destinations, and jobs resource sub-clients.

Configuration#

new Lirovo(config) takes a single config object. Only apiKey is required; every other field has a default. The key is sent on every request as Authorization: Bearer <apiKey>.

apiKeyrequired
string

Your Lirovo API key. Sent as Authorization: Bearer <apiKey> on every request.

baseUrl
string

Base URL for the API. Defaults to https://api.lirovo.ai.

fetch
typeof globalThis.fetch

A custom fetch implementation (for example a test stub, or a polyfill on runtimes without a global fetch).

headers
Record<string, string>

Extra headers attached to every request.

credentials
"omit" | "same-origin" | "include"

Default request credentials mode passed through to fetch.

ts
import { Lirovo } from "@lirovo/sdk";

const lirovo = new Lirovo({
  apiKey: process.env.LIROVO_API_KEY!,
  // baseUrl defaults to https://api.lirovo.ai
});

Behavior#

The constructor throws if apiKey is missing ([@lirovo/sdk] `apiKey` is required.). The resolved base URL is readable at lirovo.baseUrl, which is useful for logging and debugging.

The client exposes three resource sub-clients:

  • lirovo.schemas for output schemas.
  • lirovo.destinations for delivery destinations.
  • lirovo.jobs for extraction jobs.