Skip to content

Haiper

Modern .NET SDK for Haiper generated from the provider's OpenAPI definition with AutoSDK.

Nuget package dotnet License: MIT Discord

Generated from the source spec

Built from Haiper's OpenAPI definition so the SDK stays close to the upstream API surface.

Auto-updated

Designed for fast regeneration and low-friction updates when the upstream API changes without breaking compatibility.

Modern .NET

Targets current .NET practices including nullability, trimming, NativeAOT awareness, and source-generated serialization.

Docs from examples

Examples stay in sync between the README, MkDocs site, and integration tests through the AutoSDK docs pipeline.

Usage

1
2
3
using Haiper;

using var client = new HaiperClient(apiKey);

Text-to-video

Create a Haiper 2.x text-to-video generation and receive a generation id.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
using var client = new HaiperClient(apiKey);

var response = await client.CreateTextToVideoAsync(new TextToVideoRequest
{
    Prompt = "A sweeping drone shot over a futuristic seaside city at sunrise.",
    GenMode = TextToVideoRequestGenMode.Standard,
    Settings = new VideoSettings
    {
        AspectRatio = VideoSettingsAspectRatio.x16_9,
        Duration = 4,
    },
    IsPublic = false,
});

Get creation status

Check the status of an existing Haiper creation.

1
2
3
4
5
6
7
8
using var client = new HaiperClient(apiKey);

var creationId =
    Environment.GetEnvironmentVariable("HAIPER_CREATION_ID") is { Length: > 0 } value
        ? value
        : throw new AssertInconclusiveException("HAIPER_CREATION_ID environment variable is not found.");

var response = await client.GetCreationStatusAsync(creationId);

Support

Bugs

Open an issue in tryAGI/Haiper.

Ideas and questions

Use GitHub Discussions for design questions and usage help.

Community

Join the tryAGI Discord for broader discussion across SDKs.

Acknowledgments

JetBrains logo

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