gazmend-sahiti/bln
Composer 安装命令:
composer require gazmend-sahiti/bln
包简介
BLN package for Laravel to generate images using ideogram
README 文档
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.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-06