PHPackages                             mpstenson/cloudflare-ai - 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. mpstenson/cloudflare-ai

ActiveLibrary

mpstenson/cloudflare-ai
=======================

This package allows you to interact with Cloudflare AI web services.

1.0.2(2y ago)868[3 PRs](https://github.com/mpstenson/cloudflare-ai/pulls)MITPHPPHP ^8.2CI passing

Since Apr 28Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/mpstenson/cloudflare-ai)[ Packagist](https://packagist.org/packages/mpstenson/cloudflare-ai)[ Docs](https://github.com/mpstenson/cloudflare-ai)[ GitHub Sponsors](https://github.com/mpstenson)[ RSS](/packages/mpstenson-cloudflare-ai/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (13)Versions (7)Used By (0)

This package allows you to interact with Cloudflare AI web services.
====================================================================

[](#this-package-allows-you-to-interact-with-cloudflare-ai-web-services)

[![Latest Version on Packagist](https://camo.githubusercontent.com/134a49717f3f9381c189914d90b804679cbf5e783751f4f14c13cc817f64ddde/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d707374656e736f6e2f636c6f7564666c6172652d61692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mpstenson/cloudflare-ai)[![GitHub Tests Action Status](https://camo.githubusercontent.com/2902c238ed9060d4c115d78a3e386fa1a1202118c8424f4e4fb349497ec5ab87/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d707374656e736f6e2f636c6f7564666c6172652d61692f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mpstenson/cloudflare-ai/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f371f5339dd25d94eca3095db0125512c82f96e27f22a008c37ca5fa084cd548/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d707374656e736f6e2f636c6f7564666c6172652d61692f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/mpstenson/cloudflare-ai/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/11b84eedcbb7479c0ed4953ccdad214e6c9b06551c94d8f7ed8095099e00395d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d707374656e736f6e2f636c6f7564666c6172652d61692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mpstenson/cloudflare-ai)

The cloudflare-ai package provides easy access to the cloudflare ai rest web services in Laravel.

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

[](#installation)

You can install the package via composer:

```
composer require mpstenson/cloudflare-ai
```

This package relies on two .env var settings. `CLOUDFLARE_ACCOUNT_ID``CLOUDFLARE_API_TOKEN`

The API token used needs to have access to the cloudflare ai tools. You can get details on generating the cloudflare token here . You can publish the config file with:

```
php artisan vendor:publish --tag="cloudflare-ai-config"
```

This is the contents of the published config file:

```
