/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import dotenv from "dotenv"; dotenv.config(); /** * Example usage of the duckyai-ts SDK * * To run this example from the examples directory: * npm run build && npx tsx documentsIndexFile.example.ts */ import { Ducky } from "duckyai-ts"; import { openAsBlob } from "node:fs"; const ducky = new Ducky({ apiKey: process.env["DUCKY_API_KEY"] ?? "", }); async function main() { const result = await ducky.documents.indexFile({ indexName: "", file: await openAsBlob("example.file"), }); console.log(result); } main().catch(console.error);