C# / .NET SDK
Build video on FastPix with a c# video SDK
The official FastPix SDK for .NET. Typed end-to-end, async-aware, retry-safe. Encodes a source URL into a playback ID in one call, provisions LL-HLS live streams, verifies webhooks with one helper, and ships with a migration path from the closest API peer (see comparison).
Trusted by product teams shipping video at scale







Install
One install, one client, one call
Add the package, point the client at your Access Token and Secret Key, and you're talking to FastPix — strongly-typed, no scaffolding.
Install the package
bash · terminal
dotnet add package FastPix.SdkRuntime
.NET 8 LTS (and .NET 6 LTS supported).
Type safety
C# 11 records with nullable reference types enabled.
IDE support
Visual Studio, JetBrains Rider, VS Code with C# Dev Kit.
Initialize the client
C# · Program.cs
using FastPix;
var fp = new FastPixClient(new FastPixOptions
{
ApiKey = Environment.GetEnvironmentVariable("FASTPIX_API_KEY")!,
});Common operations
From upload to playback in 4 calls
Encode, wait, stream, upload. The four most common flows, typed end-to-end.
1. Encode a source URL into a playback ID
var asset = await fp.Assets.CreateAsync(new AssetCreateRequest
{
Inputs = [new AssetInput { Url = "https://your-cdn.com/source.mp4" }],
PlaybackPolicy = PlaybackPolicy.Public,
}, ct);
Console.WriteLine(asset.PlaybackId); // "abc123"2. Wait until the asset is ready
// Poll until the asset is ready, or listen for the asset.ready webhook.
var ready = await fp.Assets.WaitUntilReadyAsync(asset.Id,
new WaitOptions
{
PollInterval = TimeSpan.FromSeconds(2),
Timeout = TimeSpan.FromMinutes(5),
}, ct);3. Provision a low-latency live stream
var stream = await fp.Live.CreateAsync(new LiveStreamCreateRequest
{
LatencyMode = LatencyMode.Low, // LL-HLS
ReconnectWindowSeconds = 60,
PlaybackPolicy = PlaybackPolicy.Public,
}, ct);
// stream.StreamKey -> push to rtmp://global-live.fastpix.com/live4. Resumable chunked upload
// Resumable chunked upload from a worker service
using FastPix.Upload;
await ChunkedUpload.FromPathAsync(
endpoint: assetUploadUrl,
path: "./source.mp4",
new UploadOptions { ChunkSizeMb = 8 },
progress: new Progress<int>(pct => logger.LogInformation("{Pct}%", pct)),
ct);Security, compliance, and partnerships
Webhook signature verification
One helper, every event typed
Every webhook FastPix sends is signed. The SDK verifies the signature and returns a fully-typed event payload. Switch on event.type and reach the typed payload directly.
using FastPix.Webhooks;
app.MapPost("/webhooks/fastpix", async (HttpRequest request) =>
{
using var reader = new StreamReader(request.Body);
var payload = await reader.ReadToEndAsync();
var fpEvent = WebhookVerifier.Verify(
payload,
request.Headers["FastPix-Signature"]!,
Environment.GetEnvironmentVariable("FASTPIX_WEBHOOK_SECRET")!);
if (fpEvent is AssetReadyEvent assetReady)
{
// assetReady.Data is fully typed
}
return Results.NoContent();
});Concurrency model
Built for the .NET runtime
Every async method takes a CancellationToken. The default HttpMessageHandler uses HTTP/2 with a pooled connection per origin. Register FastPixClient as a singleton in the DI container; it is thread-safe across the entire process. IAsyncEnumerable is used for paged endpoints.
Type safety + IDE support
C# 11 records throughout. Nullable reference types enabled by default. Webhook events are a sealed type hierarchy; pattern-matching with `is` is exhaustive at the compiler level via the [JsonPolymorphic] attribute discriminator.
Migration
Swap the client, keep the shape
FastPix exposes primitives that mirror the closest API peer. The .NET SDK keeps the call shapes recognizable so the migration is a one-file swap, not a rewrite. FastPix vs Mux side-by-side.
// Before: using OtherVendor.Sdk.Api;
// FastPix:
using FastPix;
var fp = new FastPixClient(new FastPixOptions
{
ApiKey = Environment.GetEnvironmentVariable("FASTPIX_API_KEY")!,
});
// Before: var asset = await assetsApi.CreateAssetAsync(req);
// FastPix:
var asset = await fp.Assets.CreateAsync(new AssetCreateRequest
{
Inputs = [new AssetInput { Url = url }],
PlaybackPolicy = PlaybackPolicy.Public,
}, ct);
// Before: asset.Data.PlaybackIds[0].Id;
// FastPix:
asset.PlaybackId;Bulk migration tooling at /compare/mux and the docs migration guide handles asset re-ingest and playback-ID remap.
FAQ
.NET SDK FAQ
What does the .NET SDK ship with out of the box?
All API surfaces (assets, live streams, playback policies, webhooks, simulcast, analytics query) plus the resumable chunked upload helper, webhook signature verification, automatic retries with exponential backoff, and configurable timeout / base URL / HTTP client. Type definitions are bundled.Is the .NET SDK production-ready?
Yes. The client is used in production by FastPix customers shipping video on the .NET runtime. The retry policy, connection pool defaults, and timeout shape are tuned against the same workload patterns that produce the numbers on the /performance page.How do I authenticate against the FastPix API from .NET?
Set the FASTPIX_API_KEY environment variable and pass it to the client constructor. The SDK adds the Bearer header on every request. For server-side runtimes, fetching the API key from your secret store at startup and constructing the client once at module load is the recommended pattern.Where do I get an API key?
Sign up at the FastPix dashboard. The free trial provisions a key with no credit card; the trial plan covers 10 videos plus 100K streaming minutes plus AI samples. See /pricing for the full plan structure.
Read it, run it, ship it.
Every SDK, player, and integration lives on GitHub. Star the repos, file an issue, or open a PR — we build alongside the developers who use us.
Continue exploring
Where the .NET SDK plugs in
Video on Demand
Encode + store + deliver via this SDK.
Video on DemandLive Streaming
Provision LL-HLS streams from .NET.
Live StreamingIn-Video AI
Captions, NER, summary, moderation API surfaces.
In-Video AIVideo Data
56-dim per-session QoE query API.
Video DataAll developer docs
Other SDKs + API reference + webhooks.
Developer docsPricing
SKU-by-SKU rates.
Pricing