{"id":40689529,"url":"https://github.com/fastpix/fastpix-sdk-csharp","last_synced_at":"2026-01-21T11:03:53.552Z","repository":{"id":295975495,"uuid":"991888478","full_name":"FastPix/fastpix-sdk-csharp","owner":"FastPix","description":"FastPix C# SDK offers a secure, high-performance interface to the FastPix API—simplifying media uploads, live streaming, and simulcasting.","archived":false,"fork":false,"pushed_at":"2026-01-20T13:34:55.000Z","size":6953,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-20T22:11:21.305Z","etag":null,"topics":["csharp-fastpix-sdk","csharp-sdk","fastpix","live-streaming","media-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FastPix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-28T09:49:06.000Z","updated_at":"2026-01-20T13:34:59.000Z","dependencies_parsed_at":"2025-10-22T08:36:06.894Z","dependency_job_id":null,"html_url":"https://github.com/FastPix/fastpix-sdk-csharp","commit_stats":null,"previous_names":["fastpix/fastpix-sdk-csharp"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/FastPix/fastpix-sdk-csharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastPix%2Ffastpix-sdk-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastPix%2Ffastpix-sdk-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastPix%2Ffastpix-sdk-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastPix%2Ffastpix-sdk-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FastPix","download_url":"https://codeload.github.com/FastPix/fastpix-sdk-csharp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastPix%2Ffastpix-sdk-csharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28632273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp-fastpix-sdk","csharp-sdk","fastpix","live-streaming","media-api"],"created_at":"2026-01-21T11:03:46.800Z","updated_at":"2026-01-21T11:03:53.539Z","avatar_url":"https://github.com/FastPix.png","language":"C#","readme":"# FastPix C# SDK\n\nA robust, type-safe C# SDK designed for seamless integration with the FastPix API platform.\n\n## Introduction\n\nThe FastPix C# SDK simplifies integration with the FastPix platform. It provides a clean, strongly-typed interface for secure and efficient communication with the FastPix API, enabling easy management of media uploads, live streaming, on‑demand content, playlists, video analytics, and signing keys for secure access and token management. It is intended for use with .NET 8.0 and above.\n\n## Prerequisites\n\n### Environment and Version Support\n\n| Requirement | Version | Description |\n|---|---:|---|\n| .NET | `8.0+` | Core runtime environment |\n| NuGet | `Latest` | Package manager for dependencies |\n| Internet | `Required` | API communication and authentication |\n\n\u003e Pro Tip: We recommend using .NET 8.0+ for optimal performance and the latest language features.\n\n### Getting Started with FastPix\n\nTo get started with the FastPix C# SDK, ensure you have the following:\n\n- The FastPix APIs are authenticated using a **Username** and a **Password**. You must generate these credentials to use the SDK.\n- Follow the steps in the [Authentication with Basic Auth](https://docs.fastpix.io/docs/basic-authentication) guide to obtain your credentials.\n\n### Environment Variables (Optional)\n\nConfigure your FastPix credentials using environment variables for enhanced security and convenience:\n\n```bash\n# Set your FastPix credentials\nexport FASTPIX_USERNAME=\"your-access-token\"\nexport FASTPIX_PASSWORD=\"your-secret-key\"\n```\n\n\u003e Security Note: Never commit your credentials to version control. Use environment variables or secure credential management systems.\n\n## Table of Contents\n\n* [FastPix C# SDK](#fastpix-c-sdk)\n  * [Setup](#setup)\n  * [Example Usage](#example-usage)\n  * [Available Resources and Operations](#available-resources-and-operations)\n  * [Retries](#retries)\n  * [Error Handling](#error-handling)\n  * [Server Selection](#server-selection)\n  * [Custom HTTP Client](#custom-http-client)\n  * [Development](#development)\n\n## Setup\n\n### Installation\n\nInstall the FastPix C# SDK using your preferred package manager:\n\n#### .NET CLI\n\n```bash\ndotnet add package Fastpix\n```\n\n#### NuGet Package Manager\n\nIn Visual Studio, open the Package Manager Console and run:\n\n```bash\nInstall-Package Fastpix\n```\n\n#### Local Reference\n\nTo add a reference to a local instance of the SDK in a .NET project:\n\n```bash\ndotnet add reference src/Fastpix/Fastpix.csproj\n```\n\n### Imports\n\nThe SDK uses standard C# namespaces. Import the necessary namespaces at the top of your files:\n\n```csharp\nusing Fastpix;\nusing Fastpix.Models.Components;\nusing Fastpix.Models.Requests;\nusing System.Collections.Generic;\n```\n\n### Initialization\n\nInitialize the FastPix SDK with your credentials:\n\n```csharp\nusing Fastpix;\nusing Fastpix.Models.Components;\n\nvar sdk = new FastpixSDK(security: new Security() {\n    Username = \"your-access-token\",\n    Password = \"your-secret-key\",\n});\n```\n\nOr using environment variables:\n\n```csharp\nusing Fastpix;\nusing Fastpix.Models.Components;\nusing System;\n\nvar sdk = new FastpixSDK(security: new Security() {\n    Username = Environment.GetEnvironmentVariable(\"FASTPIX_USERNAME\"), // Your Access Token\n    Password = Environment.GetEnvironmentVariable(\"FASTPIX_PASSWORD\"), // Your Secret Key\n});\n```\n\n## Example Usage\n\n```csharp\nusing Fastpix;\nusing Fastpix.Models.Components;\nusing System.Collections.Generic;\n\nvar sdk = new FastpixSDK(security: new Security() {\n    Username = \"your-access-token\",\n    Password = \"your-secret-key\",\n});\n\nvar req = new CreateMediaRequest() {\n    Inputs = new List\u003cFastpix.Models.Components.Input\u003e() {\n        Fastpix.Models.Components.Input.CreatePullVideoInput(\n            new PullVideoInput() {}\n        ),\n    },\n    Metadata = new Dictionary\u003cstring, string\u003e() {\n        { \"\u003ckey\u003e\", \"\u003cvalue\u003e\" },\n    },\n};\n\nvar res = await sdk.InputVideo.CreateMediaAsync(req);\n\n// handle response\n```\n\n## Available Resources and Operations\n\nComprehensive C# SDK for FastPix platform integration with full API coverage.\n\n### Media API\n\nUpload, manage, and transform video content with comprehensive media management capabilities.\n\nFor detailed documentation, see [FastPix Video on Demand Overview](https://docs.fastpix.io/docs/video-on-demand-overview).\n\n#### Input Video\n- [Create from URL](docs/sdks/inputvideo/README.md#createmedia) - Upload video content from external URL\n- [Upload from Device](docs/sdks/inputvideo/README.md#upload) - Upload video files directly from device\n\n#### Manage Videos\n- [List All Media](docs/sdks/managevideos/README.md#list) - Retrieve complete list of all media files\n- [Get Media by ID](docs/sdks/managevideos/README.md#getbyid) - Get detailed information for specific media\n- [Update Media](docs/sdks/videos/README.md#update) - Modify media metadata and settings\n- [Delete Media](docs/sdks/managevideos/README.md#deletemedia) - Remove media files from library\n- [Cancel Upload](docs/sdks/managevideos/README.md#cancelupload) - Stop ongoing media upload process\n- [Get Input Info](docs/sdks/videos/README.md#getinputinfo) - Retrieve detailed input information\n- [List Uploads](docs/sdks/managevideos/README.md#listuploads) - Get all available upload URLs\n- [List Clips](docs/sdks/managevideos/README.md#listclips) - Get all clips of a media\n\n#### Playback\n- [Create Playback ID](docs/sdks/playback/README.md#create) - Generate secure playback identifier\n- [List Playback IDs](docs/sdks/playback/README.md#list) - Get all playback IDs for a media\n- [Delete Playback ID](docs/sdks/playback/README.md#delete) - Remove playback access\n- [Get Playback ID](docs/sdks/playbacks/README.md#get) - Retrieve playback configuration details\n- [Update Domain Restrictions](docs/sdks/playback/README.md#updatedomainrestrictions) - Update domain restrictions for a playback ID\n- [Update User-Agent Restrictions](docs/sdks/playback/README.md#updateuseragentrestrictions) - Update user-agent restrictions for a playback ID\n\n#### Playlist\n- [Create Playlist](docs/sdks/playlist/README.md#create) - Create new video playlist\n- [List Playlists](docs/sdks/playlists/README.md#getall) - Get all available playlists\n- [Get Playlist](docs/sdks/playlists/README.md#get) - Retrieve specific playlist details\n- [Update Playlist](docs/sdks/playlists/README.md#update) - Modify playlist settings and metadata\n- [Delete Playlist](docs/sdks/playlists/README.md#delete) - Remove playlist from library\n- [Add Media](docs/sdks/playlists/README.md#addmedia) - Add media items to playlist\n- [Reorder Media](docs/sdks/playlists/README.md#reordermedia) - Change order of media in playlist\n- [Remove Media](docs/sdks/playlists/README.md#deletemedia) - Remove media from playlist\n\n#### Signing Keys\n- [Create Key](docs/sdks/signingkeys/README.md#create) - Generate new signing key pair\n- [List Keys](docs/sdks/signingkeys/README.md#list) - Get all available signing keys\n- [Delete Key](docs/sdks/signingkeys/README.md#delete) - Remove signing key from system\n- [Get Key](docs/sdks/signingkeys/README.md#getbyid) - Retrieve specific signing key details\n\n#### DRM Configurations\n- [List DRM Configs](docs/sdks/drmconfigurations/README.md#list) - Get all DRM configuration options\n- [Get DRM Config](docs/sdks/drmconfigurations/README.md#getbyid) - Retrieve specific DRM configuration\n\n### Live API\n\nStream, manage, and transform live video content with real-time broadcasting capabilities.\n\nFor detailed documentation, see [FastPix Live Stream Overview](https://docs.fastpix.io/docs/live-stream-overview).\n\n#### Start Live Stream\n- [Create Stream](docs/sdks/livestreams/README.md#create) - Initialize new live streaming session\n\n#### Manage Live Stream\n- [List Streams](docs/sdks/livestreams/README.md#getall) - Retrieve all active live streams\n- [Get Viewer Count](docs/sdks/livestreams/README.md#getviewercount) - Get real-time viewer statistics\n- [Get Stream](docs/sdks/livestreams/README.md#getbyid) - Retrieve detailed stream information\n- [Delete Stream](docs/sdks/livestreams/README.md#delete) - Terminate and remove live stream\n- [Update Stream](docs/sdks/streams/README.md#update) - Modify stream settings and configuration\n- [Enable Stream](docs/sdks/managelivestream/README.md#enable) - Activate live streaming\n- [Disable Stream](docs/sdks/managelivestream/README.md#disable) - Pause live streaming\n- [Complete Stream](docs/sdks/livestreams/README.md#complete) - Finalize and archive stream\n\n#### Live Playback\n- [Create Playback ID](docs/sdks/liveplayback/README.md#create) - Generate secure live playback access\n- [Delete Playback ID](docs/sdks/liveplayback/README.md#deleteplaybackid) - Revoke live playback access\n- [Get Playback ID](docs/sdks/liveplayback/README.md#getplaybackdetails) - Retrieve live playback configuration\n\n#### Simulcast Stream\n- [Create Simulcast](docs/sdks/simulcasts/README.md#create) - Set up multi-platform streaming\n- [Delete Simulcast](docs/sdks/simulcasts/README.md#delete) - Remove simulcast configuration\n- [Get Simulcast](docs/sdks/simulcaststream/README.md#getspecific) - Retrieve simulcast settings\n- [Update Simulcast](docs/sdks/simulcasts/README.md#update) - Modify simulcast parameters\n\n### Video Data API\n\nMonitor video performance and quality with comprehensive analytics and real-time metrics.\n\nFor detailed documentation, see [FastPix Video Data Overview](https://docs.fastpix.io/docs/video-data-overview).\n\n#### Metrics\n- [List Breakdown Values](docs/sdks/metrics/README.md#listbreakdownvalues) - Get detailed breakdown of metrics by dimension\n- [List Overall Values](docs/sdks/metrics/README.md#listoverallvalues) - Get aggregated metric values across all content\n- [Get Timeseries Data](docs/sdks/metrics/README.md#gettimeseriesdata) - Retrieve time-based metric trends and patterns\n- [Compare Values](docs/sdks/metrics/README.md#compare) - List comparison values\n\n#### Views\n- [List Video Views](docs/sdks/views/README.md#list) - Get comprehensive list of video viewing sessions\n- [Get View Details](docs/sdks/views/README.md#getviewdetails) - Retrieve detailed information about specific video views\n- [List Top Content](docs/sdks/views/README.md#listbytopcontent) - Find your most popular and engaging content\n\n#### Dimensions\n- [List Dimensions](docs/sdks/dimensions/README.md#list) - Get available data dimensions for filtering and analysis\n- [List Filter Values](docs/sdks/dimensions/README.md#listfilters) - Get specific values for a particular dimension\n\n#### Errors\n- [List Errors](docs/sdks/errors/README.md#list) - Get list of playback errors\n\n### Transformations\n\nTransform and enhance your video content with powerful AI and editing capabilities.\n\n#### In-Video AI Features\n\nEnhance video content with AI-powered features including moderation, summarization, and intelligent categorization.\n\n- [Update Summary](docs/sdks/invideoaifeatures/README.md#updatesummary) - Create AI-generated video summaries\n- [Update Chapters](docs/sdks/invideoai/README.md#updatemediachapters) - Automatically generate video chapter markers\n- [Extract Entities](docs/sdks/invideoai/README.md#updatenamedentities) - Identify and extract named entities from content\n- [Enable Moderation](docs/sdks/moderations/README.md#update) - Activate content moderation and safety checks\n\n#### Media Clips\n\n- [List Live Clips](docs/sdks/videos/README.md#listliveclips) - Get all clips of a live stream\n- [List Media Clips](docs/sdks/managevideos/README.md#listclips) - Retrieve all clips associated with a source media\n\n#### Subtitles\n\n- [Generate Subtitles](docs/sdks/managevideos/README.md#generatesubtitles) - Create automatic subtitles for media\n\n#### Media Tracks\n\n- [Add Track](docs/sdks/managevideos/README.md#addmediatrack) - Add audio or subtitle tracks to media\n- [Update Track](docs/sdks/videos/README.md#updatetrack) - Modify existing audio or subtitle tracks\n- [Delete Track](docs/sdks/tracks/README.md#delete) - Remove audio or subtitle tracks\n\n#### Access Control\n\n- [Update Source Access](docs/sdks/managevideos/README.md#updatesourceaccess) - Control access permissions for media source\n\n#### Format Support\n\n- [Update MP4 Support](docs/sdks/managevideos/README.md#updatemp4support) - Configure MP4 download capabilities\n\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\u003c!-- Start Retries [retries] --\u003e\n## Retries\n\nSome of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.\n\nTo change the default retry strategy for a single API call, simply pass a `RetryConfig` to the call:\n\n```csharp\nusing Fastpix;\nusing Fastpix.Models.Components;\nusing Fastpix.Utils.Retries;\nusing System.Collections.Generic;\n\nvar sdk = new FastpixSDK(security: new Security() {\n    Username = \"your-access-token\",\n    Password = \"your-secret-key\",\n});\n\nCreateMediaRequest req = new CreateMediaRequest() {\n    Inputs = new List\u003cFastpix.Models.Components.Input\u003e() {\n        Fastpix.Models.Components.Input.CreatePullVideoInput(\n            new PullVideoInput() {}\n        ),\n    },\n    Metadata = new Dictionary\u003cstring, string\u003e() {\n        { \"\u003ckey\u003e\", \"\u003cvalue\u003e\" },\n    },\n};\n\nvar res = await sdk.InputVideo.CreateMediaAsync(\n    retryConfig: new RetryConfig(\n        strategy: RetryConfig.RetryStrategy.BACKOFF,\n        backoff: new BackoffStrategy(\n            initialIntervalMs: 1L,\n            maxIntervalMs: 50L,\n            maxElapsedTimeMs: 100L,\n            exponent: 1.1\n        ),\n        retryConnectionErrors: false\n    ),\n    request: req\n);\n\n// handle response\n```\n\nIf you'd like to override the default retry strategy for all operations that support retries, you can use the `RetryConfig` optional parameter when initializing the SDK:\n\n```csharp\nusing Fastpix;\nusing Fastpix.Models.Components;\nusing Fastpix.Utils.Retries;\nusing System.Collections.Generic;\n\nvar sdk = new FastpixSDK(\n    retryConfig: new RetryConfig(\n        strategy: RetryConfig.RetryStrategy.BACKOFF,\n        backoff: new BackoffStrategy(\n            initialIntervalMs: 1L,\n            maxIntervalMs: 50L,\n            maxElapsedTimeMs: 100L,\n            exponent: 1.1\n        ),\n        retryConnectionErrors: false\n    ),\n    security: new Security() {\n        Username = \"your-access-token\",\n        Password = \"your-secret-key\",\n    }\n);\n\nCreateMediaRequest req = new CreateMediaRequest() {\n    Inputs = new List\u003cFastpix.Models.Components.Input\u003e() {\n        Fastpix.Models.Components.Input.CreatePullVideoInput(\n            new PullVideoInput() {}\n        ),\n    },\n    Metadata = new Dictionary\u003cstring, string\u003e() {\n        { \"\u003ckey\u003e\", \"\u003cvalue\u003e\" },\n    },\n};\n\nvar res = await sdk.InputVideo.CreateMediaAsync(req);\n\n// handle response\n```\n\u003c!-- End Retries [retries] --\u003e\n\n\u003c!-- Start Error Handling [errors] --\u003e\n## Error Handling\n\n[`FastpixException`](./src/Fastpix/Models/Errors/FastpixException.cs) is the base exception class for all HTTP error responses. It has the following properties:\n\n| Property      | Type                  | Description           |\n|---------------|-----------------------|-----------------------|\n| `Message`     | *string*              | Error message         |\n| `Request`     | *HttpRequestMessage*  | HTTP request object   |\n| `Response`    | *HttpResponseMessage* | HTTP response object  |\n| `Body`        | *string*              | HTTP response body    |\n\n### Example\n\n```csharp\nusing Fastpix;\nusing Fastpix.Models.Components;\nusing Fastpix.Models.Errors;\nusing System.Collections.Generic;\n\nvar sdk = new FastpixSDK(security: new Security() {\n    Username = \"your-access-token\",\n    Password = \"your-secret-key\",\n});\n\ntry\n{\n    CreateMediaRequest req = new CreateMediaRequest() {\n        Inputs = new List\u003cFastpix.Models.Components.Input\u003e() {\n            Fastpix.Models.Components.Input.CreatePullVideoInput(\n                new PullVideoInput() {}\n            ),\n        },\n        Metadata = new Dictionary\u003cstring, string\u003e() {\n            { \"\u003ckey\u003e\", \"\u003cvalue\u003e\" },\n        },\n    };\n\n    var res = await sdk.InputVideo.CreateMediaAsync(req);\n\n    // handle response\n}\ncatch (FastpixException ex)  // all SDK exceptions inherit from FastpixException\n{\n    // ex.ToString() provides a detailed error message\n    System.Console.WriteLine(ex);\n\n    // Base exception fields\n    HttpRequestMessage request = ex.Request;\n    HttpResponseMessage response = ex.Response;\n    var statusCode = (int)response.StatusCode;\n    var responseBody = ex.Body;\n}\ncatch (OperationCanceledException ex)\n{\n    // CancellationToken was cancelled\n}\ncatch (System.Net.Http.HttpRequestException ex)\n{\n    // Check ex.InnerException for Network connectivity errors\n}\n```\n\n### Error Classes\n\n**Primary exception:**\n* [`FastpixException`](./src/Fastpix/Models/Errors/FastpixException.cs): The base class for HTTP error responses.\n\n\u003cdetails\u003e\u003csummary\u003eLess common exceptions (2)\u003c/summary\u003e\n\n* [`System.Net.Http.HttpRequestException`](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httprequestexception): Network connectivity error. For more details about the underlying cause, inspect the `ex.InnerException`.\n\n* Inheriting from [`FastpixException`](./src/Fastpix/Models/Errors/FastpixException.cs):\n  * [`ResponseValidationError`](./src/Fastpix/Models/Errors/ResponseValidationError.cs): Thrown when the response data could not be deserialized into the expected type.\n\u003c/details\u003e\n\u003c!-- End Error Handling [errors] --\u003e\n\n\u003c!-- Start Server Selection [server] --\u003e\n## Server Selection\n\n### Override Server URL Per-Client\n\nThe default server can be overridden globally by passing a URL to the `serverUrl: string` optional parameter when initializing the SDK client instance. For example:\n\n```csharp\nusing Fastpix;\nusing Fastpix.Models.Components;\nusing System.Collections.Generic;\n\nvar sdk = new FastpixSDK(\n    serverUrl: \"\u003cserver-url\u003e\",\n    security: new Security() {\n        Username = \"your-access-token\",\n        Password = \"your-secret-key\",\n    }\n);\n\nCreateMediaRequest req = new CreateMediaRequest() {\n    Inputs = new List\u003cFastpix.Models.Components.Input\u003e() {\n        Fastpix.Models.Components.Input.CreatePullVideoInput(\n            new PullVideoInput() {}\n        ),\n    },\n    Metadata = new Dictionary\u003cstring, string\u003e() {\n        { \"\u003ckey\u003e\", \"\u003cvalue\u003e\" },\n    },\n};\n\nvar res = await sdk.InputVideo.CreateMediaAsync(req);\n\n// handle response\n```\n\u003c!-- End Server Selection [server] --\u003e\n\n\u003c!-- Start Custom HTTP Client [http-client] --\u003e\n## Custom HTTP Client\n\nThe C# SDK makes API calls using an `IFastpixHttpClient` that wraps the native\n[HttpClient](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient). This\nclient provides the ability to attach hooks around the request lifecycle that can be used to modify the request or handle\nerrors and response.\n\nThe `IFastpixHttpClient` interface allows you to either use the default `FastpixHttpClient` that comes with the SDK,\nor provide your own custom implementation with customized configuration such as custom message handlers, timeouts,\nconnection pooling, and other HTTP client settings.\n\nThe following example shows how to create a custom HTTP client with request modification and error handling:\n\n```csharp\nusing Fastpix;\nusing Fastpix.Utils;\nusing System.Net.Http;\nusing System.Threading;\nusing System.Threading.Tasks;\n\n// Create a custom HTTP client\npublic class CustomHttpClient : IFastpixHttpClient\n{\n    private readonly IFastpixHttpClient _defaultClient;\n\n    public CustomHttpClient()\n    {\n        _defaultClient = new FastpixHttpClient();\n    }\n\n    public async Task\u003cHttpResponseMessage\u003e SendAsync(HttpRequestMessage request, CancellationToken? cancellationToken = null)\n    {\n        // Add custom header and timeout\n        request.Headers.Add(\"x-custom-header\", \"custom value\");\n        request.Headers.Add(\"x-request-timeout\", \"30\");\n        \n        try\n        {\n            var response = await _defaultClient.SendAsync(request, cancellationToken);\n            // Log successful response\n            Console.WriteLine($\"Request successful: {response.StatusCode}\");\n            return response;\n        }\n        catch (Exception error)\n        {\n            // Log error\n            Console.WriteLine($\"Request failed: {error.Message}\");\n            throw;\n        }\n    }\n\n    public void Dispose()\n    {\n        _defaultClient?.Dispose();\n    }\n}\n\n// Use the custom HTTP client with the SDK\nvar customHttpClient = new CustomHttpClient();\nvar sdk = new FastpixSDK(client: customHttpClient);\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eYou can also provide a completely custom HTTP client with your own configuration:\u003c/summary\u003e\n\n```csharp\nusing Fastpix.Utils;\nusing System.Net.Http;\nusing System.Threading;\nusing System.Threading.Tasks;\n\n// Custom HTTP client with custom configuration\npublic class AdvancedHttpClient : IFastpixHttpClient\n{\n    private readonly HttpClient _httpClient;\n\n    public AdvancedHttpClient()\n    {\n        var handler = new HttpClientHandler()\n        {\n            MaxConnectionsPerServer = 10,\n            // ServerCertificateCustomValidationCallback = customCertValidation, // Custom SSL validation if needed\n        };\n\n        _httpClient = new HttpClient(handler)\n        {\n            Timeout = TimeSpan.FromSeconds(30)\n        };\n    }\n\n    public async Task\u003cHttpResponseMessage\u003e SendAsync(HttpRequestMessage request, CancellationToken? cancellationToken = null)\n    {\n        return await _httpClient.SendAsync(request, cancellationToken ?? CancellationToken.None);\n    }\n\n    public void Dispose()\n    {\n        _httpClient?.Dispose();\n    }\n}\n\nvar sdk = new FastpixSDK(client: new AdvancedHttpClient());\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eFor simple debugging, you can enable request/response logging by implementing a custom client:\u003c/summary\u003e\n\n```csharp\npublic class LoggingHttpClient : IFastpixHttpClient\n{\n    private readonly IFastpixHttpClient _innerClient;\n\n    public LoggingHttpClient(IFastpixHttpClient innerClient = null)\n    {\n        _innerClient = innerClient ?? new FastpixHttpClient();\n    }\n\n    public async Task\u003cHttpResponseMessage\u003e SendAsync(HttpRequestMessage request, CancellationToken? cancellationToken = null)\n    {\n        // Log request\n        Console.WriteLine($\"Sending {request.Method} request to {request.RequestUri}\");\n        \n        var response = await _innerClient.SendAsync(request, cancellationToken);\n        \n        // Log response\n        Console.WriteLine($\"Received {response.StatusCode} response\");\n        \n        return response;\n    }\n\n    public void Dispose() =\u003e _innerClient?.Dispose();\n}\n\nvar sdk = new FastpixSDK(client: new LoggingHttpClient());\n```\n\u003c/details\u003e\n\nThe SDK also provides built-in hook support through the `SDKConfiguration.Hooks` system, which automatically handles\n`BeforeRequestAsync`, `AfterSuccessAsync`, and `AfterErrorAsync` hooks for advanced request lifecycle management.\n\u003c!-- End Custom HTTP Client [http-client] --\u003e\n\n\u003c!-- Placeholder for Future Fastpix SDK Sections --\u003e\n\n# Development\n\nThis C# SDK is programmatically generated from our API specifications. Any manual modifications to internal files will be overwritten during subsequent generation cycles. \n\nWe value community contributions and feedback. Feel free to submit pull requests or open issues with your suggestions, and we'll do our best to include them in future releases.\n\n## Detailed Usage\n\nFor comprehensive understanding of each API's functionality, including detailed request and response specifications, parameter descriptions, and additional examples, please refer to the [FastPix API Reference](https://docs.fastpix.io/reference/signingkeys-overview).\n\nThe API reference offers complete documentation for all available endpoints and features, enabling developers to integrate and leverage FastPix APIs effectively.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastpix%2Ffastpix-sdk-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastpix%2Ffastpix-sdk-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastpix%2Ffastpix-sdk-csharp/lists"}