{"id":19529147,"url":"https://github.com/riverside/php-replicate","last_synced_at":"2026-01-03T18:10:10.533Z","repository":{"id":254889333,"uuid":"847080772","full_name":"riverside/php-replicate","owner":"riverside","description":":performing_arts: PHP client for Replicate","archived":false,"fork":false,"pushed_at":"2024-09-09T17:33:59.000Z","size":751,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T17:14:36.301Z","etag":null,"topics":["ai","dreambooth","flux","php","php-api","php-client","replicate","replicate-api","stable-diffusion"],"latest_commit_sha":null,"homepage":"https://riverside.github.io/php-replicate/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/riverside.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-24T19:42:21.000Z","updated_at":"2024-09-09T17:32:17.000Z","dependencies_parsed_at":"2024-11-11T01:23:32.627Z","dependency_job_id":"73728a07-070c-4e33-acd7-8f25d224a31a","html_url":"https://github.com/riverside/php-replicate","commit_stats":null,"previous_names":["riverside/php-replicate"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riverside%2Fphp-replicate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riverside%2Fphp-replicate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riverside%2Fphp-replicate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riverside%2Fphp-replicate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riverside","download_url":"https://codeload.github.com/riverside/php-replicate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250981461,"owners_count":21517851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","dreambooth","flux","php","php-api","php-client","replicate","replicate-api","stable-diffusion"],"created_at":"2024-11-11T01:22:15.288Z","updated_at":"2026-01-03T18:10:10.515Z","avatar_url":"https://github.com/riverside.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-replicate\nPHP client for Replicate\n\n| Build | GitHub pages | Stable | License |\n| ----- | ------------ | ------ | ------- |\n| [![CI][x1]][y1] | [![pages-build-deployment][x4]][y4] | [![Latest Stable Version][x2]][y2] | [![License][x3]][y3] |\n\n### Requirements\n- PHP \u003e= 7.1\n- PHP extensions:\n  - JSON (`ext-php`)\n\n### Dependencies\n- Guzzle HTTP (`guzzlehttp/guzzle`)\n\n### Installation\nIf Composer is not installed on your system yet, you may go ahead and install it using this command line:\n```\n$ curl -sS https://getcomposer.org/installer | php\n```\nNext, add the following require entry to the \u003ccode\u003ecomposer.json\u003c/code\u003e file in the root of your project.\n```json\n{\n    \"require\" : {\n        \"riverside/php-replicate\" : \"^1.0\"\n    }\n}\n```\nFinally, use Composer to install php-replicate and its dependencies:\n```\n$ php composer.phar install \n```\n\n### Configuration\nInclude autoload in your project: \n```php\nrequire __DIR__ . '/vendor/autoload.php';\n```\n\n### How-to use\nCreate an instance of Request:\n```php\n$request = new \\Riverside\\Replicate\\Request('your token');\n```\n\nCreate an instance of Model\n```php\n$model = new \\Riverside\\Replicate\\Model($request);\n```\n\nCall actual endpoint:\n```php\n$response = $model-\u003eget('model owner', 'model name');\n```\n\nGet result:\n```php\nprint_r($response-\u003egetBody());\n```\n\nFull example:\n```php\n\u003c?php\n$request = new \\Riverside\\Replicate\\Request('your token');\n$model = new \\Riverside\\Replicate\\Model($request);\n$response = $model-\u003eget('model owner', 'model name');\nprint_r($response-\u003egetBody());\n```\n\nor\n```php\n\u003c?php\nuse Riverside\\Replicate\\Request;\nuse Riverside\\Replicate\\Model;\n\n$request = new Request('your token');\n$model = new Model($request);\n$response = $model-\u003eget('model owner', 'model name');\nprint_r($response-\u003egetBody());\n```\n\n### Running tests\nDevelopers clone the repository, and if needed, they can create their own **phpunit.xml** by copying **phpunit.xml.dist** and filling in their own configuration without modifying the version-controlled file.\n```\ncp phpunit.xml.dist phpunit.xml\n```\n\n### API\n- [Account][1]\n- [Collection][2]\n- [Deployment][3]\n- [Hardware][4]\n- [Model][5]\n- [Prediction][6]\n- [Request][7]\n- [Response][8]\n- [Training][9]\n- [Webhook][10]\n\n[1]: https://riverside.github.io/php-replicate/api.html#account\n[2]: https://riverside.github.io/php-replicate/api.html#collection\n[3]: https://riverside.github.io/php-replicate/api.html#deployment\n[4]: https://riverside.github.io/php-replicate/api.html#hardware\n[5]: https://riverside.github.io/php-replicate/api.html#model\n[6]: https://riverside.github.io/php-replicate/api.html#prediction\n[7]: https://riverside.github.io/php-replicate/api.html#req\n[8]: https://riverside.github.io/php-replicate/api.html#resp\n[9]: https://riverside.github.io/php-replicate/api.html#training\n[10]: https://riverside.github.io/php-replicate/api.html#webhook\n[x1]: https://github.com/riverside/php-replicate/actions/workflows/main.yml/badge.svg\n[y1]: https://github.com/riverside/php-replicate/actions/workflows/main.yml\n[x2]: https://poser.pugx.org/riverside/php-replicate/v/stable\n[y2]: https://packagist.org/packages/riverside/php-replicate\n[x3]: https://poser.pugx.org/riverside/php-replicate/license\n[y3]: https://packagist.org/packages/riverside/php-replicate\n[x4]: https://github.com/riverside/php-replicate/actions/workflows/pages/pages-build-deployment/badge.svg\n[y4]: https://github.com/riverside/php-replicate/actions/workflows/pages/pages-build-deployment\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friverside%2Fphp-replicate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friverside%2Fphp-replicate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friverside%2Fphp-replicate/lists"}