Skip to main content

Installation

Authentication

Set your API key via environment variable or pass it directly when initializing the client.
  • Recommended env var: ALCHEMYST_AI_API_KEY

Quickstart

Usage by Endpoint

All methods return a promise you can await. Types are available out-of-the-box in TypeScript.

Context: Add

Version Requirements: The groupName field is introduced in TypeScript SDK version 0.6.0. If you use groupName in previous versions, you will encounter an error. If groupName is not provided, it will be set to a default value automatically.
groupName: The group name acts like a namespace which creates a scope for context. Documents with the same group name will be grouped together for better organization and retrieval.Example Use Cases:
  • ['project-alpha'] - Group all documents related to a specific project
  • ['customer-support', 'tier-1'] - Organize support documentation by department and priority
  • ['legal', 'contracts'] - Categorize legal documents by type and category
  • ['training', 'onboarding'] - Group training materials for new employee onboarding

Context: Delete

Context: View (per-user)

Per-user View: This endpoint gives the authenticated user their own context from the organization.

Context: Traces

Organization: View Context

Organization View: This endpoint allows you to fetch context based on specific user IDs within your organization.

Troubleshooting and Errors

If you encounter unexpected behavior or specific API errors, please refer to our Troubleshooting Guide for detailed solutions and error code definitions.