PHPackages                             dansup/klipy-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. dansup/klipy-php

ActiveLibrary[API Development](/categories/api)

dansup/klipy-php
================

PHP / Laravel client for the Klipy API (GIFs, Stickers, Clips, Memes, AI Emojis).

v1.1.0(1mo ago)2995↓77%MITPHPPHP ^8.1

Since Apr 25Pushed 1mo agoCompare

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

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

klipy-php
=========

[](#klipy-php)

A PHP / Laravel client for the [Klipy API](https://docs.klipy.com) — GIFs, Stickers, Clips, Memes, and AI Emojis.

Works as a plain PHP library or a Laravel package (auto-discovered service provider + facade).

Install
-------

[](#install)

```
composer require dansup/klipy-php
```

Requires PHP 8.1+ and Guzzle 7+. Both are pulled in automatically.

Get an API key
--------------

[](#get-an-api-key)

Sign up at [partner.klipy.com](https://partner.klipy.com). Test keys are free and rate-limited to 100 calls/min — request a production key in the dashboard once you're ready.

Usage (vanilla PHP)
-------------------

[](#usage-vanilla-php)

```
use Klipy\Klipy;

$klipy = new Klipy('your-api-key', [
    'default_locale' => 'en_US', // optional
    'timeout' => 10.0,           // optional
]);

// Trending gifs
$trending = $klipy->gifs()->trending(perPage: 24, page: 1);

foreach ($trending as $gif) {
    echo $gif['title'], ' — ', $gif['files']['gif']['url'], PHP_EOL;
}

if ($trending->hasNext) {
    $next = $klipy->gifs()->trending(page: $trending->nextPage());
}

// Search
$results = $klipy->stickers()->search('cat', perPage: 10);

// Categories
$cats = $klipy->memes()->categories();

// Per-user recents (returns recent items + ad slots)
$recent = $klipy->gifs()->recent(
    customerId: 'user-uuid-from-your-system',
    extra: [
        'ad-min-width' => 50,
        'ad-max-width' => 401,
        'ad-min-height' => 50,
        'ad-max-height' => 250,
    ],
);

// Single item by slug
$gif = $klipy->gifs()->item('slug-from-trending-or-search');

// Hide from recents
$klipy->gifs()->hideFromRecent('user-uuid', 'slug');

// Share / report triggers
$klipy->gifs()->share('slug', customerId: 'user-uuid');
$klipy->gifs()->report('slug', reason: 'inappropriate', customerId: 'user-uuid');

// AI emoji generation (async)
$job = $klipy->aiEmojis()->generate('a happy capybara wearing sunglasses');
$status = $klipy->aiEmojis()->status($job['data']['id']);

// Search suggestions / autocomplete
$suggestions = $klipy->searchSuggestions()->suggestions();
$completions = $klipy->searchSuggestions()->autocomplete('cat');
```

Usage (Laravel)
---------------

[](#usage-laravel)

The service provider is auto-discovered. Publish the config:

```
php artisan vendor:publish --tag=klipy-config
```

Then set your key in `.env`:

```
KLIPY_API_KEY=your-api-key
KLIPY_DEFAULT_LOCALE=en_US

```

Use the facade or resolve from the container:

```
use Klipy\Laravel\Facades\Klipy;

$trending = Klipy::gifs()->trending(perPage: 12);

// or: app(\Klipy\Klipy::class)->gifs()->trending();
```

API surface
-----------

[](#api-surface)

All five content types (`gifs`, `stickers`, `clips`, `memes`, `aiEmojis`) expose the same eight methods:

MethodHTTPDescription`trending(perPage, page, rating, locale, customerId, extra)``GET /{type}/trending`Trending feed`search(q, perPage, page, rating, locale, customerId, extra)``GET /{type}/search`Keyword search`categories(locale, extra)``GET /{type}/categories`Category list`recent(customerId, perPage, page, locale, extra)``GET /{type}/recent/{customer}`Per-user recents (ad-eligible)`item(slug)``GET /{type}/{slug}`Single item lookup`hideFromRecent(customerId, slug)``DELETE /{type}/recent/{customer}/{slug}`Hide from recents`share(slug, customerId, extra)``POST /{type}/{slug}/share`Register share`report(slug, reason, customerId, extra)``POST /{type}/{slug}/report`Report content`aiEmojis()` adds:

MethodHTTPDescription`generate(prompt, customerId, extra)``POST /ai-emojis/generate`Kick off generation job`status(jobId)``GET /ai-emojis/generate/{id}`Poll job status`searchSuggestions()`:

MethodHTTP`suggestions(locale, extra)``GET /search-suggestions``autocomplete(q, locale, extra)``GET /autocomplete`Pagination
----------

[](#pagination)

Methods that return a list (`trending`, `search`, `recent`) return a `PaginatedResponse` that implements `IteratorAggregate`, `Countable`, and `ArrayAccess`. Use it like an array, or read pagination state directly:

```
$page = $klipy->gifs()->trending();

count($page);              // item count on this page
$page[0];                  // first item
foreach ($page as $item) {} // iterate

$page->currentPage;        // int
$page->perPage;            // int
$page->hasNext;            // bool
$page->nextPage();         // int|null — null if no next page
$page->raw;                // full decoded response, including 'result' wrapper
```

Common parameters
-----------------

[](#common-parameters)

- **`per_page`** — 8 to 50, default 24
- **`page`** — 1-based
- **`rating`** — `g` | `pg` | `pg-13` | `r`
- **`locale`** — `xx_YY`, e.g. `en_US`, `ge_GE`, `uk_UK`. Set a global default via the `default_locale` constructor option or the `KLIPY_DEFAULT_LOCALE` env var.

Anything not covered explicitly can be passed via the `extra` array on any method — it's merged straight into the query string (or POST body for share/report).

Error handling
--------------

[](#error-handling)

```
use Klipy\Exceptions\KlipyApiException;
use Klipy\Exceptions\KlipyException;

try {
    $results = $klipy->gifs()->search('cats');
} catch (KlipyApiException $e) {
    // 4xx / 5xx from Klipy
    $e->getStatusCode();   // int
    $e->response;          // full decoded response array
} catch (KlipyException $e) {
    // transport / parse errors
}
```

Custom HTTP client
------------------

[](#custom-http-client)

Pass any `GuzzleHttp\ClientInterface` (or compatible) for testing or to attach middleware:

```
$klipy = new Klipy('your-api-key', [
    'http_client' => new \GuzzleHttp\Client([
        'handler' => $myMockHandler,
    ]),
]);
```

Attribution
-----------

[](#attribution)

Per Klipy's [attribution guidelines](https://docs.klipy.com/attribution): use "Search KLIPY" as the search field placeholder and display the "Powered by KLIPY" logo / watermark where appropriate.

License
-------

[](#license)

MIT.

Stargazing
----------

[](#stargazing)

[![Star History Chart](https://camo.githubusercontent.com/626283c61e6583b56c84cc9f208eddab52fdbfbad81652e7f311462163f1a6e5/68747470733a2f2f6170692e737461722d686973746f72792e636f6d2f7376673f7265706f733d64616e7375702f6b6c6970792d70687026747970653d44617465)](https://star-history.com/#dansup/klipy-php&Date)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance90

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

45d ago

### Community

Maintainers

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

---

Top Contributors

[![dansup](https://avatars.githubusercontent.com/u/877217?v=4)](https://github.com/dansup "dansup (5 commits)")

---

Tags

gifsklipyklipy-apilaravelphpphplaravelgifstickersmemesclipsklipy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dansup-klipy-php/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k8.8M83](/packages/openai-php-laravel)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M901](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3751.2M45](/packages/tencentcloud-tencentcloud-sdk-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74287.1k1](/packages/mozex-anthropic-laravel)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.5k](/packages/scriptdevelop-whatsapp-manager)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

232.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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