aisdk / azure
Official Azure OpenAI provider for the PHP AI SDK.
Fund package maintenance!
v0.11.0
2026-10-31 02:58 UTC
Requires
- php: ^8.3
- aisdk/core: ^0.11.0
- aisdk/openai-compatible: ^0.11.0
- standard-webhooks/standard-webhooks: ^1.0
Requires (Dev)
- laravel/pint: ^1.18
- nyholm/psr7: ^1.8
- pestphp/pest: ^3.0 || ^4.0
- phpstan/phpstan: ^2.0
- rector/rector: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Text generation, streaming, tools, images, audio, embeddings, and live sessions with Azure OpenAI for the PHP AI SDK.
Installation
composer require aisdk/azure
Set AZURE_OPENAI_API_KEY and AZURE_RESOURCE_NAME in your environment.
Usage
use AiSdk\Azure; use AiSdk\Generate; $result = Generate::text('Explain closures in PHP in one sentence.') ->model(Azure::model('your-deployment-name')) ->run(); echo $result->text;
Use the name of your Azure model deployment, rather than an OpenAI model ID. Choose a current model available in your Azure region.
Documentation
Read the documentation for configuration, supported features, and more examples.
License
The MIT License (MIT). See LICENSE for details.