Trang chủ
Các bài mới
Latest activity
Biên tập viên
Diễn Đàn
Bài viết mới
Tìm kiếm diễn đàn
Tin Mới
Bài viết mới
New resources
Bài đăng tiểu sử mới
Hoạt động mới nhất
Resources
Latest reviews
Search resources
Thành Viên
Khách truy cập hiện tại
Bài mới trên trang cá nhân
Tìm kiếm bài đăng trong trang cá nhân
Tool
SMTool - Công cụ đăng bài tự động Facebook
50 SEO Tools
Photoshop online
Facebook Video Down
Cầu nguyện Genshin
Biolink
Genshin map
Đăng nhập
Đăng ký
Mới
Tìm kiếm
Tìm kiếm
Chỉ tìm trong tiêu đề
bởi:
Bài viết mới
Tìm kiếm diễn đàn
Menu
Đăng nhập
Đăng ký
Install the app
Install
28/06 cập nhật đăng ký đăng nhập qua Google & Facebook
Diễn Đàn
Thủ thuật
Thủ thuật phần mềm
Hướng dẫn dùng Claude Code với Azure AI (Claude Opus 4.5)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Nội dung
<blockquote data-quote="TenHoshi" data-source="post: 29964" data-attributes="member: 1"><p><h2>How to Use Claude Code with Azure AI (Claude Opus 4.5)</h2><p>You can use <strong>Claude Code with Azure AI endpoints</strong> (e.g. services.ai.azure.com/anthropic/v1/messages). It’s not limited to the native Anthropic API.</p><h3>1. Requirements</h3><p>Make sure you have:</p><ul> <li data-xf-list-type="ul">Azure AI endpoint, for example:<br /> [ICODE]https://xxx.services.ai.azure.com/anthropic/v1/messages[/ICODE]<br /> <br /> </li> <li data-xf-list-type="ul">Azure API Key</li> <li data-xf-list-type="ul">Model name (e.g. claude-opus-4-5)</li> </ul><h3>2. Configure Claude Code</h3><p>Claude Code supports custom endpoints via <strong>environment variables</strong>.</p><p></p><p>Open:</p><p></p><p>[ICODE]~/.claude/settings.json[/ICODE]</p><p></p><p>Add:</p><p></p><p>[CODE]{</p><p>"env": {</p><p>"ANTHROPIC_BASE_URL": "https://xxx.services.ai.azure.com",</p><p>"ANTHROPIC_API_KEY": "YOUR_AZURE_API_KEY"</p><p>}</p><p>}[/CODE]</p><p></p><p><strong>Notes:</strong></p><ul> <li data-xf-list-type="ul">ANTHROPIC_BASE_URL should be the root domain (no /v1/messages)</li> <li data-xf-list-type="ul">Use your Azure API key (not Anthropic’s)</li> </ul><h3>3. Using Multiple Providers (Recommended)</h3><p>If you work with multiple providers (Azure, Bedrock, Alibaba…), use <strong>ccs (Claude Code Switch)</strong> to manage profiles.</p><h4>Create a profile for Azure:</h4><p>[ICODE]ccs azure[/ICODE]</p><p></p><p>Then configure env variables for this profile.</p><h4>Other profiles:</h4><p>[ICODE]ccs bedrock[/ICODE]</p><p>[ICODE]ccs ali[/ICODE]</p><h3>4. How to Use</h3><p>Switch environment before running:</p><p></p><p>[ICODE]ccs azure[/ICODE]</p><p>[ICODE]claude-code[/ICODE]</p><p></p><p>Or:</p><p></p><p>[ICODE]ccs ali[/ICODE]</p><p>[ICODE]claude-code[/ICODE]</p><p></p><p>Claude Code will automatically use the configured:</p><ul> <li data-xf-list-type="ul">base URL</li> <li data-xf-list-type="ul">API key</li> </ul><h3>5. Example Setup</h3><p>Typical mappings:</p><ul> <li data-xf-list-type="ul">Azure Claude → ccs azure</li> <li data-xf-list-type="ul">Amazon Bedrock → ccs bedrock</li> <li data-xf-list-type="ul">Alibaba Cloud:<ul> <li data-xf-list-type="ul">Minimax → ccs ali</li> <li data-xf-list-type="ul">Qwen → ccs aliq</li> <li data-xf-list-type="ul">GLM → ccs alig</li> </ul></li> </ul><h3>6. Important Notes</h3> <ul> <li data-xf-list-type="ul">Claude Code is <strong>provider-agnostic</strong> as long as the API follows Anthropic format</li> <li data-xf-list-type="ul">Azure works because it exposes /anthropic/v1/messages</li> <li data-xf-list-type="ul">Common issues:<ul> <li data-xf-list-type="ul">Incorrect base URL</li> <li data-xf-list-type="ul">Invalid API key</li> <li data-xf-list-type="ul">Wrong model name</li> </ul></li> </ul><h2>Conclusion</h2> <ul> <li data-xf-list-type="ul">Claude Code <strong>works with Azure AI Claude endpoints</strong></li> <li data-xf-list-type="ul">Just configure BASE_URL + API_KEY</li> <li data-xf-list-type="ul">Use ccs for managing multiple environments</li> </ul></blockquote><p></p>
[QUOTE="TenHoshi, post: 29964, member: 1"] [HEADING=1]How to Use Claude Code with Azure AI (Claude Opus 4.5)[/HEADING] You can use [B]Claude Code with Azure AI endpoints[/B] (e.g. services.ai.azure.com/anthropic/v1/messages). It’s not limited to the native Anthropic API. [HEADING=2]1. Requirements[/HEADING] Make sure you have: [LIST] [*]Azure AI endpoint, for example: [ICODE]https://xxx.services.ai.azure.com/anthropic/v1/messages[/ICODE] [*]Azure API Key [*]Model name (e.g. claude-opus-4-5) [/LIST] [HEADING=2]2. Configure Claude Code[/HEADING] Claude Code supports custom endpoints via [B]environment variables[/B]. Open: [ICODE]~/.claude/settings.json[/ICODE] Add: [CODE]{ "env": { "ANTHROPIC_BASE_URL": "https://xxx.services.ai.azure.com", "ANTHROPIC_API_KEY": "YOUR_AZURE_API_KEY" } }[/CODE] [B]Notes:[/B] [LIST] [*]ANTHROPIC_BASE_URL should be the root domain (no /v1/messages) [*]Use your Azure API key (not Anthropic’s) [/LIST] [HEADING=2]3. Using Multiple Providers (Recommended)[/HEADING] If you work with multiple providers (Azure, Bedrock, Alibaba…), use [B]ccs (Claude Code Switch)[/B] to manage profiles. [HEADING=3]Create a profile for Azure:[/HEADING] [ICODE]ccs azure[/ICODE] Then configure env variables for this profile. [HEADING=3]Other profiles:[/HEADING] [ICODE]ccs bedrock[/ICODE] [ICODE]ccs ali[/ICODE] [HEADING=2]4. How to Use[/HEADING] Switch environment before running: [ICODE]ccs azure[/ICODE] [ICODE]claude-code[/ICODE] Or: [ICODE]ccs ali[/ICODE] [ICODE]claude-code[/ICODE] Claude Code will automatically use the configured: [LIST] [*]base URL [*]API key [/LIST] [HEADING=2]5. Example Setup[/HEADING] Typical mappings: [LIST] [*]Azure Claude → ccs azure [*]Amazon Bedrock → ccs bedrock [*]Alibaba Cloud: [LIST] [*]Minimax → ccs ali [*]Qwen → ccs aliq [*]GLM → ccs alig [/LIST] [/LIST] [HEADING=2]6. Important Notes[/HEADING] [LIST] [*]Claude Code is [B]provider-agnostic[/B] as long as the API follows Anthropic format [*]Azure works because it exposes /anthropic/v1/messages [*]Common issues: [LIST] [*]Incorrect base URL [*]Invalid API key [*]Wrong model name [/LIST] [/LIST] [HEADING=1]Conclusion[/HEADING] [LIST] [*]Claude Code [B]works with Azure AI Claude endpoints[/B] [*]Just configure BASE_URL + API_KEY [*]Use ccs for managing multiple environments [/LIST] [/QUOTE]
Name
Xác nhận
Gửi đi
Diễn Đàn
Thủ thuật
Thủ thuật phần mềm
Hướng dẫn dùng Claude Code với Azure AI (Claude Opus 4.5)
Top