Requirements:

  • Node.js >= 18
  • In order to access endpoints, create an OctoAI API token.
  • Set the token to an environment variable named OCTOAI_TOKEN or pass it to the Client class on construction.

Installation:

The TypeScript SDK can be installed using NPM.

bash
npm i @octoai/client

Setting API token as an environment variable:

In order to access endpoints from OctoAI, first create an API token. Set OCTOAI_TOKEN to the token value wherever you set your environment variables, such as your .bashrc or .env file.

bash
export OCTOAI_TOKEN=YOUR_TOKEN_HERE

Alternatively, on creation of the Client class, you can set your token variable. Please see the Client docs for more information.