aisdk / fireworks
Official Fireworks provider for the PHP AI SDK.
Fund package maintenance!
v0.8.1
2026-07-22 06:56 UTC
Requires
- php: ^8.3
- aisdk/core: ^0.8.0
- aisdk/openai-compatible: ^0.8.0
Requires (Dev)
- laravel/pint: ^1.18
- nyholm/psr7: ^1.8
- pestphp/pest: ^3.0 || ^4.0
- phpstan/phpstan: ^2.0
- rector/rector: ^2.0
README
Official Fireworks AI provider for the PHP AI SDK. Uses Fireworks' OpenAI-compatible Inference API.
Installation
composer require aisdk/fireworks
Basic Usage
use AiSdk\Fireworks; use AiSdk\Generate; Fireworks::create(['apiKey' => $_ENV['FIREWORKS_API_KEY']]); $result = Generate::text('Explain this code briefly.') ->model(Fireworks::model('gpt-oss-120b')) ->run();
Configuration
| Variable | Description | Default |
|---|---|---|
FIREWORKS_API_KEY |
API key for authentication | Required |
FIREWORKS_BASE_URL |
Base URL for API requests | https://api.fireworks.ai/inference/v1 |
Supported Capabilities
| Capability | Support |
|---|---|
| Text generation and streaming | Native OpenAI-compatible chat |
| Embeddings | Native |
| Tool calling, structured output, reasoning, image input | Passed through for supported models |
Use providerOptions('fireworks', ['raw' => [...]]) for documented Fireworks fields outside the portable SDK surface. Model IDs are opaque strings and are validated by Fireworks.