Installation
Install and initialize the OleqAI.FileManager NuGet package
Package: OleqAI.FileManager
Targets .NET 6+ (ASP.NET Core, worker services, console apps). API shape mirrors @oleq-ai/file-manager.
Portal
Everything the SDK does — create apps, upload files, manage keys — can also be done in the portal. Use the SDK when you want to automate from your backend.
1. Install the package
dotnet add package OleqAI.FileManager2. Create an API key
- Sign in to the portal.
- Open API keys and create a key (
sk_test_…for sandbox apps,sk_live_…for production apps). - Copy the secret once — it is only shown at creation.
3. Set the environment variable
export OLEQFILES_API_KEY=sk_test_…In ASP.NET Core you can also use user secrets / configuration:
{
"OLEQFILES_API_KEY": "sk_live_…"
}Sandbox and production share the same API host. The key prefix selects which apps you can use.
4. Initialize the client
using OleqFiles;
var oleqFiles = new OleqFilesClient();That is enough. The SDK reads OLEQFILES_API_KEY and defaults the API host to https://uploadspi.oleq.app.
You only pass options when you need to override something:
var oleqFiles = new OleqFilesClient(new OleqFilesOptions
{
ApiKey = "sk_test_…", // optional if env is set
BaseUrl = "http://localhost:3000", // local / custom API
});ASP.NET Core DI
builder.Services.AddSingleton(_ => new OleqFilesClient());Or bind from configuration:
builder.Services.AddSingleton(_ =>
new OleqFilesClient(new OleqFilesOptions
{
ApiKey = builder.Configuration["OLEQFILES_API_KEY"],
}));Requirements
- .NET 6 or later
OLEQFILES_API_KEYin the environment (orApiKeyin options) starting withsk_test_…orsk_live_…
Next: Usage