TypeScript SDK
Installation
Install the FlexOrch TypeScript / JavaScript SDK.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Install the FlexOrch TypeScript / JavaScript SDK.
npm install flexorch-sdk
export FLEXORCH_API_KEY=dfx_your_key_here
import { FlexOrchClient } from 'flexorch-sdk';
const client = new FlexOrchClient(); // reads FLEXORCH_API_KEY from env
const client = new FlexOrchClient('dfx_your_key_here');
// options object form
const client = new FlexOrchClient({
apiKey: 'dfx_your_key_here',
timeout: 60, // seconds — default 30
maxRetries: 3, // default 3
});
const { FlexOrchClient } = require('flexorch-sdk');
const client = new FlexOrchClient();
import { FlexOrchClient } from 'flexorch-sdk';
import type { ExportFormat } from 'flexorch-sdk';
const format: ExportFormat = 'jsonl'; // "json" | "jsonl" | "csv" | "parquet" | "md" | "xml" | "xlsx" | "rag"
import { FlexOrchClient } from 'flexorch-sdk';
const client = new FlexOrchClient();
const usage = await client.usage.get();
console.log(usage.plan); // "trial"
console.log(usage.creditsUsed); // 0
console.log(usage.creditsRemaining); // 1200