PHP SDK for the PromptJuggler API

Maintainers

Package info

github.com/motleyhand/promptjuggler-php-sdk

pkg:composer/promptjuggler/sdk

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v1.0.3 2026-06-26 14:39 UTC

This package is auto-updated.

Last update: 2026-06-26 18:58:41 UTC


README

The official PHP client for the PromptJuggler API. Run prompts and workflows, manage knowledge bases, and verify webhooks — fully typed, with flat, synchronous methods.

Requirements

  • PHP 8.2+

Installation

composer require promptjuggler/sdk

Usage

use PromptJuggler\Client\PromptJuggler;
use PromptJuggler\Client\Models\RunStatus;

$pj = new PromptJuggler('your-api-key');

// Trigger a run (async — returns the run ID)
$created = $pj->runPrompt('greeting', 'production', inputs: ['name' => 'Ada']);

// Poll for the result
$run = $pj->getPromptRun($created->getId());
if ($run->getStatus()?->is(RunStatus::COMPLETED)) {
    echo $run->getOutput();
}

Errors surface as PromptJuggler\Client\Exception\ApiException (with a statusCode). Verify incoming webhooks with PromptJuggler\Client\Webhook\WebhookSignature::isValid().

Documentation

Full guides and the API reference: https://docs.promptjuggler.com/sdks/php/overview

License

MIT