@twinai/twin-sdk
v0.0.3
Published
## How to use ```typescript import { TwinAISdk, getClient } from '@twinai/sdk'
Downloads
2
Readme
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.