PHP SDK
Official SDK for PHP 7.4+.
⚡ The Composer package is coming soon. For now, use the REST API directly with
cURL — see the cURL / REST docs.Install (coming soon)
composer require aigodfather/aigodfather-php
Requirements
- PHP >= 7.4
- ext-curl
- ext-json
Initialize
Pass configuration as an associative array. Same options as Node.js SDK: apiKey, debug, timeout, maxRetries, defaultTags, defaultMetadata, onBlock, onApprovalRequired.
Methods
Same API surface as the Node.js and Python SDKs. All methods return associative arrays.
| Method | Description |
|---|---|
$ai->info(msg, meta) | Info-level event |
$ai->warning(msg, meta) | Warning event |
$ai->error(msg, meta) | Error event |
$ai->critical(msg, meta) | Critical event |
$ai->action(name, opts) | Action (rule engine) |
$ai->waitForApproval(id) | Poll until resolved |
$ai->ping() | Test connection |