Download the PHP package r5dy1n/straico-php without Composer

On this page you can find all versions of the php package r5dy1n/straico-php. 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 straico-php

Straico PHP SDK

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

Features

Requirements

Installation

Install via Composer:

Configuration

API Key

Get your API key from Straico. You can provide it in two ways:

  1. Environment Variable (recommended):

  2. Constructor Parameter:

Usage

Initialize Client

User Information

Get current user account details including coins, plan, and name:

Available Models

Retrieve list of available AI models with pricing and specifications:

Get Specific Model

Get detailed information about a specific model:

Prompt Completion (Text Generation)

Generate text using AI models:

With Additional Options

With YouTube URL Analysis

Chat Completion

Use chat-based models with conversation history:

File Upload

Upload files to use in other API calls:

Image Generation

Generate images from text descriptions:

RAG (Retrieval Augmented Generation)

Create RAG Instance

List All RAGs

Get Specific RAG

Update RAG with New Files

Add more files to an existing RAG:

Query RAG with Prompt

Delete RAG

Agents

Create Agent

Create autonomous agents for task execution:

Query Agent

Error Handling

All methods throw StraicoException on errors:

API Methods Reference

User

Method Description Version
user() Get user account information v0

Models

Method Description Version
models() List available AI models v0
modelsV1() List available AI models v1
modelsV2() List available AI models (OpenAI-compatible) v2
model($modelId) Get specific model information v2

Prompt Completion

Method Description Version
promptCompletion($model, $message, $options) Generate text completion v0
promptCompletionV1($model, $message, $options) Generate text completion v1

Chat Completion

Method Description Version
chatCompletion($model, $messages, $options) Chat-based completion v0
chatCompletionV1($model, $messages, $options) Chat-based completion v1
chatCompletionV2($model, $messages, $options) Chat-based completion v2

Files

Method Description Version
uploadFile($filePath) Upload a file v0

Images

Method Description Version
imageGeneration($model, $description, $size, $variations) Generate images v0

RAG

Method Description Version
createRag($name, $description, $files) Create RAG instance v0
rags() List all RAGs v0
rag($ragId) Get specific RAG v0
updateRag($ragId, $filePaths) Update RAG with new files v0
deleteRag($ragId) Delete RAG v0
ragPromptCompletion($ragId, $model, $prompt, $options) Query RAG v0

Agents

Method Description Version
createAgent($config) Create agent v0
agentPromptCompletion($agentId, $prompt, $options) Query agent v0

Official Documentation

For complete API documentation, visit:

License

MIT License

Support

For issues and questions:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


All versions of straico-php with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
guzzlehttp/guzzle Version ^7.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 r5dy1n/straico-php contains the following files

Loading the files please wait ...