{"id":36281660,"url":"https://github.com/sharpapi/laravel-content-summarize","last_synced_at":"2026-01-13T23:28:55.140Z","repository":{"id":331823701,"uuid":"1131197702","full_name":"sharpapi/laravel-content-summarize","owner":"sharpapi","description":"Laravel package for SharpAPI.com - laravel-content-summarize","archived":false,"fork":false,"pushed_at":"2026-01-09T16:12:27.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T13:50:56.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sharpapi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-09T16:12:25.000Z","updated_at":"2026-01-09T16:12:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sharpapi/laravel-content-summarize","commit_stats":null,"previous_names":["sharpapi/laravel-content-summarize"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sharpapi/laravel-content-summarize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-summarize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-summarize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-summarize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-summarize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharpapi","download_url":"https://codeload.github.com/sharpapi/laravel-content-summarize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-summarize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-11T09:06:02.130Z","updated_at":"2026-01-13T23:28:55.135Z","avatar_url":"https://github.com/sharpapi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![SharpAPI GitHub cover](https://sharpapi.com/sharpapi-github-laravel-bg.jpg \"SharpAPI Laravel Client\")\n\n# Content Summarize API for Laravel\n\n## 🚀 Powerful AI text summarization capabilities for your Laravel applications.\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/sharpapi/laravel-content-summarize.svg?style=flat-square)](https://packagist.org/packages/sharpapi/laravel-content-summarize)\n[![Total Downloads](https://img.shields.io/packagist/dt/sharpapi/laravel-content-summarize.svg?style=flat-square)](https://packagist.org/packages/sharpapi/laravel-content-summarize)\n\nCheck the details at SharpAPI's [Content Summarize API](https://sharpapi.com/en/catalog/content/content-summarize) page.\n\n---\n\n## Requirements\n\n- PHP \u003e= 8.1\n- Laravel \u003e= 9.0\n\n---\n\n## Installation\n\nFollow these steps to install and set up the SharpAPI Laravel Content Summarize API package.\n\n1. Install the package via `composer`:\n\n```bash\ncomposer require sharpapi/laravel-content-summarize\n```\n\n2. Register at [SharpAPI.com](https://sharpapi.com/) to obtain your API key.\n\n3. Set the API key in your `.env` file:\n\n```bash\nSHARP_API_KEY=your_api_key_here\n```\n\n4. **[OPTIONAL]** Publish the configuration file:\n\n```bash\nphp artisan vendor:publish --tag=sharpapi-content-summarize\n```\n\n---\n## Key Features\n\n- **Text Summarization**: Generate concise summaries of long-form content\n- **Customizable Length**: Control the length of the generated summaries\n- **Multi-language Support**: Summarize content in multiple languages\n- **Preserve Key Information**: Maintain the most important points from the original text\n- **AI-Powered**: Leverage advanced AI models for high-quality summarization\n\n---\n\n## Usage\n\nYou can inject the `ContentSummarizeService` class to access the text summarization functionality.\n\n### Basic Workflow\n\n1. **Summarize Text**: Use the service to generate concise summaries of your content.\n\n---\n\n### Controller Example\n\nHere is an example of how to use `ContentSummarizeService` within a Laravel controller:\n\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers;\n\nuse GuzzleHttp\\Exception\\GuzzleException;\nuse SharpAPI\\ContentSummarize\\ContentSummarizeService;\n\nclass SummarizeController extends Controller\n{\n    protected ContentSummarizeService $summarizeService;\n\n    public function __construct(ContentSummarizeService $summarizeService)\n    {\n        $this-\u003esummarizeService = $summarizeService;\n    }\n\n    /**\n     * @throws GuzzleException\n     */\n    public function summarizeText(string $text)\n    {\n        $result = $this-\u003esummarizeService-\u003esummarize($text);\n        \n        return response()-\u003ejson($result);\n    }\n\n    /**\n     * @throws GuzzleException\n     */\n    public function summarizeWithOptions(string $text)\n    {\n        $options = [\n            'max_length' =\u003e 200,\n            'language' =\u003e 'en',\n        ];\n        \n        $result = $this-\u003esummarizeService-\u003esummarize($text, $options);\n        \n        return response()-\u003ejson($result);\n    }\n}\n```\n\n### Handling Guzzle Exceptions\n\nAll requests are managed by Guzzle, so it's helpful to be familiar with [Guzzle Exceptions](https://docs.guzzlephp.org/en/stable/quickstart.html#exceptions).\n\nExample:\n\n```php\nuse GuzzleHttp\\Exception\\ClientException;\n\ntry {\n    $result = $this-\u003esummarizeService-\u003esummarize($longText);\n} catch (ClientException $e) {\n    echo $e-\u003egetMessage();\n}\n```\n\n---\n\n## Optional Configuration\n\nYou can customize the configuration by setting the following environment variables in your `.env` file:\n\n```bash\nSHARP_API_KEY=your_api_key_here\nSHARP_API_BASE_URL=https://sharpapi.com/api/v1\n```\n\n---\n\n## Response Format\n\n```json\n{\n    \"data\": {\n        \"type\": \"api_job_result\",\n        \"id\": \"5fa45f0e-6680-4f64-8528-3f085a87bd2f\",\n        \"attributes\": {\n            \"status\": \"success\",\n            \"type\": \"content_summarize\",\n            \"result\": {\n                \"summary\": \"Max Verstappen thinks the Las Vegas Grand Prix is more showbiz than sport, while Lewis Hamilton and Fernando Alonso are soaking up the glitz. Expect hydraulic platforms, light shows, and maybe some racing. Don't knock it 'til you try it!\"\n            }\n        }\n    }\n}\n```\n\n---\n\n## Support \u0026 Feedback\n\nFor issues or suggestions, please:\n\n- [Open an issue on GitHub](https://github.com/sharpapi/laravel-content-summarize/issues)\n- Join our [Telegram community](https://t.me/sharpapi_community)\n\n---\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for a detailed list of changes.\n\n---\n\n## Credits\n\n- [A2Z WEB LTD](https://github.com/a2zwebltd)\n- [Dawid Makowski](https://github.com/makowskid)\n- Enhance your [Laravel AI](https://sharpapi.com/) capabilities!\n\n---\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n---\n\n## Follow Us\n\nStay updated with news, tutorials, and case studies:\n\n- [SharpAPI on X (Twitter)](https://x.com/SharpAPI)\n- [SharpAPI on YouTube](https://www.youtube.com/@SharpAPI)\n- [SharpAPI on Vimeo](https://vimeo.com/SharpAPI)\n- [SharpAPI on LinkedIn](https://www.linkedin.com/products/a2z-web-ltd-sharpapicom-automate-with-aipowered-api/)\n- [SharpAPI on Facebook](https://www.facebook.com/profile.php?id=61554115896974)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpapi%2Flaravel-content-summarize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpapi%2Flaravel-content-summarize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpapi%2Flaravel-content-summarize/lists"}