PHPackages                             easelify/replicate-php - 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. [API Development](/categories/api)
4. /
5. easelify/replicate-php

ActiveLibrary[API Development](/categories/api)

easelify/replicate-php
======================

A PHP client for Replicate

035PHP

Since Apr 26Pushed 2y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Replicate PHP client
====================

[](#replicate-php-client)

A PHP client for [Replicate](https://replicate.com). It lets you run models from your PHP code, and everything else you can do with [Replicate's HTTP API](https://replicate.com/docs/reference/http).

```
use replicate\lib\Predictions;

$config = ['auth' => 'put your api key here'];
$predictions = new Predictions($config);

// 获取已经创建的预测列表
$res = $predictions->list();
print_r($res);

// 获取单个预测详情 (服务侧结果只保留1小时, 创建后及时获取内容, 或者使用 webhook 接收通知, 将预测结果持久化)
$res = $predictions->get('x5wz2klb6trqvatl7ugjkvzfte');
print_r($res);

// 创建预测(问答或绘图)
$options = [
    'version' => 'f4e2de70d66816a838a89eeeb621910adffb0dd0baba3976c96980970978018d',
    'input' => [
        'prompt' => 'How many states in USA?',
        // 'system_prompt' => 'You are a helpful, respectful and honest assistant.',
        // 'max_new_tokens' => 500,
        // 'min_new_tokens' => -1,
        // 'temperature' => 0.75,
        // 'top_p' => 1,
        // 'top_k' => 50,
        // 'stop_sequences' => ',',
        // 'seed' => '',   // 留空则随机
    ],

    // https://replicate.com/docs/webhooks
    // 'webhook' => 'https://yourdomain.com/replicate/prediction', // 仅支持 https
    // 'webhook_events_filter' => ['start', 'output', 'logs', 'completed'], // 一般只选择 completed

    // 'stream' => false
];
$res = $predictions->create($options);
print_r($res);
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8d1c9871c21a441b7bb5b777e792dad86f4031712c317b66946b2853b80a4bb?d=identicon)[easelify](/maintainers/easelify)

---

Top Contributors

[![easelify](https://avatars.githubusercontent.com/u/8364802?v=4)](https://github.com/easelify "easelify (3 commits)")[![yvtang](https://avatars.githubusercontent.com/u/9100329?v=4)](https://github.com/yvtang "yvtang (1 commits)")

### Embed Badge

![Health badge](/badges/easelify-replicate-php/health.svg)

```
[![Health](https://phpackages.com/badges/easelify-replicate-php/health.svg)](https://phpackages.com/packages/easelify-replicate-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
