Search by

aisdk / transport

aisdk

Ready-made Live transport implementations for the PHP AI SDK.

Package info

github.com/phpaisdk/transport

pkg:composer/aisdk/transport

Fund package maintenance!

Open Collective

Statistics

Installs: 25

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

v0.11.0 2026-10-31 02:59 UTC

This package is auto-updated.

Last update: 2026-11-03 18:58:37 UTC


README

WebSocket and bidirectional HTTP/2 transports for PHP AI SDK live sessions. Transport selection follows the endpoint supplied by your provider.

Installation

composer require aisdk/transport aisdk/xai

Set XAI_API_KEY in your environment for this example. Install the provider package you intend to use.

Usage

use AiSdk\Live;
use AiSdk\Transport;
use AiSdk\XAI;

$session = Live::voice()
    ->model(XAI::model('grok-voice-latest'))
    ->voice('eve')
    ->connect(Transport::auto());

// Send microphone audio and consume session events in your application.
$session->close();

Use Transport::webSocket() or Transport::http2() when you need an explicit transport.

Documentation

Read the documentation for configuration, supported features, and more examples.

Contributing ยท Support

License

The MIT License (MIT). See LICENSE for details.