Download the PHP package droath/edenai without Composer

On this page you can find all versions of the php package droath/edenai. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package edenai

EdenAI PHP SDK

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A modern, type-safe PHP SDK for the EdenAI API. Built with strict type safety, immutability, and PSR standards compliance, this SDK provides a robust foundation for integrating AI capabilities into your PHP applications.

Features:

Requirements

Installation

Install the package via Composer:

You'll also need a PSR-18 HTTP client. We recommend Guzzle:

Configuration

Set your EdenAI API credentials as environment variables:

Or configure them directly when instantiating the client (see Basic Usage below).

Basic Usage

Quick Start

The simplest way to get started is to use environment variables:

Explicit Configuration

You can also configure the client explicitly:

Audio Resources

The SDK provides comprehensive support for Eden AI's audio processing endpoints:

Speech-to-Text (Async)

Upload audio files for asynchronous transcription:

Supported Audio Formats: mp3, wav, flac, ogg

Text-to-Speech (Sync)

Generate audio from text synchronously:

Text-to-Speech (Async)

Generate audio from text asynchronously:

AI Service Providers

The ServiceProviderEnum provides type-safe provider selection:

Error Handling for Audio Endpoints

Audio operations include specific exceptions:

Advanced Usage

Custom Middleware

Extend the middleware pipeline with custom middleware:

The middleware pipeline executes in this order:

  1. Custom middleware (if provided)
  2. AuthenticationMiddleware (injects API key)
  3. ErrorHandlingMiddleware (maps HTTP errors to exceptions)
  4. RetryMiddleware (retries transient failures)
  5. HTTP client (sends the request)

Exception Handling

The SDK provides typed exceptions for different error scenarios:

Request DTOs

Request DTOs provide validation and type safety for API requests. All audio request DTOs validate their inputs at construction time:

Response DTOs

Response DTOs parse API responses with type transformations:

Response Metadata

Access HTTP metadata separately from business data:

Testing

Running the Test Suite

Run all tests (excluding sandbox tests):

This runs the complete test suite including unit tests, feature tests, integration tests, and architecture tests. Sandbox tests requiring real API credentials are excluded by default.

Running Sandbox Tests

Sandbox tests make real API calls to EdenAI and require valid API credentials. These tests are excluded from CI/CD to control API costs and rate limits.

To run sandbox tests locally:

  1. Create a .env.testing file in the project root:

  2. Add your EdenAI API key to .env.testing:

  3. Run sandbox tests:

Important: Sandbox tests are excluded from automated CI/CD pipelines and must be run manually with your own API credentials. Never commit your .env.testing file to version control.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of edenai with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
php-http/discovery Version ^1.20
psr/http-client Version ^1.0
psr/http-factory Version ^1.1
psr/http-message Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package droath/edenai contains the following files

Loading the files please wait ...