Download the PHP package sabatinomasala/replicate-php without Composer
On this page you can find all versions of the php package sabatinomasala/replicate-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sabatinomasala/replicate-php
More information about sabatinomasala/replicate-php
Files in sabatinomasala/replicate-php
Package replicate-php
Short Description PHP client for the Replicate API
License MIT
Homepage https://github.com/SabatinoMasala/replicate-php
Informations about the package replicate-php
PHP client for the Replicate API
This is a PHP client for Replicate. It lets you run models from your PHP code and do various other things on Replicate.
Credits
This package is based on the work of https://github.com/sawirricardo/replicate-php
Video
If you're a more visual learner, you can check out this video this package is showcased:
Installation
You can install the package via composer:
Getting an API token
You can get an API token from https://replicate.com/account/api-tokens
Creating a prediction
You can create a prediction as follows:
Running a model
You can run a model and wait on the output as follows:
Chaining multiple models
Because 'run' returns the output of the model, you can chain multiple models together like this:
Usage with official models
Offical models, like Llama, have a different API endpoint. This client automatically switches endpoints, based on the input you give:
Credits
- Original creator of replicate-php: sawirricardo
- sabatinomasala
License
The MIT License (MIT). Please see License File for more information.