PHPackages                             aisdk/togetherai - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. aisdk/togetherai

ActiveLibrary

aisdk/togetherai
================

Official TogetherAI provider for the PHP AI SDK.

v0.8.0(1mo ago)01MITPHPPHP ^8.3CI passing

Since Jul 15Pushed 1mo agoCompare

[ Source](https://github.com/phpaisdk/togetherai)[ Packagist](https://packagist.org/packages/aisdk/togetherai)[ Docs](https://github.com/phpaisdk/togetherai)[ RSS](/packages/aisdk-togetherai/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

aisdk/togetherai
================

[](#aisdktogetherai)

[![GitHub Workflow Status](https://camo.githubusercontent.com/dee2518da38e36239d3bb2be1bd3d5bd14ce41804840da9359b98b0ae5a79a54/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706870616973646b2f746f67657468657261692f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473)](https://github.com/phpaisdk/togetherai/actions)[![Total Downloads](https://camo.githubusercontent.com/6cee332a6b28ccf229ea7b19e32b0d1f8401ba37cc5e73bf658ccec4a2dfb850/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616973646b2f746f6765746865726169)](https://packagist.org/packages/aisdk/togetherai)[![Latest Version](https://camo.githubusercontent.com/31aeb7e797d58a6285b6fd73f881fb4cffcaae267d798904d6ac8cdc5442e1e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616973646b2f746f6765746865726169)](https://packagist.org/packages/aisdk/togetherai)[![License](https://camo.githubusercontent.com/5d15d50fe64699a041137841043c886c9a19740510168ada8569fbdddda880cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616973646b2f746f6765746865726169)](https://packagist.org/packages/aisdk/togetherai)[![Why PHP in 2026](https://camo.githubusercontent.com/d2b9305e630caf7daae4ca023de39ece0b885c37461629d42961533f00868b76/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5768795f5048502d696e5f323032362d3741383645383f7374796c653d666c61742d737175617265266c6162656c436f6c6f723d313831383162)](https://whyphp.dev)

---

Official TogetherAI provider for the PHP AI SDK. Uses TogetherAI's Chat Completions API.

Installation
------------

[](#installation)

```
composer require aisdk/togetherai
```

Basic Usage
-----------

[](#basic-usage)

```
use AiSdk\Generate;
use AiSdk\TogetherAI;

$result = Generate::text('What happened in technology today?')
    ->model(TogetherAI::model('meta-llama/Llama-3.3-70B-Instruct-Turbo'))
    ->run();

echo $result->text;
```

Configuration
-------------

[](#configuration)

VariableDescriptionDefault`TOGETHERAI_API_KEY`API key for authenticationRequired`TOGETHERAI_BASE_URL`Base URL for API requests`https://api.togetherai.ai`Supported Capabilities
----------------------

[](#supported-capabilities)

CapabilitySupportText generationNativeStreamingNativeTool callingNativeStructured outputAdapted (`json_object` with an explicit JSON instruction)Text inputNativeProvider-specific fields can be passed through `providerOptions('togetherai', [...])`. Model IDs are opaque strings and TogetherAI remains the authority on model availability.

Testing
-------

[](#testing)

```
composer test:all
```

Documentation
-------------

[](#documentation)

- [PHP AI SDK documentation](https://phpaisdk.com/docs)
- [Together AI documentation](https://phpaisdk.com/docs/togetherai)

Community
---------

[](#community)

- [Contributing](https://github.com/phpaisdk/.github/blob/main/CONTRIBUTING.md)
- [Support](https://github.com/phpaisdk/.github/blob/main/SUPPORT.md)
- For private security reports, email .

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef29d1962da41e7526023f215cf844494e209b2fd163742084cb919a3b508021?d=identicon)[aisdk](/maintainers/aisdk)

---

Top Contributors

[![RanaMoizHaider](https://avatars.githubusercontent.com/u/58527494?v=4)](https://github.com/RanaMoizHaider "RanaMoizHaider (3 commits)")

---

Tags

aillmopenai-compatibleaisdktogetherai

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aisdk-togetherai/health.svg)

```
[![Health](https://phpackages.com/badges/aisdk-togetherai/health.svg)](https://phpackages.com/packages/aisdk-togetherai)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
