PHP code example of halilcosdu / laravel-replicate
1. Go to this page and download the library: Download halilcosdu/laravel-replicate library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
halilcosdu / laravel-replicate example snippets
return [
'api_token' => env('REPLICATE_API_TOKEN'),
'api_url' => env('REPLICATE_API_URL', 'https://api.replicate.com/v1'),
];
Replicate::account()
Replicate::getCollection(string $slug)
Replicate::listCollections()
Replicate::listDeployments()
Replicate::createDeployment(array $data)
Replicate::getDeployment(string $owner, string $name)
Replicate::updateDeployment(string $owner, string $name, array $data)
Replicate::listHardware()
Replicate::createModel(array $data)
Replicate::getModel(string $owner, string $name)
Replicate::getModelVersion(string $owner, string $name, string $version)
Replicate::listModelVersions(string $owner, string $name)
Replicate::deleteModelVersion(string $owner, string $name, string $version)
Replicate::listModels()
Replicate::createPrediction(array $data)
Replicate::getPrediction(string $id)
Replicate::cancelPrediction($id)
Replicate::listPredictions()
Replicate::listTrainings()
Replicate::createTraining(string $owner, string $name, string $version, array $data)
Replicate::getTraining(string $id)
Replicate::cancelTraining($id)
Replicate::defaultSecret()
Replicate::createDeploymentPrediction(string $owner, string $name, array $data)
Replicate::createModelPrediction(string $owner, string $name, string $version, array $data)
use HalilCosdu\Replicate\Facades\Replicate;
$response = Replicate::account();