> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akumi.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# PHP SDK

> Install and use the official PHP client for the inference API.

The official PHP client for the inference API, installed with Composer and generated from the OpenAPI spec.

For authentication, resources, errors and the other shared concepts, see [all SDKs](/sdks).

## Install

PHP, via Composer:

```bash theme={null}
composer require akumi-cloud/sdk
```

## Quickstart

```php theme={null}
use Akumi\Sdk\Akumi;

$akumi = Akumi::fromApiKey($_ENV['AKUMI_API_KEY']);

$response = $akumi->chat->create([
    'model' => 'mistral/mistral-small-2603',
    'messages' => [
        ['role' => 'user', 'content' => 'Summarize this contract.'],
    ],
]);
```

In Laravel the SDK registers itself. Set `AKUMI_API_KEY` in your environment, then resolve the client from the container or use the `Akumi` facade; no manual provider wiring is needed.

## Streaming

Call `$akumi->chat->createStreamed([...])` for a streamed variant of the chat call that returns a `Generator` yielding chunks as they arrive. Pass `"stream": true` in the request alongside it.

## Source

The PHP SDK lives in its own repository and is generated, not hand-written. When the API changes, it is regenerated from the spec.

* PHP: [https://github.com/akumi-cloud/php-sdk](https://github.com/akumi-cloud/php-sdk)
