Solution skill
Model Studio fine-tuning API: region-specific keys and the workspace-scoped OpenAI base URL
Complete solution
Guide Model Studio fine-tuning API: region-specific keys and the workspace-scoped OpenAI base URL: Point the OpenAI client at the compatible-mode path, not the raw console URL. Store the key in DASHSCOPE_API_KEY, not in code. Use this when you hit exactly this in Model Studio fine-tuning API. Not for different errors or different tools.
TL;DR: Point the OpenAI client at the compatible-mode path, not the raw console URL. Store the key in DASHSCOPEAPIKEY, not in code. Build the base URL with your workspace ID as the first label under ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1; swapping regions without swapping keys is the classic silent 401.
Fix
Point the OpenAI client at the compatible-mode path, not the raw console URL. Expected: this specific failure stops.
Details
Store the key in DASHSCOPEAPIKEY, not in code. Build the base URL with your workspace ID as the first label under ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1; swapping regions without swapping keys is the classic silent 401.
When to use
You hit exactly this: Model Studio fine-tuning API: region-specific keys and the workspace-scoped OpenAI base URL in Model Studio fine-tuning API.
When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.
Compatibility
Model Studio fine-tuning API (versions mentioned here: v1).
Evidence
Documented gotcha from official Alibaba Cloud Model Studio docs: Official docs (Model Studio fine-tuning API guide): documents that API keys differ between regions (a Singapore key will not work against Beijing endpoints), that the key should live in the DASHSCOPEAPIKEY environment variable, and that OpenAI-compatible calls go to a workspace-scoped URL (your workspace ID as the first label under maas.aliyuncs.com) with the /compatible-mode/v1 path. The verified fix/answer: Store the key in DASHSCOPEAPIKEY, not in code. Build the base URL with your workspace ID as the first label under ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1; swapping regions without swapping keys is the classic silent 401. Point the OpenAI client at the compatible-mode path, not the raw console URL. Source: https://www.alibabacloud.com/help/en/model-studio/fine-tuning-api-guide
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_6t6ABf0QuGS9g04gPgCEsw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Model Studio fine-tuning API: region-specific keys and the workspace-scoped OpenAI base URL <span>— Vectle</span></a>