An unofficial PHP SDK for xAI's APIs that provides full feature parity with the official Python SDK. Built for PHP 8.4+, it offers chat completions, streaming, image understanding and generation, function calling, structured outputs, reasoning models, and RAG collections. The library includes OpenTelemetry integration for observability, comprehensive error handling with typed exceptions, and supports multi-turn conversations with stateful management. Installation is via Composer, and the SDK maintains API compatibility with xAI's Python implementation while adapting to PHP-specific patterns like iterators and strict typing.

Sort: