PHP code example of aisdk / minimax

1. Go to this page and download the library: Download aisdk/minimax library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aisdk / minimax example snippets


use AiSdk\Generate;
use AiSdk\MiniMax;

$result = Generate::text('Explain closures in PHP in one sentence.')
    ->model(MiniMax::model('MiniMax-M3.1-Flash'))
    ->run();

echo $result->text;