https://github.com/tryagi/replicate
Generated C# SDK based on official Replicate OpenAPI specification
https://github.com/tryagi/replicate
ai api csharp dotnet generated langchain langchain-dotnet llm llms net6 nswag openapi replicate sdk
Last synced: 4 months ago
JSON representation
Generated C# SDK based on official Replicate OpenAPI specification
- Host: GitHub
- URL: https://github.com/tryagi/replicate
- Owner: tryAGI
- License: mit
- Created: 2023-07-31T23:10:43.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-12T06:31:28.000Z (5 months ago)
- Last Synced: 2025-05-13T01:16:08.761Z (5 months ago)
- Topics: ai, api, csharp, dotnet, generated, langchain, langchain-dotnet, llm, llms, net6, nswag, openapi, replicate, sdk
- Language: C#
- Homepage: https://tryagi.github.io/Replicate/
- Size: 730 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Replicate
[](https://www.nuget.org/packages/tryAGI.Replicate/)
[](https://github.com/tryAGI/Replicate/actions/workflows/dotnet.yml)
[](https://github.com/tryAGI/Replicate/blob/main/LICENSE.txt)
[](https://discord.gg/Ca2xhfBf3v)## Features 🔥
- Fully generated C# SDK based on [official Replicate OpenAPI specification](https://api.replicate.com/openapi.json) using [OpenApiGenerator](https://github.com/HavenDV/OpenApiGenerator)
- 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.
- Support .Net Framework/.Net Standard 2.0## Documentation
Examples and documentation can be found here: https://tryagi.github.io/Replicate/### Usage
```csharp
using Replicate;using var api = new ReplicateApi(apiKey);
var response = await api.ModelsPredictionsCreateAsync(
input: new PredictionRequestInput
{
AdditionalProperties = new Dictionary
{
["seed"] = Random.Shared.Next(0, 1000000),
["steps"] = 25,
["prompt"] = "a female, european, young adult, fit body, wavy acid orange hair, wearing open swimsuit, sea in the background.",
["guidance"] = 3.5,
["interval"] = 3,
["aspect_ratio"] = "16:9",
["safety_tolerance"] = 5,
},
},
prefer: "wait=60",
modelOwner: "black-forest-labs",
modelName: "flux-pro");
var endResponse = await response.WaitUntilSuccessfulAsync(api);Console.WriteLine($@"Seed: {endResponse.Input?.Seed}.
Image available at:\n{endResponse.Output}");
```
## Support
Priority place for bugs: https://github.com/tryAGI/Replicate/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Replicate/discussions
Discord: https://discord.gg/Ca2xhfBf3v## Acknowledgments

This project is supported by JetBrains through the [Open Source Support Program](https://jb.gg/OpenSourceSupport).

This project is supported by CodeRabbit through the [Open Source Support Program](https://github.com/marketplace/coderabbitai).