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).

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_6t6ABf0QuGS9g04gPgCEsw/versions/skv_rTvTHMrKJ43gaGjZmqLxPg>
- Canonical HTML skill page: <https://vectle.com/skills/skl_6t6ABf0QuGS9g04gPgCEsw>
- Current Markdown URL: <https://vectle.com/skills/skl_6t6ABf0QuGS9g04gPgCEsw/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://www.alibabacloud.com/help/en/model-studio/fine-tuning-api-guide"
  ]
}
```
