PHPackages                             tinq-ai/tinq-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. tinq-ai/tinq-php

ActiveLibrary[API Development](/categories/api)

tinq-ai/tinq-php
================

A PHP Wrapper for the Tinq.ai API - Ready-to-use Natural language processing toolkit

1.1.x-dev(4y ago)3416MITPHPPHP ^8.0.2

Since Mar 12Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (4)Used By (0)

Tinq.ai PHP Library
===================

[](#tinqai-php-library)

[![Tinq.ai logo](https://camo.githubusercontent.com/5abec68b88e84832ada4664f798442e7a7b33945c44403fbaaad620c06022ea6/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f74696e712d61692f696d6167652f75706c6f61642f76313634323031313338322f776562736974652f74696e712d6c6f676f2d776974682d6265655f746b616a31382e737667)](https://camo.githubusercontent.com/5abec68b88e84832ada4664f798442e7a7b33945c44403fbaaad620c06022ea6/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f74696e712d61692f696d6167652f75706c6f61642f76313634323031313338322f776562736974652f74696e712d6c6f676f2d776974682d6265655f746b616a31382e737667)

A PHP wrapper for the Tinq.ai API - an easy-to-use text analysis and natural language processing toolkit.

Documentation
-------------

[](#documentation)

Find the full API documentation [here](https://developers.tinq.ai/)

Requirements
------------

[](#requirements)

- PHP 8.0 or Higher

Installation
------------

[](#installation)

Install the package with:

```
composer require tinq-ai/tinq-php
```

To use the bindings, load it via Autoload:

```
require_once('vendor/autoload.php');
```

Usage
-----

[](#usage)

### Table of Contents

[](#table-of-contents)

- [Authentication](#authentication)
- [Rewriter](#rewriter)
- [Summarizer](#summarizer)
- [Classifier](#classifier)
- [Article Extractor](#article-extractor)
- [Sentiment Analysis](#sentiment-analysis)
- [Plagiarism Checker](#plagiarism-checker)

> Please note that all methods return associative arrays. Responses can be found in the developer documentation [here](https://developers.tinq.ai/).

### Authentication

[](#authentication)

Get the API key for your project in Tinq.ai and then instantiate a new client.

```
$tinq = new Tinq\TinqClient("your_api_key");
```

Alternatively, set the API key and your username in an environment variable named `TINQ_API_KEY` and `TINQ_USERNAME`, respectively.

```
$tinq = new Tinq\TinqClient();
```

### Rewriter

[](#rewriter)

Rewrites or paraphrases a given text.

- `$text` - The content to rewrite.
- `$params` (optional) - A list of accepted parameters is available [here](https://developers.tinq.ai/reference/rewriter).

```
$text = "The process of learning a new piece of music is fantastic...";
$rewritten = $tinq->rewrite($text, $params = []);
```

### Summarizer

[](#summarizer)

Summarizes a given text.

- `$text` - The content to summarize.
- `$params` (optional) - A list of accepted parameters is available [here](https://developers.tinq.ai/reference/summarizer).

```
$text = "Bernal’s case study is Tullis Mason, a chap who sports...";
$summary = $tinq->summarize($text, $params = []);
```

### Classifier

[](#classifier)

Classifies a given text according to a specified classifier.

- `$text` - The content to classify.
- `$classifier` - The classifier ID.
- `$params` (optional) - A list of accepted parameters is available [here](https://developers.tinq.ai/reference/classifier).

```
$text = "Hi, I need help with my website.";
$classifier = "fjew833"; // Your classifier ID on Tinq.ai
$classification = $tinq->classify($text, $classifier, $params = []);
```

### Article Extractor

[](#article-extractor)

Extracts clean text from an article given its URL.

- `$url` - The URL to extract an article from.
- `$params` (optional) - A list of accepted parameters is available [here](https://developers.tinq.ai/reference/article-extractor).

```
$url = "https://longreads.com/2021/08/19/bringing-species-back-from-the-brink/";
$article = $tinq->extractArticle($url, $params = []);
```

### Sentiment Analysis

[](#sentiment-analysis)

Performs sentiment analysis on a given text.

- `$text` - The content to analyze.
- `$params` (optional) - A list of accepted parameters is available [here](https://developers.tinq.ai/reference/sentiment-analysis).

```
$text = "I really like you.";
$sentimentAnalysis = $tinq->sentiments($text, $params = []);
```

### Plagiarism Checker

[](#plagiarism-checker)

Checks for plagiarism and finds online sources for given content.

- `$text` - The content to check for plagiarism.
- `$params` (optional) - A list of accepted parameters is available [here](https://developers.tinq.ai/reference/plagiarism-checker).

```
$text = "Bernal’s case study is Tullis Mason, a chap who sports...";
$plagiarismCheck = $tinq->checkPlagiarism($text, $params = []);
```

Contributing
------------

[](#contributing)

Bug reports and pull requests are welcome on GitHub at .

License
-------

[](#license)

The package is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

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 ~456 days

Total

3

Last Release

661d ago

PHP version history (2 changes)1.0.x-devPHP &gt;=7.1.0

1.1.x-devPHP ^8.0.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2879409?v=4)[Boulama K.](/maintainers/boulama)[@boulama](https://github.com/boulama)

![](https://avatars.githubusercontent.com/u/87170278?v=4)[Tinq.ai](/maintainers/tinq-ai)[@tinq-ai](https://github.com/tinq-ai)

---

Top Contributors

[![boulama](https://avatars.githubusercontent.com/u/2879409?v=4)](https://github.com/boulama "boulama (14 commits)")

---

Tags

machine-learningnatural-language-processingphp-library

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tinq-ai-tinq-php/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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