PHPackages                             soiposervices/comfydeploy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. soiposervices/comfydeploy

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

soiposervices/comfydeploy
=========================

A PHP client for the Comfy Deploy API

0.2.1(1y ago)07803MITPHPPHP ^8.1.0

Since Apr 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/SoipoServices/comfydeploy)[ Packagist](https://packagist.org/packages/soiposervices/comfydeploy)[ RSS](/packages/soiposervices-comfydeploy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (7)Used By (0)

Comfy Deploy PHP client
=======================

[](#comfy-deploy-php-client)

This is a framework-agnostic PHP client for [Comfy Deploy.com](https://www.comfydeploy.com/) built on the amazing [Saloon v3](https://docs.saloon.dev/) 🤠 library. Use it to easily interact with machine learning models such as Stable Diffusion right from your PHP application.

[![Latest Version on Packagist](https://camo.githubusercontent.com/fbd38fb4b16743fa010e9b726ca14404552d0f37cda778b46cf52d55361425c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f69706f73657276696365732f636f6d66796465706c6f792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/soiposervices/comfydeploy)[![GitHub Tests Action Status](https://github.com/SoipoServices/comfydeploy/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/SoipoServices/comfydeploy/actions/workflows/tests.yml)

Table of contents
-----------------

[](#table-of-contents)

- [Quick Start](https://github.com/soiposervices/comfydeploy#-quick-start)
- [Using with Laravel](https://github.com/soiposervices/comfydeploy#using-with-laravel)
- [Response Data](https://github.com/soiposervices/comfydeploy#response-data)
- [Webhooks](https://github.com/soiposervices/comfydeploy#webhooks)
- [Workflow Methods](https://github.com/soiposervices/comfydeploy#available-prediction-methods)
    - [get](https://github.com/soiposervices/comfydeploy#get)
    - [run](https://github.com/soiposervices/comfydeploy#run)

🚀 Quick start
-------------

[](#-quick-start)

Install with composer.

```
composer require soiposervices/comfydeploy
```

Create a new api instance.

```
use SoipoServices\ComfyDeploy\ComfyDeploy;
...

$api = new ComfyDeploy(
    apiToken: $_ENV['COMFY_DEPLOY_API_TOKEN'],
);
```

Then use it to invoke your model (or in comfy deploy terms "create a workflow").

```
$deployment_id = 'e4a14vs9-q40j-4ee2-1375-778b2je3221c';
$input = [
    'model' => 'prompt',
    'postive_prompt' => 'a photo of an astronaut riding a horse on mars',
    'seed' => null,
];

$data = $api->workflows()->run($deployment_id, $input);
$data->run_id; // 257b65b8-ac23-49be-8aca-53d2dd8556c6
```

Using with Laravel
------------------

[](#using-with-laravel)

Begin by adding your credentials to your services config file.

```
// config/services.php
'comfy_deploy' => [
    'api_token' => env('COMFY_DEPLOY_API_TOKEN'),
],
```

Bind the `ComfyDeploy` class in a service provider.

```
// app/Providers/AppServiceProvider.php
public function register()
{
    $this->app->bind(ComfyDeploy::class, function () {
        return new ComfyDeploy(
            apiToken: config('services.comfy_deploy.api_token'),
        );
    });
}
```

And use anywhere in your application.

```
$data = app(ComfyDeploy::class)->workflows()->get($run_id);
```

Test your integration using Saloon's amazing [response recording](https://docs.saloon.dev/testing/recording-requests#fixture-path).

```
use Saloon\Laravel\Saloon; // composer require sammyjo20/saloon-laravel "^2.0"
...
Saloon::fake([
    MockResponse::fixture('getWorkflow'),
]);

$run_id = '257b65b8-ac23-49be-8aca-53d2dd8556c6';

// The initial request will check if a fixture called "getWorkflow"
// exists. Because it doesn't exist yet, the real request will be
// sent and the response will be recorded to tests/Fixtures/Saloon/getWorkflow.json.
$data = app(ComfyDeploy::class)->workflows()->get($run_id);

// However, the next time the request is made, the fixture will
// exist, and Saloon will not make the request again.
$data = app(ComfyDeploy::class)->workflows()->get($run_id);
```

Response Data
-------------

[](#response-data)

All responses are returned as data objects. Detailed information can be found by inspecting the following class properties:

- [GetWorkflowData](https://github.com/SoipoServices/comfydeploy/blob/main/src/Data/GetWorkflowData.php)
- [RunWorkflowData](https://github.com/SoipoServices/comfydeploy/blob/main/src/Data/RunWorkflowData.php)

Webhooks
--------

[](#webhooks)

Comfy Deploy allows you to configure a webhook to be called when your prediction is complete. To do so chain `withWebhook($url)` onto your api instance before calling the `run` method. For example:

```
$api->workflows()->withWebhook('https://www.example.com/webhook')->run($deployment_id, $input);
$data->run_id; // 257b65b8-ac23-49be-8aca-53d2dd8556c6
```

Available Workflow Methods
--------------------------

[](#available-workflow-methods)

### get()

[](#get)

Use to get details about an existing workflow.

```
use SoipoServices\ComfyDeploy\Data\GetWorkflowData;
...
$run_id = '257b65b8-ac23-49be-8aca-53d2dd8556c6'
/* @var GetWorkflowData $data */
$data = $api->workflows()->get($run_id);
$data->id;
```

### run()

[](#run)

Use to run a workflow via deployment\_id. Returns an RunWorkflowData object.

```
use SoipoServices\ComfyDeploy\Data\RunWorkflowData
...
$deployment_id = 'e4a14vs9-q40j-4ee2-1375-778b2je3221c';
$input = [
    'postive_prompt' => 'a photo of an astronaut riding a horse on mars',
];

/* @var RunWorkflowData $data */
$data = $api->workflows()
    ->withWebhook('https://www.example.com/webhook') // optional
    ->run($deployment_id, $input);
$data->run_id; // 257b65b8-ac23-49be-8aca-53d2dd8556c6
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~64 days

Total

4

Last Release

569d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6cbf7b15aa95b4f96a243793fdcb6365420dda7a873cef7424384ea815aa80bf?d=identicon)[SoipoServices](/maintainers/SoipoServices)

---

Top Contributors

[![olamiposi-soipo](https://avatars.githubusercontent.com/u/105737368?v=4)](https://github.com/olamiposi-soipo "olamiposi-soipo (4 commits)")[![soipo](https://avatars.githubusercontent.com/u/2483887?v=4)](https://github.com/soipo "soipo (4 commits)")

---

Tags

phppackagedeploycomfy

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/soiposervices-comfydeploy/health.svg)

```
[![Health](https://phpackages.com/badges/soiposervices-comfydeploy/health.svg)](https://phpackages.com/packages/soiposervices-comfydeploy)
```

###  Alternatives

[brunodebarros/git-deploy-php

git-deploy-php is a simple php-based tool that deploys your Git repositories to FTP/SFTP servers, and keeps them updated automatically.

2921.2k](/packages/brunodebarros-git-deploy-php)[rizeway/anchour

Toolkit for deploying web applications

265.7k](/packages/rizeway-anchour)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
