TypeScript SDK installation & setup
Requirements
- 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 theOctoAIClient
class on construction.
Installation
The TypeScript SDK can be installed using your preferred package manager.
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