TypeScript SDK

TypeScript SDK installation & setup


  • The following runtimes are supported:
    • Node.js 15+
    • Vercel
    • Cloudflare Workers
    • Deno v1.25+
    • Bun 1.0+
  • 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 OctoAIClient class on construction.


The TypeScript SDK can be installed using your preferred package manager.

$npm install @octoai/sdk

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.