Download the PHP package demonyka/eden-ai-sdk without Composer
On this page you can find all versions of the php package demonyka/eden-ai-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package eden-ai-sdk
EdenAI SDK
EdenAI SDK Documentation
Introduction
The EdenAI SDK is an unofficial PHP library that provides a convenient interface to interact with the Eden AI platform. Eden AI is a platform that aggregates multiple AI service providers, allowing developers to access various AI capabilities through a unified API.
This SDK makes it easy to integrate Eden AI services into your PHP applications, especially in Laravel projects.
Table of Contents
- Installation
- Configuration
- Basic Usage
- Available Features
- Image Processing
- Explicit Content Detection
- Deepfake Detection
- Object Detection
- Face Comparison
- Text Processing
- Text Moderation
- Code Generation
- Audio Processing
- Text to Speech
- Image Processing
- Laravel Integration
- Advanced Usage
- Working with Providers
- Error Handling
- Custom HTTP Clients
- API Reference
Installation
You can install the SDK using Composer:
Configuration
Direct Usage
When using the SDK directly, you can provide the API token when creating an instance:
Laravel Integration
If you're using Laravel, publish the configuration file:
This will create a config/edenai.php
file where you can configure the SDK. Add your API token to your .env
file:
Basic Usage
Creating an API Instance
Making API Requests
Each API method corresponds to a specific Eden AI endpoint. Here's a basic example:
Available Features
The SDK provides access to various AI capabilities offered by Eden AI:
Image Processing
Explicit Content Detection
Detect explicit or NSFW content in images:
Deepfake Detection
Detect if an image has been manipulated or artificially generated:
Object Detection
Detect and identify objects in images:
Face Comparison
Compare faces in two different images:
Text Processing
Text Moderation
Detect inappropriate or harmful content in text:
Code Generation
Generate code based on natural language instructions:
Audio Processing
Text to Speech
Convert text to spoken audio:
Laravel Integration
The SDK includes Laravel integration for easier usage:
Facade
After publishing the config file, you can use the EdenAI facade:
Configuration
The published config/edenai.php
file allows you to set default configurations for each feature:
Advanced Usage
Working with Providers
Each method can work with multiple providers. The SDK will combine results from all providers to give you more accurate results:
Error Handling
The SDK uses exceptions to handle errors:
Custom HTTP Clients
You can customize the HTTP client used by the SDK:
API Reference
Main API Class
EdenAI\Api
is the main entry point for interacting with the SDK.
Constructor
$token
: Your Eden AI API token$httpClientHandler
: Custom HTTP client implementation$baseUrl
: Custom API base URL (defaults to Eden AI's API)
HTTP Methods
Response Objects
All API methods return specific response objects that extend EdenAI\Objects\BaseObject
.
Common methods available on all response objects:
Feature-Specific Methods
Each feature has its own methods and responses as documented in the Available Features section.
License
The EdenAI SDK is open-source software licensed under the MIT license.
All versions of eden-ai-sdk with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.5.1
guzzlehttp/psr7 Version ^2.5
illuminate/support Version 9 - 12
league/event Version ^2.2 || ^3.0
psr/container Version ^1.1 || ^2.0
psr/event-dispatcher Version ^1.0