PHPackages                             riverside/php-replicate - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. riverside/php-replicate

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

riverside/php-replicate
=======================

PHP client for Replicate

1.0.0(1y ago)36MITPHPPHP &gt;=7.1

Since Sep 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/riverside/php-replicate)[ Packagist](https://packagist.org/packages/riverside/php-replicate)[ Docs](https://github.com/riverside/php-replicate)[ RSS](/packages/riverside-php-replicate/feed)WikiDiscussions main Synced 1mo ago

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

php-replicate
=============

[](#php-replicate)

PHP client for Replicate

BuildGitHub pagesStableLicense[![CI](https://github.com/riverside/php-replicate/actions/workflows/main.yml/badge.svg)](https://github.com/riverside/php-replicate/actions/workflows/main.yml)[![pages-build-deployment](https://github.com/riverside/php-replicate/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/riverside/php-replicate/actions/workflows/pages/pages-build-deployment)[![Latest Stable Version](https://camo.githubusercontent.com/c0aa79a575b78880f5dc4c473d46f2f346409d283fb3306c329fb27bb0ae366b/68747470733a2f2f706f7365722e707567782e6f72672f7269766572736964652f7068702d7265706c69636174652f762f737461626c65)](https://packagist.org/packages/riverside/php-replicate)[![License](https://camo.githubusercontent.com/5bad3f8d928cdaca5f337a6100e8133087cb55a00ad53ac993c1bedad8d3bb83/68747470733a2f2f706f7365722e707567782e6f72672f7269766572736964652f7068702d7265706c69636174652f6c6963656e7365)](https://packagist.org/packages/riverside/php-replicate)### Requirements

[](#requirements)

- PHP &gt;= 7.1
- PHP extensions:
    - JSON (`ext-php`)

### Dependencies

[](#dependencies)

- Guzzle HTTP (`guzzlehttp/guzzle`)

### Installation

[](#installation)

If Composer is not installed on your system yet, you may go ahead and install it using this command line:

```
$ curl -sS https://getcomposer.org/installer | php

```

Next, add the following require entry to the `composer.json` file in the root of your project.

```
{
    "require" : {
        "riverside/php-replicate" : "^1.0"
    }
}
```

Finally, use Composer to install php-replicate and its dependencies:

```
$ php composer.phar install

```

### Configuration

[](#configuration)

Include autoload in your project:

```
require __DIR__ . '/vendor/autoload.php';
```

### How-to use

[](#how-to-use)

Create an instance of Request:

```
$request = new \Riverside\Replicate\Request('your token');
```

Create an instance of Model

```
$model = new \Riverside\Replicate\Model($request);
```

Call actual endpoint:

```
$response = $model->get('model owner', 'model name');
```

Get result:

```
print_r($response->getBody());
```

Full example:

```
