Install the OpenAI SDK and Run an API Call
- Javascript
- Python
- Curl
To use the Hicap API in server-side JavaScript environments like Node.js, Deno, or Bun, you can use the official OpenAI SDK for TypeScript and JavaScript. Get started by installing the SDK using npm or your preferred package manager:With the OpenAI SDK installed, create a file called Execute the code with
Install the OpenAI SDK with npm
example.mjs and copy the example code into it:example.mjs
node example.mjs (or the equivalent command for Deno or Bun). In a few moments, you should see the output of your API request.