C# SDK

Learn how to use FastPix C# SDK to build video apps with media upload, live stream, and playback.

Add secure, scalable video to your .NET project

The FastPix C# SDK gives you everything you need to manage video from your backend. Upload files from a public URL, attach metadata, and retrieve playback links, all without building encoding pipelines or managing storage. With this SDK, you can:

  • Upload and organize video assets
  • Define access control and metadata
  • Generate HLS playback URLs
  • Streamline video delivery from your .NET server

Find more in the SDK reference

To explore more examples, API methods, and advanced usage, see the FastPix C# SDK on GitHub.


Prerequisites

Before you start using the SDK, make sure you have the following:

  • .NET 8.0 or later: This SDK is compatible with .NET 8.0 or higher
  • Visual Studio 2022 or VS Code: Recommended IDE for C# development
  • NuGet Package Manager: Required for package management
  • FastPix API credentials: You’ll need an Access Token and a Secret Key. You can generate these credentials by following the steps in the Authentication guide
  • Basic understanding of C# and REST APIs: Familiarity with C# development and API integration concepts

Installation

Install the SDK using NuGet Package Manager Console:

$Install-Package Fastpix

Or using .NET CLI:

$dotnet add package Fastpix

Local Reference

To add a reference to a local instance of the SDK in a .NET project:

$dotnet add reference src/Fastpix/Fastpix.csproj

Import the SDK

1using Fastpix;
2using Fastpix.Models.Components;
3using Fastpix.Models.Requests;
4using System.Collections.Generic;

Example

Let’s create a file named Program.cs

This example shows how to upload a video from a public URL with metadata and public access:

NOTE
In the following example, replace your-access-token and your-secret-key with the Access Token ID and Secret Key values from the .env file you downloaded.

1using Fastpix;
2using Fastpix.Models.Components;
3using System.Collections.Generic;
4
5var sdk = new FastpixSDK(security: new Security() {
6 Username = "your-access-token",
7 Password = "your-secret-key",
8});
9
10var req = new CreateMediaRequest() {
11 Inputs = new List<Fastpix.Models.Components.Input>() {
12 Fastpix.Models.Components.Input.CreatePullVideoInput(
13 new PullVideoInput() {}
14 ),
15 },
16 Metadata = new Dictionary<string, string>() {
17 { "<key>", "<value>" },
18 },
19};
20
21var res = await sdk.InputVideo.CreateMediaAsync(req);
22
23// handle response

After the video is processed, you can use the media ID to fetch playback info, monitor status, or transform content through the API.


Run the example

To execute the C# program, use the following command. Make sure to replace Program.cs with your actual file name if it’s different:

$dotnet run

NOTE
Some methods might throw errors when you are on a trial plan.


Changelog

All notable changes to this project will be documented in this file.


[1.1.4]

Changed

  • SDK version bump: 1.1.31.1.4. A maintenance release that updates the SDK’s internal version identifiers. It contains no functional, API, or behavioral changes and is fully backward compatible with 1.1.3.

    Updated identifiers:

    • Package <Version> — bumped 1.1.31.1.4.
    • SdkVersion constant — now reports 1.1.4 (kept in sync with the package version).
    • User-Agent header — outbound requests now identify as fastpix-sdk/csharp 1.1.4. This value was previously lagging at 1.1.2 and is now aligned with the package version.

Compatibility

  • No changes to public types, method signatures, request/response models, default server URLs, hooks, or retry logic.
  • No action required for existing integrations — update the dependency and rebuild.

[1.1.3]

⚠️ Important — FastPix is migrating from .io to .com

All FastPix hosts and documentation links are moving to the .com TLD:

Old (.io)New (.com)
api.fastpix.ioapi.fastpix.com
stream.fastpix.iostream.fastpix.com
images.fastpix.ioimages.fastpix.com
dashboard.fastpix.iodashboard.fastpix.com
www.fastpix.iowww.fastpix.com
docs.fastpix.io/...fastpix.com/docs/...

The .io hosts continue to serve traffic during the transition, but they are slated for deprecation soon — please update any hard-coded references in your application as part of your next deploy. We strongly recommend upgrading to this SDK release (or later) across every language you use — every official FastPix SDK is being rolled out with the same migration.

What this means for users of the Fastpix C# SDK:

  • If you rely on SDK defaults, no code change is required. The default server URL is https://api.fastpix.com/v1/, so updating the Fastpix package to 1.1.3 (e.g. dotnet add package Fastpix --version 1.1.3) is enough.
  • If you have an explicit server URL override (e.g. new FastpixSDK(serverUrl: "https://api.fastpix.io/v1/") or FastpixSDK.Builder().WithServerUrl("https://api.fastpix.io/v1/")), change it to https://api.fastpix.com/v1/.
  • If you reference FastPix asset URLs directly in your app (HLS playback URLs, image CDN, dashboard deep links), update those to the .com equivalents before .io is decommissioned.

All README and per-SDK doc links in this package have been updated to point at the new https://fastpix.com/docs/... URLs.

Fixed (SDK ↔ API parity)

  • ManageVideos.ListAsync (/on-demand): tracks now include frameRate, which was being silently dropped by the previous SDK build (the field was present in the spec but missing from the generated VideoTrackForGetAll model).
  • SigningKeys.DeleteAsync: response shape now includes the optional data.message confirmation string the API has been returning.

Docs

  • All README and per-service documentation pages updated from docs.fastpix.io/... and docs.fastpix.com/... to the new https://fastpix.com/docs/... URL structure.

[1.1.2]

Fixed

  • Fixed data event field remapping in hooks.

[1.1.1]

  • Updated documentation redirection links in README.md.

[1.1.0]

  • Fixed missing parameters in multiple API methods.
  • Improved overall developer experience through more accurate typings.

[1.0.0]

This release introduces a C#-modified version of the SDK.

  • It is a generated-code-based SDK, and direct contributions or pull requests are not accepted.
  • Instead of modifying the code directly, users are encouraged to open issues for bug reports or feature suggestions.
  • Refer to the CONTRIBUTING.md for full contribution guidelines, including how to:
    • Report issues clearly with steps to reproduce
    • Share relevant logs, screenshots, or environment details
  • The SDK changes in this version aim to improve compatibility with C# environments and follow platform-specific conventions.
  • All fixes or improvements will be included in the next code generation cycle.

[0.1.2]

  • Redirection links were corrected for all the methods listed under “Available Resources and Operations” in the README.md, ensuring users are routed to the appropriate documentation.

[0.1.1]

  • Codebase updated to reflect consistent naming conventions, improving overall clarity and maintainability.

[0.1.0]

Initial release of the SDK.

  • Media API:
    • Upload media assets
    • List, fetch, update, and delete media
    • Generate and manage playback IDs
  • Live API:
    • Create, list, update, and delete live streams
    • Generate and manage playback IDs
    • Support simulcasting to multiple platforms
  • Designed for secure and efficient communication with the FastPix API