Download the PHP package amirkateb/ai-core-client without Composer

On this page you can find all versions of the php package amirkateb/ai-core-client. 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 ai-core-client

AI Core PHP SDK · v1.0.0

Official PHP client for KatebSaber AI Core Gateway — one durable API for multi-provider AI, queues, streaming, media, observability and Auto Switch failover profiles.

Laravel 8 → 13 · PHP 8.0+ · Framework-agnostic · cURL transport · Zero runtime dependency on a specific AI provider


Why this SDK?

Your application talks to one stable contract while AI Core handles provider routing, Xray/proxy policy, queues, retries, usage, logs and failover behind the gateway.

Install

Requirements: PHP >=8.0 <9.0, ext-curl, ext-json and Composer 2.

60-second start

Auto Switch profiles

An Auto Switch profile is an ordered chain of 2–25 provider/model candidates. The gateway starts with candidate #1 and moves forward only when that candidate fails. Provider proxy rules are never bypassed: a provider configured for Xray stays fail-closed on Xray, then the profile advances to the next candidate.

Discover profiles and all models inside them

direct_access=false is intentional and important: if the company is allowed to use the profile but not an underlying model directly, that model can still run inside the profile only. Calling that same model directly with provider:model remains forbidden.

Run Chat through a profile

The same profile can be used for buffered text generation:

Stream a failover request

Auto Switch streaming is durable SSE at the gateway boundary. Provider candidates may be executed buffered when required by their managed proxy transport; the client still receives attempt events and the final response through the same resumable request stream.

Model discovery

models() includes individually allowed models plus any Auto Switch profiles explicitly allowed for the authenticated company.

Laravel 8–13

The package is auto-discovered by Laravel. No manual service provider registration is required.

Publish the config when you want an application-level file:

Dependency injection

Facade

The integration uses APIs shared across Laravel 8, 9, 10, 11, 12 and 13. The SDK itself does not require illuminate/*, so plain PHP and non-Laravel frameworks remain first-class.

Request lifecycle

Terminal states are success, failed and cancelled.

Files and media

For generated media:

Batch

Webhooks

Webhook request payloads expose model, resolved_model, and auto_switch details when a failover profile was used.

Error handling

Public SDK methods

Area Methods
Discovery status, health, models, capabilities, usage, limits
Auto Switch autoSwitchProfiles, autoSwitchProfile, chatWithProfile, chatStreamWithProfile, textWithProfile
Text chat, chatStream, text, createResponse
Image/Vision imageGeneration, imageEdit, visionAnalyze, ocr
Audio audioAnalyze, speech, transcription, audioTranslation
Data/Safety embeddings, moderation, rerank
Document/Video documentAnalyze, videoAnalyze, videoGeneration
Request lifecycle requests, request, cancelRequest, retryRequest, streamRequest, downloadMedia
Batch batchBuilder, batches, createBatch, batch, cancelBatch

Security model

Versioning

This package follows Semantic Versioning. 1.0.0 is the first stable contract containing Auto Switch profile discovery/execution and Laravel 8–13 integration.


Package: amirkateb/ai-core-client

License: MIT

Gateway: https://ai.katebsaber.ir/api/v1


All versions of ai-core-client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0 <9.0
ext-curl Version *
ext-json Version *
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 amirkateb/ai-core-client contains the following files

Loading the files please wait ...