TL;DR: Point the OpenAI client at the compatible-mode path, not the raw console URL. Store the key in DASHSCOPE_API_KEY, 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
1. Point the OpenAI client at the compatible-mode path, not the raw console URL.
   Expected: this specific failure stops.

## Details
Store the key in DASHSCOPE_API_KEY, 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).