Search by

securhost / ai-sdk

ramkrishna70

Official PHP client for the SecurHost AI Gateway — cost-aware chat completions, streaming, job agents, and billing.

0.1.2 2026-08-30 16:33 UTC

This package is auto-updated.

Last update: 2026-08-30 16:34:35 UTC


README

Official PHP SDK for the SecurHost AI Gateway. PHP 8.1+ compatible.

Release License: MIT

📦 Installation

Install via Composer from GitHub

In your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/Zhost-Consulting-Private-Limited/securhost-php.git"
        }
    ],
    "require": {
        "securhost/ai-sdk": "^0.1.0"
    }
}

Or via Packagist:

composer require securhost/ai-sdk

🚀 Quickstart

<?php

require_once __DIR__ . '/vendor/autoload.php';

use SecurHost\SecurHostClient;

$client = new SecurHostClient('nxs_live_...');

$reply = $client->chat([
    ['role' => 'user', 'content' => 'Categorize customer feedback sentiment.']
], [
    'model' => 'gpt-4o',
    'request_type' => 'classification'
]);

echo "Response: " . $reply->outputText() . PHP_EOL;
echo "Cost: $" . $reply->cost->amount . " | Saved: $" . $reply->cost->saved . PHP_EOL;

🛠️ Publishing to Packagist

  1. Log in to Packagist.org.
  2. Submit repository URL: https://github.com/Zhost-Consulting-Private-Limited/securhost-php.
  3. Set up the GitHub Service Webhook for automatic version updates.

📄 License

MIT License. Copyright (c) 2026 SecurHost.