Skip to content

Fal

Nuget package dotnet License: MIT Discord

Features 🔥

  • Fully generated C# SDK based on official Fal.ai OpenAPI specification using AutoSDK
  • Same day update to support new features
  • Updated and supported automatically if there are no breaking changes
  • All modern .NET features - nullability, trimming, NativeAOT, etc.

Usage

1
2
3
using Fal;

using var client = new FalClient(apiKey);

Apps Get Meta Returns Platform Metadata

1
2
3
var client = GetAuthorizedApi();

var response = await client.Meta.GetMetaAsync();

Apps Get Pricing Returns Price For Endpoint

1
2
3
4
var client = GetAuthorizedApi();

var response = await client.Models.GetPricingAsync(
    endpointId: "fal-ai/flux/dev");

Apps Search Requests Returns Results

1
2
3
4
var client = GetAuthorizedApi();

var response = await client.Models.SearchRequestsAsync(
    limit: 5);

Billing Get Account Billing Returns Username

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
var client = GetAuthorizedApi();

try
{
    var response = await client.Account.GetAccountBillingAsync();

}
catch (ApiException ex) when (ex.Message.Contains("Admin API key"))
{
}

Billing Get Usage Returns Usage Data

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
var client = GetAuthorizedApi();

try
{
    var response = await client.Models.GetUsageAsync(limit: 5);

}
catch (ApiException ex) when (ex.Message.Contains("Admin API key"))
{
}

Secrets

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
var client = GetAuthorizedApi();

try
{
    var response = await client.Keys.ListApiKeysAsync(limit: 10);

}
catch (ApiException ex) when (ex.Message.Contains("Admin API key"))
{
}

Support

Priority place for bugs: https://github.com/tryAGI/Fal/issues Priority place for ideas and general questions: https://github.com/tryAGI/Fal/discussions Discord: https://discord.gg/Ca2xhfBf3v

Acknowledgments

JetBrains logo

This project is supported by JetBrains through the Open Source Support Program.