Submits a Hailuo video generation task and returns the task_id.
123456789
usingvarclient=newMiniMaxClient(apiKey);varresponse=awaitclient.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}");
Generate images from text
Generates one or more images with MiniMax's shared image endpoint and returns image URLs.
1 2 3 4 5 6 7 8 91011
usingvarclient=newMiniMaxClient(apiKey);varresponse=awaitclient.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()}");
Generate images from a reference image
Uses the same image endpoint with subject_reference to perform image-to-image generation.
1 2 3 4 5 6 7 8 91011121314151617
usingvarclient=newMiniMaxClient(apiKey);varresponse=awaitclient.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()}");
Synthesize speech (T2A v2)
Uses T2A v2 to synthesize speech from text and returns a downloadable URL.
1 2 3 4 5 6 7 8 9101112131415
usingvarclient=newMiniMaxClient(apiKey);varresponse=awaitclient.Speech.CreateTextToSpeechAsync(model:"speech-2.6-turbo",text:"Hello from MiniMax T2A version 2. This is a test of the synthesis pipeline.",voiceSetting:newTtsVoiceSetting{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}");
Generate music
Generates an instrumental track with music-2.6 and returns a downloadable URL.
1 2 3 4 5 6 7 8 910
usingvarclient=newMiniMaxClient(apiKey);varresponse=awaitclient.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}");
MEAI AIFunction tools
Exposes MiniMax video, music, TTS, and voice-clone endpoints as MEAI
AIFunctions so they can be attached to any IChatClient.