PHPackages                             softcreatr/php-mistral-ai-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. softcreatr/php-mistral-ai-sdk

ActiveLibrary[API Development](/categories/api)

softcreatr/php-mistral-ai-sdk
=============================

A powerful and easy-to-use PHP SDK for the Mistral AI API, allowing seamless integration of advanced AI-powered features into your PHP projects.

3.0.1(5mo ago)1517.9k↓22.4%3ISCPHPPHP &gt;=8.1

Since Feb 3Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/SoftCreatR/php-mistral-ai-sdk)[ Packagist](https://packagist.org/packages/softcreatr/php-mistral-ai-sdk)[ Fund](https://ecologi.com/softcreatr?r=61212ab3fc69b8eb8a2014f4)[ GitHub Sponsors](https://github.com/softcreatr)[ RSS](/packages/softcreatr-php-mistral-ai-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (7)Versions (6)Used By (0)

Mistral API Wrapper for PHP
===========================

[](#mistral-api-wrapper-for-php)

[![Build](https://camo.githubusercontent.com/b4851a364167064dbefcaa4529a0fe3f8b7babe224f6131b7a08d067a06077f5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f536f66744372656174522f7068702d6d69737472616c2d61692d73646b2f2e6769746875622f776f726b666c6f77732f6372656174652d72656c656173652e796d6c3f6272616e63683d6d61696e)](https://github.com/SoftCreatR/php-mistral-ai-sdk/actions/workflows/create-release.yml) [![Latest Release](https://camo.githubusercontent.com/d32edd1fcb00d161451380b54d5e4f3b0a73cc68cc6f7eb0a5013e46cfd1944e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f536f66744372656174522f7068702d6d69737472616c2d61692d73646b3f636f6c6f723d626c7565266c6162656c3d4c617465737425323052656c65617365)](https://packagist.org/packages/softcreatr/php-mistral-ai-sdk) [![ISC licensed](https://camo.githubusercontent.com/95c61c397ca3825757ec835268e50886b2c10ddc4f0676e1222b19037610927f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4953432d626c75652e737667)](./LICENSE.md) [![Plant Tree](https://camo.githubusercontent.com/e751d267acfa70a4be08989f626ff706c90cec4e0ab98940e620250f26a991be/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f636f6c6f723d627269676874677265656e266c6162656c3d506c616e74253230547265652671756572793d2532342e746f74616c2675726c3d68747470732533412532462532467075626c69632e65636f6c6f67692e636f6d2532467573657273253246736f66746372656174722532467472656573)](https://ecologi.com/softcreatr?r=61212ab3fc69b8eb8a2014f4) [![Codecov branch](https://camo.githubusercontent.com/f9bbc311f8a4a9b6363d5d7e52e9047abe08c7847f5f6be7a172854b1e350648/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f536f66744372656174522f7068702d6d69737472616c2d61692d73646b)](https://codecov.io/gh/SoftCreatR/php-mistral-ai-sdk) [![Code Climate maintainability](https://camo.githubusercontent.com/9f6047f2a77c12c7130dc135921dc63439dada95388e8e3085dd0db723415604/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792d70657263656e746167652f536f66744372656174522f7068702d6d69737472616c2d61692d73646b)](https://codeclimate.com/github/SoftCreatR/php-mistral-ai-sdk)

This PHP library provides a simple wrapper for the Mistral API, allowing you to easily integrate the Mistral API into your PHP projects.

Features
--------

[](#features)

- Easy integration with Mistral API
- Supports all Mistral API endpoints
- Streaming support for real-time responses in chat completions
- Utilizes PSR-17 and PSR-18 compliant HTTP clients and factories for making API requests

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- A PSR-17 HTTP Factory implementation (e.g., [guzzle/psr7](https://github.com/guzzle/psr7) or [nyholm/psr7](https://github.com/Nyholm/psr7))
- A PSR-18 HTTP Client implementation (e.g., [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) or [symfony/http-client](https://github.com/symfony/http-client))

Installation
------------

[](#installation)

You can install the library via [Composer](https://getcomposer.org/):

```
composer require softcreatr/php-mistral-ai-sdk
```

Usage
-----

[](#usage)

First, include the library in your project:

```
