PHPackages                             marceloeatworld/runpod-serverless-php - 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. [API Development](/categories/api)
4. /
5. marceloeatworld/runpod-serverless-php

ActiveLibrary[API Development](/categories/api)

marceloeatworld/runpod-serverless-php
=====================================

A PHP client for the RunPod Serverless API

v1.0.0(1y ago)02.9k↓25%MITPHPPHP ^8.1.0

Since Nov 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/marceloeatworld/runpod-serverless-php)[ Packagist](https://packagist.org/packages/marceloeatworld/runpod-serverless-php)[ RSS](/packages/marceloeatworld-runpod-serverless-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

RunPod Serverless PHP Client
============================

[](#runpod-serverless-php-client)

A lightweight PHP client for RunPod Serverless API built with Saloon v3.

Features
--------

[](#features)

- 🚀 Support for all RunPod Serverless endpoints
- 🔄 Async and sync job execution with status tracking
- 📡 Webhook support
- ⚙️ Execution policy control
- 📦 S3 storage integration
- ⚡ Simple, intuitive API

Installation
------------

[](#installation)

```
composer require marceloeatworld/runpod-serverless-php
```

Quick Start
-----------

[](#quick-start)

```
use MarceloEatWorld\RunPod\RunPod;

$runpod = new RunPod('your-api-key');
$endpoint = $runpod->endpoint('your-endpoint-id');

// Async run
$result = $endpoint->run([
    'prompt' => 'A beautiful landscape'
]);

// Check status
if ($result->isInQueue()) {
    echo "Job queued with ID: " . $result->id;
}

// Get status later
$status = $endpoint->status($result->id);

if ($status->isCompleted()) {
    $output = $status->getOutput();
    echo "Job completed!";
} elseif ($status->isFailed()) {
    $error = $status->getError();
    echo "Job failed: " . $error;
}
```

Response Handling
-----------------

[](#response-handling)

The `RunPodResponse` provides:

```
// Status checks
$response->isCompleted();  // true if status is COMPLETED
$response->isInQueue();    // true if status is IN_QUEUE
$response->isInProgress(); // true if status is IN_PROGRESS
$response->isFailed();     // true if status is FAILED
$response->isCancelled();  // true if status is CANCELLED

// Data access
$response->id;             // Job ID
$response->status;         // Status string
$response->data;           // Complete response data

// Helper methods
$response->getOutput();        // Get job output data
$response->getError();         // Get error details
$response->getMetrics();       // Get execution metrics
$response->getExecutionTime(); // Get execution time in ms
$response->getDelayTime();     // Get delay time in ms
```

Advanced Usage
--------------

[](#advanced-usage)

### Using Webhooks

[](#using-webhooks)

```
$result = $endpoint
    ->withWebhook('https://your-site.com/webhook')
    ->run([
        'prompt' => 'Your prompt'
    ]);
```

### Execution Policies

[](#execution-policies)

```
$result = $endpoint
    ->withPolicy([
        'executionTimeout' => 60000,
        'lowPriority' => false,
        'ttl' => 3600000
    ])
    ->run([
        'prompt' => 'Your prompt'
    ]);
```

### S3 Integration

[](#s3-integration)

```
$result = $endpoint
    ->withS3Config([
        'accessId' => 'your-access-id',
        'accessSecret' => 'your-access-secret',
        'bucketName' => 'your-bucket',
        'endpointUrl' => 'your-endpoint-url'
    ])
    ->run([
        'prompt' => 'Your prompt'
    ]);
```

All Available Methods
---------------------

[](#all-available-methods)

```
// Run endpoints
$result = $endpoint->run();      // Async execution
$result = $endpoint->runSync();  // Sync execution

// Status and control
$status = $endpoint->status($jobId);   // Get job status
$health = $endpoint->health();         // Check endpoint health
$cancel = $endpoint->cancel($jobId);   // Cancel a job
$purge = $endpoint->purgeQueue();      // Purge endpoint queue
$stream = $endpoint->stream($jobId);   // Stream job results
```

Laravel Integration
-------------------

[](#laravel-integration)

Add to `config/services.php`:

```
'runpod' => [
    'api_key' => env('RUNPOD_API_KEY'),
],
```

Register in a service provider:

```
public function register()
{
    $this->app->singleton(RunPod::class, function () {
        return new RunPod(config('services.runpod.api_key'));
    });
}
```

Use in controllers:

```
use MarceloEatWorld\RunPod\RunPod;

class AIController extends Controller
{
    public function generate(RunPod $runpod, Request $request)
    {
        $endpoint = $runpod->endpoint('your-endpoint-id');

        $result = $endpoint->run($request->all());

        return response()->json([
            'job_id' => $result->id,
            'status' => $result->status
        ]);
    }
}
```

Support &amp; Security
----------------------

[](#support--security)

For security issues, please email .

License
-------

[](#license)

MIT License - see LICENSE

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

544d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b50b46eb9dc22e81943c192896b4c697c18a2d30bc914948c46a3106637a59f9?d=identicon)[marceloeatworld](/maintainers/marceloeatworld)

---

Top Contributors

[![marceloeatworld](https://avatars.githubusercontent.com/u/20625497?v=4)](https://github.com/marceloeatworld "marceloeatworld (4 commits)")

---

Tags

phpapi clientserverlessrunpod

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/marceloeatworld-runpod-serverless-php/health.svg)

```
[![Health](https://phpackages.com/badges/marceloeatworld-runpod-serverless-php/health.svg)](https://phpackages.com/packages/marceloeatworld-runpod-serverless-php)
```

###  Alternatives

[phplicengine/bitly

Bitly API v4

22277.3k](/packages/phplicengine-bitly)[marceloeatworld/falai-php

Professional PHP client for the fal.ai serverless AI platform

105.5k](/packages/marceloeatworld-falai-php)[fabian-beiner/todoist-php-api-library

A PHP client library that provides a native interface to the official Todoist REST API.

4810.8k](/packages/fabian-beiner-todoist-php-api-library)[sandorian/moneybird-api-php

Moneybird API client for PHP

127.3k](/packages/sandorian-moneybird-api-php)

PHPackages © 2026

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