PHPackages                             andmarruda/runpod-module-laravel - 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. andmarruda/runpod-module-laravel

ActiveLibrary[API Development](/categories/api)

andmarruda/runpod-module-laravel
================================

Laravel SDK for RunPod API access, serverless jobs, billing, logs, and optional operation audit.

0.1(1mo ago)068MITPHP ^8.3

Since Jul 6Compare

[ Source](https://github.com/andmarruda/runpod-module-laravel)[ Packagist](https://packagist.org/packages/andmarruda/runpod-module-laravel)[ RSS](/packages/andmarruda-runpod-module-laravel/feed)WikiDiscussions Synced 1w ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

RunPod Module Laravel
=====================

[](#runpod-module-laravel)

Laravel SDK-style package for RunPod API access, serverless jobs, billing, logs, and optional operation audit.

Package name:

```
andmarruda/runpod-module-laravel
```

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

[](#installation)

Install the package in a Laravel application:

```
composer require andmarruda/runpod-module-laravel
```

Laravel package auto-discovery registers the service provider automatically.

Publish the config:

```
php artisan vendor:publish --tag=runpod-module-config
```

If the application wants the optional local audit tables for operations, logs and costs, publish and run the migrations:

```
php artisan vendor:publish --tag=runpod-module-migrations
php artisan migrate
```

Configuration
-------------

[](#configuration)

Add the RunPod API key to the host application's `.env`:

```
RUNPOD_API_KEY=
RUNPOD_BASE_URL=https://api.runpod.ai/v2
RUNPOD_DEFAULT_TIMEOUT=900
RUNPOD_DEFAULT_POLL_INTERVAL=5
```

Optional cost estimation settings:

```
RUNPOD_DEFAULT_PRICE_PER_SECOND=
RUNPOD_DEFAULT_GPU_TYPE=
RUNPOD_DEFAULT_GPU_COUNT=1
```

Optional billing path override:

```
RUNPOD_BILLING_PATH=billing
```

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

[](#quick-start)

Resolve the main SDK object from Laravel's container:

```
use Andmarruda\RunpodModule\RunpodApi;

$runpod = app(RunpodApi::class);
```

Run a serverless job:

```
$response = $runpod->runJob(
    endpointId: 'your-endpoint-id',
    input: [
        'task' => 'sync',
        'payload' => ['external_id' => 'abc-123'],
    ],
    policy: [
        'idempotency_key' => 'abc-123:sync',
    ],
);

$jobId = $response['id'] ?? null;
```

Read job status:

```
$status = $runpod->getJobStatus('your-endpoint-id', $jobId);
```

Read job logs:

```
$logs = $runpod->getJobLogs('your-endpoint-id', $jobId);
```

Cancel a job:

```
$runpod->cancelJob('your-endpoint-id', $jobId);
```

Endpoint Helper
---------------

[](#endpoint-helper)

For repeated calls to the same endpoint:

```
$endpoint = $runpod->endpoint('your-endpoint-id');

$job = $endpoint->run(['task' => 'sync'], ['idempotency_key' => 'abc-123:sync']);
$status = $endpoint->status($job['id']);
$logs = $endpoint->logs($job['id']);
$endpoint->cancel($job['id']);
```

Endpoint-scoped custom API paths are also available:

```
$endpoint->get('health');
$endpoint->post('custom-action', ['enabled' => true]);
```

Generic RunPod API Calls
------------------------

[](#generic-runpod-api-calls)

Use generic methods when RunPod adds or changes endpoints and the package does not need a dedicated helper:

```
$runpod->get('billing');
$runpod->post('custom/path', ['key' => 'value']);
$runpod->put('custom/resource', ['name' => 'Updated']);
$runpod->patch('custom/resource', ['enabled' => true]);
$runpod->delete('custom/resource');
```

For full control over method, payload, query and headers:

```
$response = $runpod->request(
    method: 'GET',
    path: 'custom/search',
    query: ['page' => 2],
    headers: ['X-Custom-Header' => 'value'],
);
```

Billing
-------

[](#billing)

Read the configured billing endpoint:

```
$billing = $runpod->billing();
$billing = $runpod->billing(['from' => '2026-07-01']);
```

The billing path is configurable through `RUNPOD_BILLING_PATH`.

Optional Operation Audit
------------------------

[](#optional-operation-audit)

The package includes an optional persistence layer for applications that want local operation history, logs and cost records.

Application services:

- `Andmarruda\RunpodModule\Application\DispatchProviderOperation`
- `Andmarruda\RunpodModule\Application\RefreshProviderOperation`
- `Andmarruda\RunpodModule\Application\CaptureProviderOperationLogs`
- `Andmarruda\RunpodModule\Application\RecordProviderOperationCost`
- `Andmarruda\RunpodModule\Application\CancelProviderOperation`

Generic event:

- `Andmarruda\RunpodModule\Events\ProviderOperationUpdated`

Use this layer when the host application needs a database-backed audit trail. For direct RunPod API access, prefer `RunpodApi`.

Host-Owned Concerns
-------------------

[](#host-owned-concerns)

This package does not own product workflows, callback routes, webhook payload contracts, authorization rules, UI updates, notifications, or business-specific continuation logic.

If a RunPod workflow needs callbacks or webhooks, implement that controller in the host application where the expected payload shape and side effects are known.

Package Development
-------------------

[](#package-development)

Install dependencies:

```
composer install
```

Run tests:

```
composer test
```

Run formatting check:

```
composer lint:check
```

Run static analysis:

```
composer stan
```

Validate Composer metadata:

```
composer validate --strict
```

Release Checklist
-----------------

[](#release-checklist)

Before tagging the first release:

- confirm the package name is `andmarruda/runpod-module-laravel`;
- add a `LICENSE` file;
- verify `composer validate --strict`;
- run `composer test`, `composer lint:check`, and `composer stan`;
- validate RunPod API paths against a real API key in a host app or sandbox;
- review the migration table names before freezing the first public version.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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

48d ago

### Community

Maintainers

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/andmarruda-runpod-module-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/andmarruda-runpod-module-laravel/health.svg)](https://phpackages.com/packages/andmarruda-runpod-module-laravel)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

818355.4k3](/packages/defstudio-telegraph)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)

PHPackages © 2026

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