[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3
SEQ. 4

AIProjectClient — Your Entry Point

💻 The Foundry SDK 8 min 70 BASE XP

Connecting to Your Project

The AIProjectClient is the main class you instantiate to interact with your Foundry project.

Python Quick Start

from azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential

project = AIProjectClient(
    endpoint="<your-project-endpoint>",
    credential=DefaultAzureCredential()
)

# Get an OpenAI-compatible client
openai_client = project.get_openai_client()
response = openai_client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello from Foundry!"}]
)
print(response.choices[0].message.content)

.NET Quick Start

using Azure.AI.Projects;
using Azure.Identity;

var client = new AIProjectClient(
    new Uri("<your-project-endpoint>"),
    new DefaultAzureCredential()
);

var openAIClient = client.GetOpenAIClient();
🎯 Pro Tip: Find your project endpoint in the Foundry portal under Project Settings → Overview. It looks like: https://<name>.services.ai.azure.com/api/projects/<project-id>
FOUNDRY VERIFICATION
QUERY 1 // 1
How do you get an OpenAI-compatible client from AIProjectClient?
Import it separately
Call project.get_openai_client()
It's not possible
Use a different SDK
Watch: 139x Rust Speedup
AIProjectClient — Your Entry Point | The Foundry SDK — Azure Foundry Academy