PHPackages                             r5dy1n/straico-php - 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. [API Development](/categories/api)
4. /
5. r5dy1n/straico-php

ActiveLibrary[API Development](/categories/api)

r5dy1n/straico-php
==================

PHP SDK for Straico API - Unified generative AI platform

v1.0.0(4mo ago)02MITPHPPHP ^7.4 || ^8.0

Since Dec 31Pushed 4mo agoCompare

[ Source](https://github.com/r5dy1n/straico-php)[ Packagist](https://packagist.org/packages/r5dy1n/straico-php)[ RSS](/packages/r5dy1n-straico-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Straico PHP SDK
===============

[](#straico-php-sdk)

A comprehensive PHP SDK for the [Straico API](https://straico.com/api/) - a unified platform for generative AI capabilities including text generation, image creation, chat, RAG (Retrieval Augmented Generation), and autonomous agents.

Features
--------

[](#features)

- Simple and intuitive API interface
- Support for all Straico API endpoints (v0, v1, v2)
- Environment variable configuration
- PSR-4 autoloading
- Comprehensive error handling
- Full type hinting
- File upload support
- Multi-version API support

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- Composer

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

[](#installation)

Install via Composer:

```
composer require r5dy1n/straico-php
```

Configuration
-------------

[](#configuration)

### API Key

[](#api-key)

Get your API key from [Straico](https://straico.com). You can provide it in two ways:

1. **Environment Variable** (recommended):

```
export STRAICO_API_KEY="your-api-key-here"
```

2. **Constructor Parameter**:

```
$straico = new \Straico\Straico('your-api-key-here');
```

Usage
-----

[](#usage)

### Initialize Client

[](#initialize-client)

```
