进阶 docs.bailian.console.aliyun.com 2026-10-16 14:20:25 · 22 阅读
第8章 Base URL总览
Base URL 是模型 API 的调用地址。Base URL必须与同一计费方案的 API Key 配套使用,否则会报错 401。各地域的 API Key 相互独立、不能跨地域使用。
按量付费
根据使用场景选择合适的域名:
Dashscope 域名(dashscope.aliyuncs.com 等):原有中心化共享域名,当前可继续使用,建议迁移至业务空间专属域名。
业务空间专属域名([workspace-id].[region].maas.aliyuncs.com):推荐用于生产环境,提供更高吞吐、更低时延与业务空间级流量隔离。
试用域名(trial.[region].maas.aliyuncs.com):适用于临时测试与快速验证,限流值较小。
Dashscope 域名
支持跨业务空间的 API Key 调用。
地域OpenAI 兼容Anthropic 兼容华北2(北京)https://dashscope.aliyuncs.com/compatible-mode/v1https://dashscope.aliyuncs.com/apps/anthropic新加坡https://dashscope-intl.aliyuncs.com/compatible-mode/v1https://dashscope-intl.aliyuncs.com/apps/anthropic美国(弗吉尼亚)https://dashscope-us.aliyuncs.com/compatible-mode/v1https://dashscope-us.aliyuncs.com/apps/anthropic中国香港https://cn-hongkong.dashscope.aliyuncs.com/compatible-mode/v1https://cn-hongkong.dashscope.aliyuncs.com/apps/anthropic
如需使用 DashScope 原生 API,请将上表 URL 中域名后的路径替换为/api/v1,例如北京地域为https://dashscope.aliyuncs.com/api/v1。
业务空间专属域名
仅限业务空间所属 API Key 调用。
地域OpenAI 兼容Anthropic 兼容华北2(北京)https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/apps/anthropic新加坡https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic日本(东京)https://{WorkspaceId}.ap-northeast-1.maas.aliyuncs.com/compatible-mode/v1https://{WorkspaceId}.ap-northeast-1.maas.aliyuncs.com/apps/anthropic德国(法兰克福)https://{WorkspaceId}.eu-central-1.maas.aliyuncs.com/compatible-mode/v1https://{WorkspaceId}.eu-central-1.maas.aliyuncs.com/apps/anthropic美国(弗吉尼亚)https://{WorkspaceId}.us-east-1.maas.aliyuncs.com/compatible-mode/v1https://{WorkspaceId}.us-east-1.maas.aliyuncs.com/apps/anthropic中国香港https://{WorkspaceId}.cn-hongkong.maas.aliyuncs.com/compatible-mode/v1https://{WorkspaceId}.cn-hongkong.maas.aliyuncs.com/apps/anthropic
如需使用 DashScope 原生 API,请将上表 URL 中域名后的路径替换为/api/v1,例如北京地域为https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1。
试用域名
支持跨业务空间的 API Key 调用。
地域OpenAI 兼容Anthropic 兼容华北2(北京)https://trial.cn-beijing.maas.aliyuncs.com/compatible-mode/v1https://trial.cn-beijing.maas.aliyuncs.com/apps/anthropic新加坡https://trial.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1https://trial.ap-southeast-1.maas.aliyuncs.com/apps/anthropic中国香港https://trial.cn-hongkong.maas.aliyuncs.com/compatible-mode/v1https://trial.cn-hongkong.maas.aliyuncs.com/apps/anthropic
Token Plan
仅限 Claude Code、Codex 等 AI 工具交互式使用,不能用于后端服务。使用 Token Plan 的专属 API Key。
地域OpenAI 兼容Anthropic 兼容华北2(北京)https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic
Coding Plan
仅限 Claude Code、Codex 等 AI 工具交互式使用,不能用于后端服务。使用 Coding Plan 的专属 API Key 。
地域OpenAI 兼容Anthropic 兼容华北2(北京)https://coding.dashscope.aliyuncs.com/v1https://coding.dashscope.aliyuncs.com/apps/anthropic
相关文档
获取API Key
选择地域、服务部署范围和接入域名