Search by

daavelar / php-runware-sdk

daavelar

There is no license information available for the latest version (1.2.0) of this package.

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Package info

github.com/daavelar/php-runware-sdk

pkg:composer/daavelar/php-runware-sdk

Statistics

Installs: 725

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.2.0 2025-04-20 14:38 UTC

This package is auto-updated.

Last update: 2025-08-20 15:49:42 UTC


README

A PHP wrapper for the Runware AI API, allowing simple and efficient AI image generation.

Installation

composer require runware/php-runware-sdk

Usage

use Runware\Runware;

$runware = new Runware('your_api_key');

$imageUrl = $runware
    ->withHeight(768)
    ->withWidth(1024)
    ->model('runware:realistic')
    ->withSteps(30)
    ->withCFGScale(8.5)
    ->withNumberResults(4)
    ->withOutputType('URL')
    ->withOutputFormat('PNG')
    ->withNegativePrompt('low quality, blurred')
    ->textToImage('A beautiful sunset over a calm ocean');

$transformedImageUrl = $runware
    ->withHeight(512)
    ->withWidth(512)
    ->withSteps(25)
    ->imageToImage(
        'A beautiful sunset over a calm ocean', 
        'https://url-da-imagem-original.jpg',
        0.7
    );

$inpaintedImageUrl = $runware
    ->inpainting(
        'A beautiful sunset over a calm ocean',
        'https://url-da-imagem-original.jpg',
        'https://url-da-mascara.jpg',
        0.8
    );

$outpaintedImageUrl = $runware
    ->outpainting(
        'A beautiful sunset over a calm ocean',
        'https://url-da-imagem-original.jpg',
        [
            'top' => 256,
            'right' => 256,
            'bottom' => 0,
            'left' => 0
        ],
        0.8
    );

Documentation

For more detailed information on the API, please refer to the Runware API Documentation.

License

This project is licensed under the MIT License. See the LICENSE file for details.