PHP code example of yohns / meta-generator

1. Go to this page and download the library: Download yohns/meta-generator 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/ */

    

yohns / meta-generator example snippets


'provider' => 'gemini', // or 'claude'

'gemini' => [
    'api_key' => 'YOUR_KEY_HERE',
    'model'   => 'gemini-2.0-flash',
],

'claude' => [
    'api_key' => 'YOUR_KEY_HERE',
    'model'   => 'claude-haiku-4-5-20251001',
],

'rate_limit' => [
    'enabled'      => true,
    'rpm'          => 5,   // Requests Per Minute
    'rpd'          => 20,  // Requests Per Day
    'storage_path' => __DIR__ . '/../storage/rate_limit.json',
],
bash
composer install
cp config/ai.example.php config/ai.php

POST /api/generate-meta.php
Content-Type: application/json

{"blurb": "Your content blurb here..."}