PHPackages                             latitudeinnovation/laravel-raraxuan - 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. latitudeinnovation/laravel-raraxuan

ActiveLibrary[API Development](/categories/api)

latitudeinnovation/laravel-raraxuan
===================================

Laravel SDK for Raraxuan AI API

v0.2.0(1mo ago)040↓83.9%1MITPHPPHP ^8.2

Since Jun 4Pushed 1mo agoCompare

[ Source](https://github.com/latitudeinnovation/laravel-raraxuan)[ Packagist](https://packagist.org/packages/latitudeinnovation/laravel-raraxuan)[ Docs](https://ai.raraxuan.com)[ RSS](/packages/latitudeinnovation-laravel-raraxuan/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (4)Used By (1)

Laravel Raraxuan
================

[](#laravel-raraxuan)

Laravel SDK for calling the Raraxuan AI API from Laravel applications.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, 12, or 13

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

[](#installation)

```
composer require latitudeinnovation/laravel-raraxuan
```

Publish the configuration file:

```
php artisan vendor:publish --tag=raraxuan-config
```

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

[](#configuration)

Add these values to your Laravel project's `.env` file:

```
RARAXUAN_API_URL=https://ai.raraxuan.com
RARAXUAN_API_KEY=rx_live_xxxxxxxxx
RARAXUAN_TIMEOUT=60
```

The published config file is `config/raraxuan.php`:

```
return [
    'base_url' => env('RARAXUAN_API_URL', 'https://ai.raraxuan.com'),
    'process_path' => env('RARAXUAN_PROCESS_PATH', '/v1/prompts/process'),
    'ping_path' => env('RARAXUAN_PING_PATH', '/v1/ping'),
    'api_key' => env('RARAXUAN_API_KEY'),
    'timeout' => env('RARAXUAN_TIMEOUT', 60),
];
```

Usage
-----

[](#usage)

Process a prompt through the facade:

```
use LatitudeInnovation\Raraxuan\Facades\Raraxuan;

$response = Raraxuan::processPrompt('customer-support-reply', [
    'customer_message' => 'Hello',
    'tone' => 'friendly',
    'product' => 'Acme',
]);
```

Check API health:

```
use LatitudeInnovation\Raraxuan\Facades\Raraxuan;

$response = Raraxuan::ping();
```

Artisan Commands
----------------

[](#artisan-commands)

After installing and configuring the SDK, you can test the API from Artisan.

Run an agent/template with a JSON variables object:

```
php artisan raraxuan:run customer-support-reply --input='{"customer_message":"Hello","tone":"friendly","product":"Acme"}'
```

Check API health:

```
php artisan raraxuan:ping
```

If the API returns an HTTP error, the commands print the status code and response body instead of a stack trace.

The API returns wrapped JSON payloads, which the SDK returns unchanged:

```
[
    'success' => true,
    'data' => [
        // ...
    ],
]

[
    'success' => false,
    'error' => [
        'code' => '...',
        'message' => '...',
    ],
]
```

Error Handling
--------------

[](#error-handling)

The SDK throws its own exceptions for missing or invalid local configuration:

- `LatitudeInnovation\Raraxuan\Exceptions\MissingApiKeyException`
- `LatitudeInnovation\Raraxuan\Exceptions\InvalidConfigurationException`

API request failures use Laravel's HTTP client and call `throw()` on failed responses. Catch `Illuminate\Http\Client\RequestException` when you need to handle API errors.

```
use Illuminate\Http\Client\RequestException;
use LatitudeInnovation\Raraxuan\Exceptions\RaraxuanException;
use LatitudeInnovation\Raraxuan\Facades\Raraxuan;

try {
    $response = Raraxuan::processPrompt('customer-support-reply', [
        'customer_message' => 'Hello',
        'tone' => 'friendly',
        'product' => 'Acme',
    ]);
} catch (RequestException $exception) {
    report($exception);

    $status = $exception->response->status();
    $error = $exception->response->json();
} catch (RaraxuanException $exception) {
    report($exception);
}
```

Testing
-------

[](#testing)

After installing development dependencies, run:

```
composer test
```

Local Development
-----------------

[](#local-development)

Before publishing to Packagist, require this package from a local Laravel project:

```
composer config repositories.raraxuan path ../laravel-raraxuan
composer require latitudeinnovation/laravel-raraxuan:@dev
```

If Composer cannot detect the package version, add a branch alias or require `dev-main` from a Git checkout.

Queue Support
-------------

[](#queue-support)

Queue and job helpers are not included yet. A future version can add jobs for long-running agent calls while keeping this client as the synchronous API layer.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance91

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Every ~3 days

Total

3

Last Release

44d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33911607?v=4)[Latitude Innovation Sdn Bhd](/maintainers/latitudeinnovation)[@latitudeinnovation](https://github.com/latitudeinnovation)

---

Top Contributors

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

---

Tags

laravelsdkairaraxuan

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/latitudeinnovation-laravel-raraxuan/health.svg)

```
[![Health](https://phpackages.com/badges/latitudeinnovation-laravel-raraxuan/health.svg)](https://phpackages.com/packages/latitudeinnovation-laravel-raraxuan)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

813336.8k3](/packages/defstudio-telegraph)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/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.

5022.6k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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