Modern .NET SDK for MiniMax generated from the provider's OpenAPI definition with AutoSDK.
Built from a hand-maintained OpenAPI definition derived from MiniMax's published API documentation so the SDK stays close to the upstream API surface.
Designed for fast regeneration and low-friction updates when the upstream API changes without breaking compatibility.
Targets current .NET practices including nullability, trimming, NativeAOT awareness, and source-generated serialization.
using MiniMax;
using var client = new MiniMaxClient(apiKey);Submits a Hailuo video generation task and returns the task_id.
using var client = new MiniMaxClient(apiKey);
var response = await client.Video.CreateVideoGenerationTaskAsync(
model: "MiniMax-Hailuo-2.3",
prompt: "A cinematic drone shot of a mountain range at sunrise, mist curling through the valleys.",
duration: 6,
resolution: VideoGenerationRequestResolution.x1080p);
Console.WriteLine($"task_id: {response.TaskId}");Generates one or more images with MiniMax's shared image endpoint and returns image URLs.
using var client = new MiniMaxClient(apiKey);
var response = await client.Image.CreateImageGenerationAsync(
model: "image-01",
prompt: "A clean product photo of a matte black mechanical keyboard on a walnut desk, soft studio lighting, photorealistic.",
aspectRatio: ImageGenerationRequestAspectRatio.x16_9,
responseFormat: ImageGenerationRequestResponseFormat.Url,
n: 1,
promptOptimizer: true);
Console.WriteLine($"image_url: {response.Data?.ImageUrls?.FirstOrDefault()}");Uses the same image endpoint with subject_reference to perform image-to-image generation.
using var client = new MiniMaxClient(apiKey);
var response = await client.Image.CreateImageGenerationAsync(
model: "image-01",
prompt: "Turn this portrait into a cinematic magazine cover with warm golden-hour lighting and shallow depth of field.",
subjectReference:
[
new ImageSubjectReference
{
Type = ImageSubjectReferenceType.Character,
ImageFile = "https://cdn.hailuoai.com/prod/2025-08-12-17/video_cover/1754990600020238321-411603868533342214-cover.jpg",
},
],
responseFormat: ImageGenerationRequestResponseFormat.Url,
n: 1);
Console.WriteLine($"image_url: {response.Data?.ImageUrls?.FirstOrDefault()}");Uses T2A v2 to synthesize speech from text and returns a downloadable URL.
using var client = new MiniMaxClient(apiKey);
var response = await client.Speech.CreateTextToSpeechAsync(
model: "speech-2.6-turbo",
text: "Hello from MiniMax T2A version 2. This is a test of the synthesis pipeline.",
voiceSetting: new TtsVoiceSetting
{
VoiceId = "male-qn-qingse",
Speed = 1.0f,
Emotion = TtsVoiceSettingEmotion.Calm,
},
outputFormat: TextToSpeechRequestOutputFormat.Url);
Console.WriteLine($"audio: {response.Data?.Audio}");
Console.WriteLine($"length_ms: {response.ExtraInfo?.AudioLength}");Generates an instrumental track with music-2.6 and returns a downloadable URL.
using var client = new MiniMaxClient(apiKey);
var response = await client.Music.CreateMusicGenerationAsync(
model: "music-2.6",
prompt: "Upbeat electronic track with driving drums and shimmering synths, 120 bpm, hopeful mood.",
isInstrumental: true,
outputFormat: MusicGenerationRequestOutputFormat.Url);
Console.WriteLine($"audio: {response.Data?.Audio}");
Console.WriteLine($"duration_ms: {response.ExtraInfo?.MusicDuration}");Exposes MiniMax video, music, TTS, and voice-clone endpoints as MEAI AIFunctions so they can be attached to any IChatClient.
using var client = new MiniMaxClient(apiKey);
AIFunction[] tools =
[
client.AsCreateVideoTaskTool(),
client.AsGetVideoTaskTool(),
client.AsGenerateMusicTool(),
client.AsSynthesizeSpeechTool(),
client.AsCloneVoiceTool(),
];
Console.WriteLine(string.Join(", ", tools.Select(t => t.Name)));Open an issue in tryAGI/MiniMax.
Use GitHub Discussions for design questions and usage help.
Join the tryAGI Discord for broader discussion across SDKs.
This project is supported by JetBrains through the Open Source Support Program.
