@twinai/twin-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

TwinAI SDK

How to use

import { TwinAISdk, getClient } from '@twinai/sdk'

const client: TwinAISdk = getClient({
  endpoint,
  apiKey,
})

Reference guide

The client exposes the following methods:

  • uploadFile(file: Stream): Promise<string>: Uploads a file, and returns the ID of the generated file models.
  • createFile(): Promise<CreateFileMutation>: Creates a new file model, and returns the ID and upload location of the model.
  • getRunResult(runId: string): Promise<RunByWorkflowNameMutation>: Retrieves the result of a run.
  • runByWorkflowName(workflowName: string, fileId: string): Promise<GetRunResultQuery>: Runs a workflow by name, and returns the ID of the run.

Readme

Keywords

none

Package Sidebar

Install

npm i @twinai/twin-sdk

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

119 kB

Total Files

15

Last publish

Collaborators

  • gergo_madx
  • patrick_twinai