aisdk/deepinfra

Official DeepInfra provider for the PHP AI SDK.

Maintainers

Package info

github.com/phpaisdk/deepinfra

pkg:composer/aisdk/deepinfra

Transparency log

Fund package maintenance!

Open Collective

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.8.1 2026-07-22 06:54 UTC

This package is auto-updated.

Last update: 2026-07-22 06:54:58 UTC


README

GitHub Workflow Status Latest Version License

Official DeepInfra provider for the PHP AI SDK. Uses DeepInfra's OpenAI-compatible API.

Installation

composer require aisdk/deepinfra

Basic Usage

use AiSdk\DeepInfra;
use AiSdk\Generate;

DeepInfra::create(['apiKey' => $_ENV['DEEPINFRA_API_KEY']]);

$result = Generate::text('Explain this code briefly.')
    ->model(DeepInfra::model('gpt-oss-120b'))
    ->run();

Configuration

Variable Description Default
DEEPINFRA_API_KEY API key for authentication Required
DEEPINFRA_BASE_URL Base URL for API requests https://api.deepinfra.com/v1/openai

Supported Capabilities

Capability Support
Text generation and streaming Native OpenAI-compatible API
Embeddings Native
Image generation Native
Tools, structured output, reasoning, multimodal input Passed through for supported models

Use providerOptions('deepinfra', ['raw' => [...]]) for documented DeepInfra fields outside the portable SDK surface. Model IDs are opaque strings and are validated by DeepInfra.

Documentation