TypeScript SDK

Install and start using the TypeScript SDK.

Intro

The Alchemyst AI API v1 documentation SDK provides access to the Alchemyst AI API v1 documentation REST APIs.

v1 API documentation for Alchemyst AI

Installation

To add the SDK to your project from npm:

Terminal
npm install alch-apimatic-sdk

To install from the SDK source instead, compile it to dist/ — run its build script once in the SDK folder — then add it to your project by path:

Terminal
npm install <path-to-sdk>

Quick Start

Create one client and reuse it. Configure its behaviour through ClientOptions.

TypeScript
import { AlchemystAiApiV1DocumentationClient } from "alch-apimatic-sdk";

const client = new AlchemystAiApiV1DocumentationClient({
  bearerAuth: "YOUR_BEARER_TOKEN",
});

Nothing in ClientOptions is required — new AlchemystAiApiV1DocumentationClient() compiles — and each option left out falls back to its default. This API declares one environment, so there is no environment to select and no host to state at the construction site.

From CommonJS

The package ships both dialects from a single entry, so require works with full types. In a TypeScript CommonJS file use the import ... = require(...) form — a plain destructuring require runs fine but gives you any.

TypeScript
import sdk = require("alch-apimatic-sdk");

const client = new sdk.AlchemystAiApiV1DocumentationClient({
  bearerAuth: "YOUR_BEARER_TOKEN",
});

On this page