gazmend-sahiti / bln
BLN package for Laravel to generate images using ideogram
Fund package maintenance!
dev-main
2026-02-06 20:26 UTC
Requires
- php: ^8.4
- illuminate/contracts: ^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-ray: ^1.35
This package is not auto-updated.
Last update: 2026-04-18 19:36:18 UTC
README
This is a simple PHP example demonstrating how to generate an image using the Ideogram API.
Requirements
- PHP 8+
- Composer
Installation
- Install dependencies via Composer:
composer require gazmend-sahiti/bln
- Make sure
vendor/autoload.phpis included in your project.
Usage
<?php use GazmendS\BLN\Ideogram; require 'vendor/autoload.php'; // Replace with your actual API key $apiKey = 'YOUR_API_KEY_HERE'; $ideogram = Ideogram::make($apiKey); // $prompt = 'black pretty eyes'; $prompt = 'an Asian street bar in mid July with neon signs, 2 people sitting at stools, and bartenders serving drinks'; $image = $ideogram->generateImage($prompt); if ($image['success']) { echo '<img src="'.$image['data']['url'].'" />'; }
Notes
- Replace
'YOUR_API_KEY_HERE'with your actual Ideogram API key. - The
$imagevariable contains the needed data.