Replicate Laravel PHP Client
Published on by Paul Redmond
The Replicate Laravel package is a PHP client for the Replicate API, an API to run and fine-tune open-source AI models. Here's a quick example from the package's readme of using the Replicate Laravel client:
use HalilCosdu\Replicate\Facades\Replicate; $response = Replicate::createModel($data) // Response methods$response->body(); // string$response->json($key = null, $default = null); // mixed$response->object(); // object$response->collect($key = null); // Illuminate\Support\Collection$response->status(); // int$response->successful(); // bool$response->redirect(); // bool$response->failed(); // bool$response->clientError(); // bool$response->header($header); // string$response->headers(); // array
At the release of this post, the Replicate Laravel client has the following endpoints:
- Account
- Models
- Predictions
- Trainings
- Model collection
- Deployments
- Model hardware
- And more...
For usage examples, see the complete Replicate API documentation. The Replicate API lets you generate images, text, videos, music, speech, and more using thousands of community models. To start using Replicate Laravel in your own applications, check out this package on GitHub at halilcosdu/laravel-replicate.