PHPackages                             tigusigalpa/monica-ai-php - 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. tigusigalpa/monica-ai-php

ActiveLibrary[API Development](/categories/api)

tigusigalpa/monica-ai-php
=========================

PHP client library for Monica API Platform - unified access to multiple AI models

v1.1.1(5mo ago)1510[1 issues](https://github.com/tigusigalpa/monica-ai-php/issues)MITPHPPHP ^8.1

Since Aug 23Pushed 5mo agoCompare

[ Source](https://github.com/tigusigalpa/monica-ai-php)[ Packagist](https://packagist.org/packages/tigusigalpa/monica-ai-php)[ Docs](https://github.com/tigusigalpa/monica-ai-php)[ RSS](/packages/tigusigalpa-monica-ai-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

Monica AI API PHP Client/SDK
============================

[](#monica-ai-api-php-clientsdk)

[![PHP Version](https://camo.githubusercontent.com/acffb6ae1962992d26e4466782832787e79504a6250f80d732c4283458b9f497/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e312d626c75652e737667)](https://www.php.net/)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![Latest Version](https://camo.githubusercontent.com/a9f76da238e63c72bac362e1e23facab7fd30f407a6952211ac6a75b9cefcfa4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f74696775736967616c70612f6d6f6e6963612d61692d706870)](https://github.com/tigusigalpa/monica-api-php/releases)

 [![Monica AI PHP SDK](https://private-user-images.githubusercontent.com/2721390/484224980-0ca1fc1f-0e64-415f-9fd1-ecd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bnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDQwMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA0MDJUMTAzMTI3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTVjOGU0NzQ0OTFmOGI3YjEyNTZlY2FiNjY5NjZlN2RiN2Y4ZGIzNDFjYTRhYzRkOThiNDY4YmU4OWZiYTI5MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.JEB7vjauA1orA6wEEeD-BGRo0l1UnvH0d6V-CguAq88)

A powerful and elegant PHP client (SDK) library for [Monica API Platform](https://platform.monica.im/) - your unified gateway to multiple AI models from leading providers.

🚀 Features
----------

[](#-features)

- **Unified API Access**: Single interface to multiple AI providers (OpenAI, Anthropic, Google, DeepSeek, Meta, Grok, NVIDIA, Mistral)
- **Latest AI Models**: Support for cutting-edge models including GPT-5, Claude 4, and Gemini 2.5
- **Image Generation**: Support for FLUX, Stable Diffusion, DALL·E, Playground, and Ideogram models
- **Type Safety**: Full PHP 8.1+ type declarations and strict typing
- **Rich Documentation**: Comprehensive PHPDoc comments and examples
- **Error Handling**: Robust exception handling with detailed error information
- **Flexible Configuration**: Support for all major AI model parameters
- **Laravel Ready**: Perfect integration with Laravel applications
- **PSR-4 Autoloading**: Modern PHP standards compliance

📋 Supported AI Models
---------------------

[](#-supported-ai-models)

ProviderModelDescriptionImage Input Support**OpenAI**`gpt-5`GPT-5 (Latest flagship model)✅ Yes`gpt-4.1`GPT-4.1 (Main model)✅ Yes`gpt-4.1-mini`GPT-4.1 Mini (Lightweight)✅ Yes`gpt-4.1-nano`GPT-4.1 Nano (Ultra-light)✅ Yes`gpt-4o`GPT-4o (With image support)✅ Yes`gpt-4o-mini`GPT-4o Mini (Lightweight)✅ Yes**Anthropic**`claude-sonnet-4-20250514`Claude 4 Sonnet✅ Yes`claude-opus-4-20250514`Claude 4 Opus✅ Yes`claude-3-7-sonnet-latest`Claude 3.7 Sonnet✅ Yes`claude-3-5-sonnet-latest`Claude 3.5 Sonnet✅ Yes`claude-3-5-haiku-latest`Claude 3.5 Haiku❌ No**Google**`gemini-2.5-pro`Gemini 2.5 Pro Preview✅ Yes`gemini-2.5-flash`Gemini 2.5 Flash✅ Yes**DeepSeek**`deepseek-reasoner`DeepSeek V3 Reasoner❌ No`deepseek-chat`DeepSeek V3 Chat❌ No**Meta**`meta-llama/llama-3-8b-instruct`Meta: Llama 3 8B Instruct❌ No`meta-llama/llama-3.1-8b-instruct`Meta: Llama 3.1 8B Instruct❌ No**Grok**`x-ai/grok-3-beta`Grok 3 Beta❌ No**NVIDIA**`nvidia/llama-3.1-nemotron-70b-instruct`NVIDIA: Llama 3.1 Nemotron 70B❌ No**Mistral**`mistralai/mistral-7b-instruct`Mistral: Mistral 7B Instruct❌ No> **📝 Note**: Only OpenAI, Anthropic (Claude), and Google (Gemini) models support image input in chat requests. Other providers will return an error if images are included in the request.

🎨 Supported Image Generation Models
-----------------------------------

[](#-supported-image-generation-models)

### FLUX Models

[](#flux-models)

- **FLUX.1 Schnell**: Entry-level model optimized for speed and efficiency
- **FLUX.1 Dev**: Developer-focused variant with enhanced customization options
- **FLUX.1 Pro**: Professional-grade model with highest quality output

### Stable Diffusion Models

[](#stable-diffusion-models)

- **Stable Diffusion XL 1.0**: Efficient image generation with good quality
- **Stable Diffusion 3**: Advanced model with better prompting and higher quality
- **Stable Diffusion 3.5 Large**: Latest model with exceptional detail and realism

### DALL·E Models

[](#dalle-models)

- **DALL·E 3**: Highly detailed and photorealistic images with superior understanding

### Playground Models

[](#playground-models)

- **Playground V2.5**: Cost-effective solution with strong artistic style interpretation

### Ideogram Models

[](#ideogram-models)

- **Ideogram V2**: Exceptional text rendering capabilities, ideal for logos and typography

🛠 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require tigusigalpa/monica-ai-php
```

🔧 Requirements
--------------

[](#-requirements)

- PHP 8.1 or higher
- Guzzle HTTP 7.0+
- Monica AI API key ([Get yours here](https://platform.monica.im/))

🚀 Quick Start
-------------

[](#-quick-start)

```
