Search by

runapi-ai / gpt-image-2.5

runapi

RunAPI GPT Image 2.5 Composer package for PHP applications

v0.1.1 2026-09-11 02:49 UTC

This package is not auto-updated.

Last update: 2026-09-12 01:13:18 UTC


README

Packagist

The GPT Image 2.5 PHP SDK provides text-to-image and image editing clients. Requests select gpt-image-2.5-flare or gpt-image-2.5-sunburst.

Install

composer require runapi-ai/gpt-image-2.5

Quick start

<?php

require __DIR__ . "/vendor/autoload.php";

use RunApi\GptImage25\GptImage25Client;

$client = new GptImage25Client();
$task = $client->textToImage->create([
    'model' => 'gpt-image-2.5-flare',
    'prompt' => 'A precise product render on white marble',
    'aspect_ratio' => '1:1',
    'output_resolution' => '1k',
]);
$status = $client->textToImage->get($task->id);

Use create() to submit, get() to fetch task status, and run() to create and poll until completion. Keep RUNAPI_API_KEY in the environment or a secret manager.

RunAPI-generated file URLs are temporary. Store generated files in durable storage within 7 days.

Links

License

Licensed under the Apache License, Version 2.0.