PHPackages                             gridwb/laravel-perplexity - 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. gridwb/laravel-perplexity

ActiveLibrary

gridwb/laravel-perplexity
=========================

perplexity.ai API for Laravel

1.2.2(2mo ago)2534MITPHPPHP &gt;=8.2

Since Sep 5Pushed 2mo agoCompare

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

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

Overview
--------

[](#overview)

Laravel Perplexity is a convenient wrapper for interacting with the Perplexity API in Laravel applications.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Agent Resource](#agent-resource)
    - [Authentication Resource](#authentication-resource)
    - [Embeddings Resource](#embeddings-resource)
    - [Search Resource](#search-resource)
    - [Sonar Resource](#sonar-resource)
- [Testing](#testing)
- [Changelog](#changelog)
- [License](#license)

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

[](#installation)

1. Install the package

    ```
    composer require gridwb/laravel-perplexity
    ```
2. Publish the configuration file

    ```
    php artisan vendor:publish --tag="perplexity-config"
    ```
3. Add environment variables

    ```
    PERPLEXITY_API_URL=https://api.perplexity.ai
    PERPLEXITY_API_KEY=your-api-key-here
    ```

Usage
-----

[](#usage)

### `Agent` Resource

[](#agent-resource)

#### `create response`

[](#create-response)

Generate a response for the provided input with optional web search and reasoning.

```
