PHPackages                             devkind/rytr-php - 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. [API Development](/categories/api)
4. /
5. devkind/rytr-php

ActiveLibrary[API Development](/categories/api)

devkind/rytr-php
================

v1.1(3y ago)015MITPHPPHP ^7.4|^8.0

Since Nov 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/devkindhq/rytr-php)[ Packagist](https://packagist.org/packages/devkind/rytr-php)[ Docs](https://github.com/devkind/rytr-php)[ RSS](/packages/devkind-rytr-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

PHP client to communicate with Rytr API
=======================================

[](#php-client-to-communicate-with-rytr-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a0ddb6ec3e5fc73074a028b0ac3ccb14bf4bdf26905cf63d18d7be6d9ee58095/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465766b696e642f727974722d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devkind/rytr-php)[![Total Downloads](https://camo.githubusercontent.com/415d96a664f2f1d199102884d41b97081fb064028fc33f73cd9010568a0a73bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6465766b696e642f727974722d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devkind/rytr-php)

[![GitHub Actions](https://github.com/devkindhq/rytr-php/actions/workflows/main.yml/badge.svg)](https://github.com/devkindhq/rytr-php/actions/workflows/main.yml/badge.svg)

RytrPhp is a simple SDK implementation of Rytr API. It helps accessing the API in an object oriented way.

Oficial Rytr-me page:

Oficial Rytr-me git documentation:

### Getting the API key

[](#getting-the-api-key)

please register an account and request an api key at [Rytr](https://rytr.me).

Please check out the tutorials section for more information

- [Find your API key](https://rytr.me/developers/api)

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

[](#installation)

You can install the package via composer:

```
composer require devkind/rytr-php
```

Usage
-----

[](#usage)

### Initialization:

[](#initialization)

```
use Devkind\RytrPhp;

/** @var \Devkind\RytrPhp */
$rytr  =  new RytrPhp(API_KEY);
```

alternatively we can initialize static

```
/** @var \Devkind\RytrPhp */
$rytr  =  \Devkind\RytrPhp::make(API_KEY);
```

Objects / Endpoints:
--------------------

[](#objects--endpoints)

Endpoints are basically the type of content that is supported by Rytr.

Each endpoint requireds an `$tone` and `$language` parameter to query from rytr.

### Defaults

[](#defaults)

> protected $language = '607adac76f8fe5000c1e636d'; //english

`language="🇺🇸 English"` - language in which the texts will be generated - **change using setLangugage()**

> protected $language = '607adac76f8fe5000c1e636d'; //english

`tone="Casual"` - tones in which the text will be - **change using setTone()**

> protected int $variations = 1;

`variations = 1` - number of texts in response - **change using setVariation()**

> protected string $format = 'text';

`formats='html'` - html or text - \*\* **change using setFormat()**\*\*

> protected string $creativityLevel = 'default';

`creativity_level='default'` - fault | none | low | medium | high | max - **change using setCreativityLevel()**

`user_id='USER1'` - "*For userId you need to supply user ID from your database, eg: primary key for users database table.*" - **change using setUserId()**

in order to change the language or tone we can call the setter methods, which is available on all the endpoints.

to set the language

```
/** @var \Devkind\RytrPhp\Endpoints\Usercases\BrandName */
$endpoint = $rytr->BrandName->setLanguage('english');
```

to set the tone

```
/** @var \Devkind\RytrPhp\Endpoints\Usercases\BrandName */
$endpoint = $rytr->BrandName->setTone('candid');
```

alternatively:

```
/** @var \Devkind\RytrPhp\Endpoints\Usercases\BrandName */
$endpoint = $rytr->BrandName->setTone('candid')->setLanguage('english')->setVariation(10);
```

All the endpoints can be called into three different ways

#### through the `get` method

[](#through-the-get-method)

```
/** @var \Devkind\RytrPhp\Endpoints\UseCases\BrandName */
$endpoint = $object->BrandName;

$endpoint = $endpoint->get(['brandDescription' => "google"]);
```

#### through the setter methods

[](#through-the-setter-methods)

```
/** @var \Devkind\RytrPhp\Endpoints\UseCases\BrandName */
$endpoint = $object->BrandName;

$endpoint = $endpoint
    ->setBrandDescription("google")
    ->setVariations(10)
    ->setUserId(100)
    ->setFormat('html')
    ->setCreativityLevel('medium')
    ->get();
```

#### through the `generate` method

[](#through-the-generate-method)

```
/** @var \Devkind\RytrPhp\Endpoints\UseCases\BrandName */
$endpoint = $object->BrandName;

$endpoint = $endpoint->generate("google");
```

### Supported Objects / Endpoints:

[](#supported-objects--endpoints)

#### [Click here ](https://github.com/devkindhq/rytr-php/blob/main/endpoints.md) to view the entire documentation of supported endpoints

[](#click-here--to-view-the-entire-documentation-of-supported-endpoints)

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Devkind Developer](https://github.com/devkindhq)
- [Devkind Developer](https://devkind.com.au/)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.2% 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

Every ~6 days

Total

2

Last Release

1277d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7828ff29033f88e33044a6606e46c6f729ad1729914a4efd4c3b2086ef91094c?d=identicon)[devkind](/maintainers/devkind)

---

Top Contributors

[![saad-bhutto](https://avatars.githubusercontent.com/u/5573883?v=4)](https://github.com/saad-bhutto "saad-bhutto (12 commits)")[![saad-devkind](https://avatars.githubusercontent.com/u/69035117?v=4)](https://github.com/saad-devkind "saad-devkind (5 commits)")[![devkind-au](https://avatars.githubusercontent.com/u/115474122?v=4)](https://github.com/devkind-au "devkind-au (2 commits)")

---

Tags

apidevkindrytr-php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/devkind-rytr-php/health.svg)

```
[![Health](https://phpackages.com/badges/devkind-rytr-php/health.svg)](https://phpackages.com/packages/devkind-rytr-php)
```

###  Alternatives

[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[bushlanov-dev/max-bot-api-client-php

Max Bot API Client library

281.6k](/packages/bushlanov-dev-max-bot-api-client-php)

PHPackages © 2026

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