tryAGI.DashScope 0.0.0-dev.7

Prefix Reserved
This is a prerelease version of tryAGI.DashScope.
dotnet add package tryAGI.DashScope --version 0.0.0-dev.7
                    
NuGet\Install-Package tryAGI.DashScope -Version 0.0.0-dev.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="tryAGI.DashScope" Version="0.0.0-dev.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="tryAGI.DashScope" Version="0.0.0-dev.7" />
                    
Directory.Packages.props
<PackageReference Include="tryAGI.DashScope" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add tryAGI.DashScope --version 0.0.0-dev.7
                    
#r "nuget: tryAGI.DashScope, 0.0.0-dev.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package tryAGI.DashScope@0.0.0-dev.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=tryAGI.DashScope&version=0.0.0-dev.7&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=tryAGI.DashScope&version=0.0.0-dev.7&prerelease
                    
Install as a Cake Tool

<div class="docs-hero"> <h1>DashScope</h1> <p class="docs-hero-lead">Modern .NET SDK for Alibaba Cloud Model Studio DashScope APIs, generated with AutoSDK from a hand-maintained OpenAPI definition.</p> <div class="docs-badge-row"> <a href="https://www.nuget.org/packages/DashScope/"><img alt="Nuget package" src="https://img.shields.io/nuget/vpre/DashScope"></a> <a href="https://github.com/tryAGI/DashScope/actions/workflows/dotnet.yml"><img alt="dotnet" src="https://github.com/tryAGI/DashScope/actions/workflows/dotnet.yml/badge.svg?branch=main"></a> <a href="https://github.com/tryAGI/DashScope/blob/main/LICENSE.txt"><img alt="License: MIT" src="https://img.shields.io/github/license/tryAGI/DashScope"></a> <a href="https://discord.gg/Ca2xhfBf3v"><img alt="Discord" src="https://img.shields.io/discord/1115206893015662663?label=Discord&logo=discord&logoColor=white&color=d82679"></a> </div> <div class="docs-hero-actions"> <a href="#usage">Get started</a> <a href="#support">Get support</a> </div> </div>

<div class="docs-feature-grid"> <div class="docs-feature-card"> <h3>Generated from provider docs</h3> <p>Built from a hand-maintained OpenAPI file based on <a href="https://www.alibabacloud.com/help/en/model-studio/qwen-api-via-dashscope">Alibaba Cloud DashScope API docs</a>.</p> </div> <div class="docs-feature-card"> <h3>Auto-updated</h3> <p>Designed for fast regeneration and low-friction updates when the upstream API changes without breaking compatibility.</p> </div> <div class="docs-feature-card"> <h3>Modern .NET</h3> <p>Targets current .NET practices including nullability, trimming, NativeAOT awareness, and source-generated serialization.</p> </div> <div class="docs-feature-card"> <h3>Docs from examples</h3> <p>Examples stay in sync between the README, MkDocs site, and integration tests through the AutoSDK docs pipeline.</p> </div> </div>

Usage

using DashScope;

using var client = new DashScopeClient(apiKey);

Generate

Basic example showing how to create a client and make a request.

using var client = new DashScopeClient(apiKey);

Wan Text to Video

Create an asynchronous Wan text-to-video task and poll it with the returned task ID.

if (Environment.GetEnvironmentVariable("DASHSCOPE_RUN_VIDEO_TESTS") is not { Length: > 0 })
{
    throw new AssertInconclusiveException("Set DASHSCOPE_RUN_VIDEO_TESTS to run paid video generation examples.");
}

using var client = new DashScopeClient(apiKey);

var response = await client.Videos.CreateVideoGenerationTaskAsync(
    model: "wan2.6-t2v",
    input: new DashScopeInput
    {
        Prompt = "A cinematic product reveal of a silver smartwatch on a dark glass table.",
    },
    xDashScopeAsync: CreateVideoGenerationTaskXDashScopeAsync.Enable,
    parameters: new Dictionary<string, object>
    {
        ["size"] = "832*480",
        ["prompt_extend"] = true,
    });

Wan Image to Video

Create an asynchronous Wan image-to-video task using the Wan 2.7 media protocol.

if (Environment.GetEnvironmentVariable("DASHSCOPE_RUN_VIDEO_TESTS") is not { Length: > 0 })
{
    throw new AssertInconclusiveException("Set DASHSCOPE_RUN_VIDEO_TESTS to run paid video generation examples.");
}

using var client = new DashScopeClient(apiKey);

var response = await client.Videos.CreateVideoGenerationTaskAsync(
    model: "wan2.7-i2v",
    input: new DashScopeInput
    {
        Prompt = "A street-style performer steps forward from the wall art and turns toward the camera.",
        Media = new List<DashScopeMedia>
        {
            new()
            {
                Type = "first_frame",
                Url = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png",
            },
        },
    },
    xDashScopeAsync: CreateVideoGenerationTaskXDashScopeAsync.Enable,
    parameters: new Dictionary<string, object>
    {
        ["resolution"] = "720P",
        ["duration"] = 5,
        ["prompt_extend"] = true,
    });

Wan Reference to Video

Create an asynchronous Wan reference-to-video task with reference media URLs.

if (Environment.GetEnvironmentVariable("DASHSCOPE_RUN_VIDEO_TESTS") is not { Length: > 0 })
{
    throw new AssertInconclusiveException("Set DASHSCOPE_RUN_VIDEO_TESTS to run paid video generation examples.");
}

using var client = new DashScopeClient(apiKey);

var response = await client.Videos.CreateVideoGenerationTaskAsync(
    model: "wan2.6-r2v-flash",
    input: new DashScopeInput
    {
        Prompt = "character1 walks through a studio and lifts a cup toward the camera.",
        ReferenceUrls = new List<string>
        {
            "https://cdn.wanxai.com/static/demo-wan26/vace.mp4",
        },
    },
    xDashScopeAsync: CreateVideoGenerationTaskXDashScopeAsync.Enable,
    parameters: new Dictionary<string, object>
    {
        ["size"] = "1280*720",
        ["duration"] = 5,
        ["audio"] = false,
        ["shot_type"] = "multi",
    });

Qwen Image Edit

Edit an image with a Qwen Image Edit model through the DashScope multimodal generation endpoint.

if (Environment.GetEnvironmentVariable("DASHSCOPE_RUN_IMAGE_TESTS") is not { Length: > 0 })
{
    throw new AssertInconclusiveException("Set DASHSCOPE_RUN_IMAGE_TESTS to run paid image generation examples.");
}

using var client = new DashScopeClient(apiKey);

var response = await client.Generation.CreateMultimodalGenerationAsync(
    model: "qwen-image-edit-max",
    input: new DashScopeInput
    {
        Messages = new List<Message>
        {
            new()
            {
                Role = "user",
                Content = new List<ContentPart>
                {
                    new()
                    {
                        Image = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260310/jiydyi/image+%2818%29-2026-03-10-16-39-59.webp",
                    },
                    new()
                    {
                        Text = "Add a small handwritten title in the lower-right corner while preserving the ink-wash style.",
                    },
                },
            },
        },
    },
    parameters: new Dictionary<string, object>
    {
        ["n"] = 1,
        ["prompt_extend"] = true,
        ["watermark"] = false,
        ["size"] = "1024*1024",
    });

Wan Image Generation

Generate or edit an image with Wan 2.6 Image through the DashScope multimodal generation endpoint.

if (Environment.GetEnvironmentVariable("DASHSCOPE_RUN_IMAGE_TESTS") is not { Length: > 0 })
{
    throw new AssertInconclusiveException("Set DASHSCOPE_RUN_IMAGE_TESTS to run paid image generation examples.");
}

using var client = new DashScopeClient(apiKey);

var response = await client.Generation.CreateMultimodalGenerationAsync(
    model: "wan2.6-image",
    input: new DashScopeInput
    {
        Messages = new List<Message>
        {
            new()
            {
                Role = "user",
                Content = new List<ContentPart>
                {
                    new()
                    {
                        Text = "Using the reference image style, create a clean product hero image of a ceramic espresso cup.",
                    },
                    new()
                    {
                        Image = "https://cdn.wanx.aliyuncs.com/tmp/pressure/umbrella1.png",
                    },
                },
            },
        },
    },
    parameters: new Dictionary<string, object>
    {
        ["prompt_extend"] = true,
        ["watermark"] = false,
        ["n"] = 1,
        ["enable_interleave"] = false,
        ["size"] = "1K",
    });

Support

<div class="docs-card-grid"> <div class="docs-card"> <h3>Bugs</h3> <p>Open an issue in <a href="https://github.com/tryAGI/DashScope/issues">tryAGI/DashScope</a>.</p> </div> <div class="docs-card"> <h3>Ideas and questions</h3> <p>Use <a href="https://github.com/tryAGI/DashScope/discussions">GitHub Discussions</a> for design questions and usage help.</p> </div> <div class="docs-card"> <h3>Community</h3> <p>Join the <a href="https://discord.gg/Ca2xhfBf3v">tryAGI Discord</a> for broader discussion across SDKs.</p> </div> </div>

Acknowledgments

JetBrains logo

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

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.0-dev.7 48 5/21/2026
0.0.0-dev.5 53 5/4/2026
0.0.0-dev.4 49 5/4/2026
0.0.0-dev.3 52 5/4/2026
0.0.0-dev.2 52 5/1/2026