Skip to main content

Microsoft Foundry

  • Microsoft Foundry
    • 旧名称 Azure AI Foundry、Azure AI Studio、Azure AI Services
  • https://ai.azure.com/
  • Microsoft.CognitiveServices/accounts , AIServices
  • OpenAI
    • Base URL:https://{resource}.openai.azure.com/openai/v1/
curl "https://${AZURE_FOUNDRY_RESOURCE}.openai.azure.com/openai/v1/responses" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${AZURE_AI_AUTH_TOKEN}" \
-d '{
"model": "deployment-name",
"input": "Hello"
}'

API Map

SurfaceEndpoint shape定位
Foundry Project APIhttps://{resource}.services.ai.azure.com/api/projects/{project}Project 下的 agents、connections、deployments、datasets、evaluations、indexes、memory、skills 等 stateful API
Project OpenAI route{project-endpoint}/openai/v1Project scope 下的 Responses、conversations、evals、fine-tuning 等 OpenAI-style route
OpenAI v1-compatible APIhttps://{resource}.openai.azure.com/openai/v1/模型 inference 和 OpenAI SDK 兼容主路径
Services-host OpenAI routehttps://{resource}.services.ai.azure.com/openai/v1/Foundry resource 上可用的 OpenAI v1-compatible host 形式
Legacy Azure OpenAI.../openai/deployments/{deployment}/...?api-version=...旧版 dated api-version API;已有系统可能仍在使用
Model Inference APIhttps://{resource}.services.ai.azure.com/models/...已弃用;新接入不要使用

Authentication

SurfaceAuthenticationOAuth scope/audience
Foundry Project APIMicrosoft Entra IDhttps://ai.azure.com/.default
Resource-level OpenAI v1API key / authorization / Microsoft Entra ID固定 OpenAPI 声明 https://cognitiveservices.azure.com/.default
# Foundry Project API
az account get-access-token \
--resource https://ai.azure.com \
--query accessToken \
--output tsv

# Resource-level OpenAI v1 API
az account get-access-token \
--resource https://cognitiveservices.azure.com \
--query accessToken \
--output tsv

参考