PHPackages                             sharpapi/laravel-content-summarize - 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. sharpapi/laravel-content-summarize

ActiveLibrary[API Development](/categories/api)

sharpapi/laravel-content-summarize
==================================

AI Text Summarization for Laravel powered by SharpAPI.com

v1.0.3(1mo ago)00MITPHPPHP ^8.1

Since Jan 9Pushed 1mo agoCompare

[ Source](https://github.com/sharpapi/laravel-content-summarize)[ Packagist](https://packagist.org/packages/sharpapi/laravel-content-summarize)[ Docs](https://github.com/sharpapi/laravel-content-summarize)[ RSS](/packages/sharpapi-laravel-content-summarize/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (5)Used By (0)

[![SharpAPI GitHub cover](https://camo.githubusercontent.com/82bb36706c1e71276b3dca4ec9120353bb51c8f22bb62543bf056db5c28da36d/68747470733a2f2f73686172706170692e636f6d2f73686172706170692d6769746875622d6c61726176656c2d62672e6a7067 "SharpAPI Laravel Client")](https://camo.githubusercontent.com/82bb36706c1e71276b3dca4ec9120353bb51c8f22bb62543bf056db5c28da36d/68747470733a2f2f73686172706170692e636f6d2f73686172706170692d6769746875622d6c61726176656c2d62672e6a7067)

Content Summarize API for Laravel
=================================

[](#content-summarize-api-for-laravel)

🚀 Powerful AI text summarization capabilities for your Laravel applications.
----------------------------------------------------------------------------

[](#-powerful-ai-text-summarization-capabilities-for-your-laravel-applications)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5a9b9055e3e82d1c24707e91a6b3fdf30223419e998ed26b262c28b8779b06af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686172706170692f6c61726176656c2d636f6e74656e742d73756d6d6172697a652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sharpapi/laravel-content-summarize)[![Total Downloads](https://camo.githubusercontent.com/484bfb29bcd640a65254af4ea6f9a38b4e999f09cb7f96bd82b57aea364eed4f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686172706170692f6c61726176656c2d636f6e74656e742d73756d6d6172697a652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sharpapi/laravel-content-summarize)

Check the details at SharpAPI's [Content Summarize API](https://sharpapi.com/en/catalog/content/content-summarize) page.

---

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

[](#requirements)

- PHP &gt;= 8.1
- Laravel &gt;= 10.48.29

---

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

[](#installation)

Follow these steps to install and set up the SharpAPI Laravel Content Summarize API package.

1. Install the package via `composer`:

```
composer require sharpapi/laravel-content-summarize
```

2. Register at [SharpAPI.com](https://sharpapi.com/) to obtain your API key.
3. Set the API key in your `.env` file:

```
SHARP_API_KEY=your_api_key_here
```

4. **\[OPTIONAL\]** Publish the configuration file:

```
php artisan vendor:publish --tag=sharpapi-content-summarize
```

---

Key Features
------------

[](#key-features)

- **Text Summarization**: Generate concise summaries of long-form content
- **Customizable Length**: Control the length of the generated summaries
- **Multi-language Support**: Summarize content in multiple languages
- **Preserve Key Information**: Maintain the most important points from the original text
- **AI-Powered**: Leverage advanced AI models for high-quality summarization

---

Usage
-----

[](#usage)

You can inject the `ContentSummarizeService` class to access the text summarization functionality.

### Basic Workflow

[](#basic-workflow)

1. **Summarize Text**: Use the service to generate concise summaries of your content.

---

### Controller Example

[](#controller-example)

Here is an example of how to use `ContentSummarizeService` within a Laravel controller:

```
