C# SDK

Install and start using the C# 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 NuGet:

Terminal
dotnet add package AlchemystApimaticSDK

To build against the SDK source instead, add it as a project reference into your solution:

Terminal
dotnet add reference <path-to-sdk>/AlchemystAiApiV1Documentation.csproj

Quick Start

Dependency Injection

Register the client with IServiceCollection and resolve it from the container. The HttpClient is managed by IHttpClientFactory. Configure the client's behavior through AlchemystAiApiV1DocumentationClientOptions.

C#
services.AddAlchemystAiApiV1DocumentationClient(options =>
{
    options.BearerAuth = "YOUR_BEARER_TOKEN";
    options.Environment = ServerEnvironment.Production;
    // TODO: configure more client options here
});

Direct Instantiation

Create the client by passing an HttpClient you manage yourself. Configure the client's behavior through AlchemystAiApiV1DocumentationClientOptions.

C#
var httpClient = new HttpClient();
// TODO: configure more client options here
var options = new AlchemystAiApiV1DocumentationClientOptions
{
    BearerAuth = "YOUR_BEARER_TOKEN",
    Environment = ServerEnvironment.Production,
};
var client = new AlchemystAiApiV1DocumentationClient(httpClient, options);

On this page