xai-sdk-php, xai-sdk-laravel v0.2.12 add Grok alias
Unofficial PHP and Laravel ports of xAI's TypeScript SDK ship v0.2.12 in lockstep with @xai-official/sdk, adding a non-deprecated Grok client alias and Laravel facade alongside the existing SpaceXSI class. Both packages also fall back to GROK_API_KEY when XAI_API_KEY is unset, with XAI_API_KEY retaining precedence if both are defined.
Same-day parity with xAI's official TypeScript SDK shows solid maintenance discipline for a community PHP port, even if v0.2.12 itself is mostly ergonomic cleanup around xAI's shifting brand names. Still, with zero GitHub stars and a pre-1.0 API surface tracking an experimental upstream client, production PHP teams need to weigh API completeness against bus-factor risk.
- –Exposing Grok as a first-class, non-deprecated alias (new Grok(), Grok type hints, and TiborSrc\XaiSdkLaravel\Facades\Grok) smooths over the awkward SpaceXAI-to-SpaceXSI naming churn inherited from @xai-official/sdk and mirrors upstream's move toward @grok/sdk naming.
- –Falling back to GROK_API_KEY when XAI_API_KEY is empty cuts friction for teams migrating from community Grok wrappers or CLIs, while preserving explicit apiKey configuration overrides.
- –Compared to Laravel's first-party laravel/ai package (which abstracts providers for text and image generation) or DisplaceTech/xai-sdk-php (PHP 8.4+), tibor-src's packages target PHP 8.2+ with no third-party HTTP dependencies and full Responses API coverage—including streaming, structured outputs, voice transcription, files, and batches.
- –Both libraries tightly mirror upstream 0.x releases (sending xai-sdk-version: php/0.2.12 headers), meaning interfaces remain experimental and Composer users should pin exact versions to avoid surprise breaking changes.
DISCOVERED
2h ago
2026-12-01
PUBLISHED
2h ago
2026-12-01
RELEVANCE
AUTHOR
tibor_tee