
DashScope Integration
FreeSeamlessly generate images, audio, and transcriptions.
Free · Opens the source repo
What DashScope Integration does
DashScope is an integration tool designed to facilitate image generation, text-to-speech synthesis, and automatic speech recognition (ASR) with word-level timestamps using Alibaba Cloud's Qwen models. This skill provides developers and designers with a straightforward interface to access these capabilities through a RESTful API. By leveraging DashScope, users can generate high-quality images based on text prompts, convert text into spoken audio, and transcribe audio files while capturing precise timestamps for each word, which is particularly useful for creating subtitles or captions.
The image generation feature utilizes the Qwen-Image model, allowing users to specify various parameters such as image size and the number of images to generate. The text-to-speech functionality enables the synthesis of audio from text, with options to select different voices and languages. This is beneficial for projects that require voiceovers or narration, providing flexibility in voice selection and language support. The ASR feature stands out by offering word-level timestamps, which can enhance the usability of transcriptions in applications like video editing or accessibility solutions.
To get started, users need to obtain an API key from DashScope and set it in their environment. The API supports multiple models for each service, ensuring that users can choose the best fit for their needs. The skill is particularly valuable for developers looking to incorporate multimedia elements into their applications or for designers who require automated solutions for generating content. Overall, DashScope serves as a comprehensive tool for enhancing multimedia workflows, making it easier to integrate advanced AI capabilities into various projects.
When to use it
Use DashScope when you need to generate images, create voiceovers, or transcribe audio with precise timing for subtitles.
When not to use it
This skill is not suitable for users who require compatibility with OpenAI's API paths, as it relies on DashScope-native endpoints.
What you can build with it
Generating Images for Projects
Use DashScope's image generation feature to create visuals based on text prompts, ideal for design projects.
Creating Voice Narration
Leverage DashScope's text-to-speech capabilities to generate voiceovers for videos or presentations.
Transcribing Audio for Subtitles
Utilize the ASR feature to transcribe audio files with word-level timestamps, perfect for adding subtitles to multimedia content.
How to install DashScope Integration
View source1. Install with the skills CLI
npx skills add calesthio/openmontage/dashscope --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by calesthioDashScope
Requires DASHSCOPE_API_KEY in .env. Get one at https://dashscope.aliyun.com/.
Current API
CRITICAL: DashScope's /compatible-mode/v1/ only supports /chat/completions and /embeddings. Image generation, TTS, and ASR all use DashScope-native endpoints — not OpenAI-compatible paths.
All three tools use Authorization: Bearer $DASHSCOPE_API_KEY.
Image Generation
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
- Model:
qwen-image-2.0-pro(default),qwen-image-max,wan2.7-image,z-image-turbo - Body:
{model, input: {messages: [{role: "user", content: [{text: "prompt"}]}]}, parameters: {size: "W*H", n, prompt_extend, watermark}} - Size format uses asterisk:
"1024*1024"not"1024x1024" - Response:
output.choices[0].message.content[0].image(URL, valid ~24h) — must download separately
Text-to-Speech
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
Same endpoint as image gen, different body.
- Model:
qwen3-tts-flash(default),qwen3-tts-instruct-flash,qwen-tts-2025-05-22 - Body:
{model, input: {text, voice: "Cherry", language_type: "Auto"}} - Response:
output.audio.url(WAV, valid ~24h) — must download separately
ASR with Word-Level Timestamps
POST https://dashscope.aliyuncs.com/api/v1/services/audio/asr/transcription
Header: X-DashScope-Async: enable
- Model:
qwen3-asr-flash-filetrans(NOTqwen3-asr-flash— the sync version has no word timestamps) - Body:
{model, input: {file_url: "https://public-url/audio.mp3"}, parameters: {enable_words: true, language_hints: ["zh","en"]}} - Returns
task_id→ pollGET /api/v1/tasks/{task_id}untilSUCCEEDED→ downloadoutput.result.transcription_url→ JSON withtranscripts[].sentences[].words[] - Timestamps in
begin_time/end_timeare in milliseconds — the tool normalizes to seconds
OpenMontage Usage
Image via selector
from tools.graphics.image_selector import ImageSelector
result = ImageSelector().execute({
"preferred_provider": "dashscope",
"prompt": "一只猫坐在沙发上",
"output_path": "projects/my-video/assets/images/cat.png",
})
TTS via selector
from tools.audio.tts_selector import TTSSelector
result = TTSSelector().execute({
"preferred_provider": "dashscope",
"text": "如果 AI 真的会改变未来,普通人到底该怎么参与?",
"voice": "Cherry",
"output_path": "projects/my-video/assets/audio/narration.wav",
})
ASR directly (word timestamps for subtitles)
from tools.analysis.dashscope_asr import DashscopeAsr
result = DashscopeAsr().execute({
"audio_url": "https://example.com/narration.wav",
"output_path": "projects/my-video/assets/audio/transcription.json",
})
# result.data["words"] is a flat list of {text, begin_time_seconds, end_time_seconds}
Recommended Workflow
- Image: Generate a sample first. Check
prompt_extend: true(default) — DashScope rewrites your prompt for better results. Disable if you need literal prompt adherence. - TTS: Generate a 10-15 second sample before full narration. Approve voice and pacing before committing to full generation.
- ASR: Audio must be at a publicly accessible URL. Upload to any public host (S3, etc.) first. Local paths are rejected with a clear error.
- Subtitles: Build from
result.data["words"]— each word hasbegin_time_secondsandend_time_seconds. Group words into caption phrases by language semantics, not fixed character count.
Parameters
Image (dashscope_image)
prompt(required): text promptmodel: defaultqwen-image-2.0-prosize: default"1024*1024"— asterisk separator, not "x"n: 1-6 imagesnegative_prompt: things to avoid (max 500 chars)prompt_extend: defaulttrue— auto-rewrite prompt for better resultswatermark: defaultfalseseed: for reproducibility
TTS (dashscope_tts)
text(required): text to synthesize (max 600 chars for qwen3-tts-flash)model: defaultqwen3-tts-flashvoice: default"Cherry"— other voices:"Ethan","Chelsie", etc.language_type: default"Auto"—"Chinese","English","Japanese","Korean"instructions: natural language delivery instructions (only forqwen3-tts-instruct-flash)
ASR (dashscope_asr)
audio_url(required): must be publicly accessible URLmodel:qwen3-asr-flash-filetrans(only model that supports word timestamps)language_hints: default["zh", "en"]enable_words: defaulttrue— required for word-level timestampspoll_interval_seconds: default5.0timeout_seconds: default300
Troubleshooting
- Image size error: Use
"W*H"with asterisk, not"WxH". Example:"2048*2048". - TTS no audio URL: Check
output.audio.url— if empty, the model name or voice may be wrong. - ASR "file not accessible":
audio_urlmust be publicly reachable. DashScope servers fetch the file; local paths and auth-gated URLs don't work. - ASR poll timeout: Increase
timeout_seconds(default 300). Long audio files take longer to transcribe. - ASR no word timestamps: Ensure
enable_words: trueand model isqwen3-asr-flash-filetrans(not the syncqwen3-asr-flash). - Auth error (401): Verify
DASHSCOPE_API_KEYis set. UseAuthorization: Bearer $KEYheader.
Safety
Never print or write the API key to logs, metadata, patches, or project artifacts. .env.example should contain only empty variable names. The tool's _safe_error() method redacts the key from error messages.
Frequently asked questions about DashScope Integration
Similar skills
AI Studio Image
Generate realistic human-like images effortlessly.
Image Generation
Generate high-quality images from structured prompts.
ComfyUI Gateway
Efficiently manage ComfyUI image generation workflows.
ComfyUI
Generate images, video, audio, and 3D content effortlessly.
Inference.sh CLI
Run 150+ AI apps effortlessly from the terminal.
Luma Image Generation
Effortlessly generate images using Luma AI's Photon model.
