skillfed

azure-ai-inference

Microsoft Azure AI Inference Client Library for Python

azure-ai-inference v1.0.0b9 5.8M downloads/30d#2,029 on PyPI5,588
Permissive license MIT License Active released

What it is and what it does

Azure AI Inference is a Python client library that abstracts authentication and API calls to multiple AI model deployment services under a single interface. It supports GitHub Models (free-tier), Azure AI Foundry Serverless and Managed Compute endpoints, and Azure OpenAI Service, allowing developers to write inference code once and switch between providers or compare model performance without rewriting client logic.

The library provides ChatCompletionsClient and EmbeddingsClient classes for synchronous and asynchronous operations. It handles credential management via API keys, GitHub tokens, or Entra ID, and manages REST API versioning. Runtime dependencies are minimal (isodate, azure-core, typing-extensions), and the package is in beta but actively maintained with recent releases.

Use it for:

  • Compare inference quality across different AI models using identical Python code and a single client.
  • Build applications on GitHub Models for prototyping, then migrate to Azure OpenAI or Foundry endpoints without rewriting client code.
  • Implement chat completions or text embeddings against Azure AI Foundry deployments with automatic credential handling.
  • Evaluate multiple model providers in A/B testing scenarios by swapping endpoints and credentials.
  • Generate text embeddings from various Azure-hosted models for vector search or semantic similarity tasks.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Unified client library for chat completions, text embeddings, and image embeddings across GitHub Models, Azure AI Foundry deployments, and Azure OpenAI Service.

Yes, with conditions. Install if you are building on Azure AI services and want a unified client across GitHub Models, Foundry, or Azure OpenAI—it eliminates provider-specific boilerplate. The library is actively maintained, has no known vulnerabilities, and uses a permissive MIT license. However, it is still in beta (1.0.0b9), so expect potential API changes before a stable release.

Install

azure-ai-inference on PyPI

pip

pip install azure-ai-inference

uv

uv add azure-ai-inference

poetry

poetry add azure-ai-inference

Installing azure-ai-inference

Before you install

Low install friction with three lightweight runtime dependencies. Active maintenance with recent releases; last commit 2026-08-14. Beta status (Development Status :: 4) means the API surface may shift before a stable release.

License in practice

MIT License permits commercial and private use with minimal restrictions, making it suitable for production applications.

Quickstart

pip install azure-ai-inference

from azure.ai.inference import ChatCompletionsClient
from azure.core.credentials import AzureKeyCredential

client = ChatCompletionsClient(
    endpoint="https://models.inference.ai.azure.com",
    credential=AzureKeyCredential(github_token),
    model="mistral-large"
)

Requires Python 3.8 or later. Endpoint URL and credentials (API key, GitHub token, or Entra ID) must be provided; for Entra ID, azure-identity package must be installed separately.

Verify before relying

  • Whether the REST API version 2024-05-01-preview is stable or subject to breaking changes before 1.0.0 GA.
  • Performance characteristics and rate limits when comparing across GitHub Models, Serverless, and Azure OpenAI endpoints.
  • Whether async support requires aiohttp as an optional dependency or if it is bundled.

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 3 — isodate, azure-core, typing-extensions
Maintenance actively maintained — 545 days since the last release
Last repo commit
First released
Downloads 5,834,617/month — #2,029 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: azure_ai_inference-1.0.0b9-py3-none-any.whl

Keywords: azure, azure sdk

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

azure ai inference clientchat completions azuretext embeddings azureazure openai alternativegithub models python clientazure foundry inferencemulti-provider ai models
azure-sdkmulti-providerembeddings

More Artificial Intelligence packages

litellm

LiteLLM provides a unified Python interface to…

permissive · top 100 on PyPI

huggingface-hub

Client library and CLI tool for downloading,…

permissive · top 100 on PyPI

langchain

LangChain provides a framework for building…

permissive · top 1,000 on PyPI

hf-xet

hf-xet provides chunk-based deduplication and…

permissive · top 1,000 on PyPI

tokenizers

Tokenizers converts raw text into token…

permissive · top 1,000 on PyPI

transformers

Transformers provides a unified framework for…

permissive · top 1,000 on PyPI

azure-ai-projects

Provides a Python client for Microsoft Foundry…

permissive · top 5,000 on PyPI

foundry-local-sdk

A Python SDK for discovering, downloading,…

permissive · top 15,000 on PyPI

azure-ai-vision-imageanalysis

Calls Azure's Computer Vision service to…

permissive · top 15,000 on PyPI

azure-ai-language-questionanswering

Python client library for Azure's Question…

permissive · top 15,000 on PyPI

azure-ai-agents

Build and deploy AI agents on Azure using…

permissive · top 5,000 on PyPI

azure-ai-language-conversations

A Python client library for Azure…

permissive · top 15,000 on PyPI

azure-ai-contentunderstanding

Extracts structured content from documents,…

unclear · top 5,000 on PyPI

agent-framework-openai

Provides OpenAI and Azure OpenAI integration…

permissive · top 5,000 on PyPI

azure-ai-documentintelligence

Python client for Azure AI Document…

permissive · top 5,000 on PyPI

vastai-sdk

Provides Python bindings to the Vast.ai API for…

unclear · top 5,000 on PyPI