securhost / ai-sdk
Official PHP client for the SecurHost AI Gateway — cost-aware chat completions, streaming, job agents, and billing.
Package info
github.com/Zhost-Consulting-Private-Limited/securhost-php
pkg:composer/securhost/ai-sdk
0.1.2
2026-08-30 16:33 UTC
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Official PHP SDK for the SecurHost AI Gateway. PHP 8.1+ compatible.
📦 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
- Log in to Packagist.org.
- Submit repository URL:
https://github.com/Zhost-Consulting-Private-Limited/securhost-php. - Set up the GitHub Service Webhook for automatic version updates.
📄 License
MIT License. Copyright (c) 2026 SecurHost.