This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@workflowai/api
TypeScript icon, indicating that this package has built-in type declarations

1.4.3 • Public • Published

workflowAI typed API client

Wrapper for workflowAI's OpenAPI specs, for node or browser

Install

npm install @workflowai/api

Initialize API

import { initWorkflowAIApi } from '@workflowai/api';

const workflowAIApi = initWorkflowAIApi({
  apiKey: '...', // optional, defaults to process.env.WORKFLOWAI_API_KEY
  apiUrl: '...', // optional, defaults to process.env.WORKFLOWAI_API_URL, then to https://api.workflowai.com
  use: [], // optional, fetch middlewares
});

Call endpoints

const { data: list } = await workflowAIApi.models.list();

console.log(list.models[0].providers[0].name);

const { data: run } = await workflowaiApi.runs.annotate({
  run_id: '1',
  score: 1,
});

console.log(run.scores);

Readme

Keywords

Package Sidebar

Install

npm i @workflowai/api

Weekly Downloads

70

Version

1.4.3

License

none

Unpacked Size

1.37 MB

Total Files

74

Last publish

Collaborators

  • gui-workflowai
  • pvalade