Download the PHP package fastpix/sdk without Composer
On this page you can find all versions of the php package fastpix/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package sdk
Short Description FastPix PHP SDK for media, live streaming, playlists, analytics, and signing keys
License Apache-2.0
Informations about the package sdk
FastPix PHP SDK
A robust, type-safe PHP SDK designed for seamless integration with the FastPix API platform.
The FastPix PHP SDK is a strongly typed PHP client for the FastPix video API. From any PHP application, you can upload and manage videos, run live streams and simulcasts, create and secure playback IDs, manage playlists and signing keys, retrieve video analytics, and use in-video AI features.
Supported PHP: 8.2 and later
Package: fastpix/sdk
Authentication: HTTP Basic Authentication
Dependency management: Composer
📖 Docs: FastPix PHP SDK · 🚀 Free account: FastPix Dashboard
Jump to
Skip straight to a section without scrolling:
| Get started | API reference | Help & more |
|---|---|---|
| Start here | Available resources & operations | FAQ |
| Before you begin | Error handling | Which SDK? |
| Install the FastPix SDK | Server selection | Development |
| Make your first API request | Detailed usage | Examples |
| Verify the integration |
Start here
If you are using the FastPix PHP SDK for the first time, follow these steps in order:
- Check your PHP version
- Check your Composer installation
- Create a PHP project
- Install the FastPix SDK
- Verify the SDK installation
- Verify that PHP can load the SDK
- Configure authentication
- Verify that your credentials are set
- Initialize the FastPix client
- Make your first API request
- Capture the media ID
- Verify the integration
Do not skip the verification steps. If installation, dependency loading, authentication, client initialization, or the first API request fails, troubleshoot that problem before continuing.
Before you begin
Make sure you have:
- PHP 8.2 or later.
- Composer.
- Internet access.
- A FastPix account.
- A FastPix Access Token.
- A FastPix Secret Key.
FastPix uses HTTP Basic Authentication:
| SDK value | FastPix credential |
|---|---|
username |
Access Token |
password |
Secret Key |
You can obtain your credentials from the FastPix Dashboard. Follow the Authentication with Basic Auth guide for information about obtaining your credentials.
Security: Never commit your Access Token or Secret Key to source control. Use environment variables or a secure credential-management system.
1. Check your PHP version
Run:
Output is similar to:
The FastPix PHP SDK supports PHP 8.2 and later. If your PHP version is earlier than 8.2, install a supported PHP version before continuing.
You can also check the exact PHP version:
Expected output is similar to:
2. Check your Composer installation
The FastPix PHP SDK uses Composer to install and manage dependencies.
Run:
Expected output is similar to:
You can also verify where Composer is installed:
On Windows PowerShell:
If you see:
Composer is not available in your shell. Install Composer before continuing.
Do not continue until this command works:
3. Create a PHP project
Create a new directory for your FastPix application:
Initialize a Composer project:
Composer prompts you for project information. For a simple SDK test application, you can accept the default values.
When Composer asks:
Press Enter to accept the suggested package name.
Do not enter
lsat the package-name prompt.lsis a shell command, not a valid Composer package name.
When Composer asks whether you want to define dependencies interactively, you can select no. The FastPix SDK will be added explicitly in the next step.
After initialization, your project should contain:
4. Install the FastPix SDK
Install the FastPix PHP SDK with Composer:
Composer installs the SDK and its dependencies.
After installation, your project should contain:
The vendor/ directory contains the installed SDK and Composer's autoloader.
5. Verify the SDK installation
Before writing application code, verify that Composer installed the FastPix SDK.
Run:
The output should identify the FastPix SDK package and installed version.
You can also search all installed packages:
macOS and Linux
Windows PowerShell
If fastpix/sdk is not listed, do not continue.
Run:
Then verify again:
6. Verify that PHP can load the SDK
Before configuring authentication or making an API request, verify that PHP can load the SDK.
Create a file named verify.php:
Note: This example intentionally does not use
declare(strict_types=1);. The declaration is not required for this SDK verification example and can introduce an unnecessary PHP parsing issue if any output or whitespace appears before the PHP opening tag.
Run:
Expected output:
This verifies that:
- PHP can execute the application.
- Composer's autoloader is available.
- The FastPix SDK can be loaded.
If this command fails, do not continue to API requests. Check:
- PHP 8.2 or later is installed.
composer require fastpix/sdkcompleted successfully.vendor/autoload.phpexists.fastpix/sdkis listed bycomposer show.- You are running the command from the
fastpix-php-demodirectory.
7. Configure authentication
FastPix uses HTTP Basic Authentication.
The SDK expects:
For local development, configure these values as environment variables.
macOS and Linux
Windows PowerShell
The SDK maps the environment variables as follows:
8. Verify that your credentials are set
Do not print the actual credential values.
macOS and Linux
Run:
Expected output:
If either value is reported as missing, set the corresponding environment variable before continuing.
Windows PowerShell
Run:
Expected output:
Security
Never:
- Commit credentials to Git.
- Put credentials directly into source code.
- Include credentials in screenshots.
- Print credentials in logs.
- Include credentials in bug reports or support requests.
- Log HTTP authentication headers in production.
Use environment variables or a secure credential-management system.
9. Initialize the FastPix client
Create or replace main.php with:
Run:
Expected output:
What this code does
Sdk\Fastpixsdk::builder() creates the FastPix SDK client.
setSecurity() configures the credentials used for HTTP Basic Authentication.
build() creates the configured SDK client.
Initializing the client does not make an API request. An API request occurs when you call an SDK operation such as:
10. Make your first API request
The easiest way to verify the complete PHP SDK integration is to create media from a publicly accessible video URL.
FastPix provides a sample video URL:
The PHP SDK exposes media creation through:
Replace the contents of main.php with:
Run:
A successful request returns information about the newly created media asset. The response contains information similar to:
The exact response fields depend on the API response and installed SDK version.
11. Capture the media ID
The create-media response contains the unique ID assigned to the media asset.
The media ID is available at:
For example:
The value of:
is the media_id.
Save the value for subsequent API operations:
Do not confuse a media_id with a playback_id.
They identify different resources and are used for different operations.
12. Verify the integration
At this point, you have verified the initial FastPix PHP SDK integration.
A successful create-media request confirms that:
- PHP is installed and supported.
- Composer is installed.
- The PHP project is initialized.
- The FastPix PHP SDK is installed.
- Composer dependencies are available.
- PHP can load the FastPix SDK.
- Your FastPix credentials are configured.
- The FastPix client can be initialized.
- Your application can authenticate with the FastPix API.
- Your application can create a media asset.
- FastPix returns a media ID.
The completed workflow is:
At this point, the initial SDK integration is complete.
More examples: For additional runnable examples, see the
examples/directory in this repository.
Available Resources and Operations
Comprehensive PHP SDK for FastPix platform integration with full API coverage.
Media API
Upload, manage, and transform video content with comprehensive media management capabilities.
For detailed documentation, see FastPix Video on Demand Overview.
Input Video
- Create from URL - Upload video content from external URL
- Upload from Device - Upload video files directly from device
Manage Videos
- List All Media - Retrieve complete list of all media files
- Get Media by ID - Get detailed information for specific media
- Update Media - Modify media metadata and settings
- Delete Media - Remove media files from library
- Cancel Upload - Stop ongoing media upload process
- Get Input Info - Retrieve detailed input information
- List Uploads - Get all available upload URLs
- Get Media Summary - Get summary for a media
- List Live Clips - List live clips for a livestream
Playback
- Create Playback ID - Generate secure playback identifier
- List Playback IDs - List all playback IDs for a media
- Get Playback ID - Retrieve playback configuration details
- Delete Playback ID - Remove playback access
- Update Domain Restrictions - Update domain allow/deny list for playback
- Update User Agent Restrictions - Update user-agent allow/deny list for playback
Playlist
- Create Playlist - Create new video playlist
- List Playlists - Get all available playlists
- Get Playlist - Retrieve specific playlist details
- Update Playlist - Modify playlist settings and metadata
- Delete Playlist - Remove playlist from library
- Add Media - Add media items to playlist
- Reorder Media - Change order of media in playlist
- Remove Media - Remove media from playlist
Signing Keys
- Create Key - Generate new signing key pair
- List Keys - Get all available signing keys
- Delete Key - Remove signing key from system
- Get Key - Retrieve specific signing key details
DRM Configurations
- List DRM Configs - Get all DRM configuration options
- Get DRM Config - Retrieve specific DRM configuration
Live API
Stream, manage, and transform live video content with real-time broadcasting capabilities.
For detailed documentation, see FastPix Live Stream Overview.
Start Live Stream
- Create Stream - Initialize new live streaming session with DVR mode support
Manage Live Stream
- List Streams - Retrieve all active live streams
- Get Viewer Count - Get real-time viewer statistics
- Get Stream - Retrieve detailed stream information
- Delete Stream - Terminate and remove live stream
- Update Stream - Modify stream settings and configuration
- Enable Stream - Activate live streaming
- Disable Stream - Pause live streaming
- Complete Stream - Finalize and archive stream
Live Playback
- Create Playback ID - Generate secure live playback access
- Delete Playback ID - Revoke live playback access
- Get Playback ID - Retrieve live playback configuration
- Update Domain Restrictions - Update domain allow/deny list for live playback
- Update User Agent Restrictions - Update user-agent allow/deny list for live playback
Simulcast Stream
- Create Simulcast - Set up multi-platform streaming
- Delete Simulcast - Remove simulcast configuration
- Get Simulcast - Retrieve simulcast settings
- Update Simulcast - Modify simulcast parameters
Video Data API
Monitor video performance and quality with comprehensive analytics and real-time metrics.
For detailed documentation, see FastPix Video Data Overview.
Metrics
- List Breakdown Values - Get detailed breakdown of metrics by dimension
- List Overall Values - Get aggregated metric values across all content
- Get Timeseries Data - Retrieve time-based metric trends and patterns
Views
- List Video Views - Get comprehensive list of video viewing sessions
- Get View Details - Retrieve detailed information about specific video views
- List Top Content - Find your most popular and engaging content
- Get Concurrent Viewers - Monitor real-time viewer counts over time
Dimensions
- List Dimensions - Get available data dimensions for filtering and analysis
- List Filter Values - Get specific values for a particular dimension
Errors
- List Errors - List playback errors for diagnostics and monitoring
Transformations
Transform and enhance your video content with powerful AI and editing capabilities.
In-Video AI Features
Enhance video content with AI-powered features including moderation, summarization, and intelligent categorization.
- Update Summary - Create AI-generated video summaries
- Create Chapters - Automatically generate video chapter markers
- Extract Entities - Identify and extract named entities from content
- Enable Moderation - Activate content moderation and safety checks
Media Clips
- Get Media Clips - Retrieve all clips associated with a source media
Subtitles
- Generate Subtitles - Create automatic subtitles for media
Media Tracks
- Add Track - Add audio or subtitle tracks to media
- Update Track - Modify existing audio or subtitle tracks
- Delete Track - Remove audio or subtitle tracks
Access Control
- Update Source Access - Control access permissions for media source
Format Support
- Update MP4 Support - Configure MP4 download capabilities
Error Handling
All operations return a response object or throw an exception. By default, an API error will raise an Errors\APIException (or operation-specific error types).
| Property | Type | Description |
|---|---|---|
$message |
string | The error message |
$statusCode |
int | The HTTP status code |
$rawResponse |
?\Psr\Http\Message\ResponseInterface | The raw HTTP response |
$body |
string | The response content |
Example
Refer to the Errors tables in each operation’s SDK doc for possible exception types.
Server Selection
Override Server URL Per-Client
Override the default server by passing a URL when building the SDK:
FAQ
How do I install the FastPix PHP SDK?
It is a Composer package - add fastpix/sdk to your composer.json and run composer update (or composer require fastpix/sdk). See Install the FastPix SDK.
How do I authenticate the SDK?
FastPix uses Basic Auth: pass your access token as the username and your secret key as the password in Components\Security when building the client. See Initialize the FastPix client.
How do I upload a video in PHP?
Create media from a URL or a direct upload through the input-video resource on the built $sdk. See Available Resources and Operations.
How do I start a live stream? Use the Live API resources to create and manage streams, simulcasts, and live playback IDs. See Available Resources and Operations.
How do I create a secure playback ID? Generate playback IDs and manage signing keys and DRM configurations through the Media API resources. See Available Resources and Operations.
How do I get video analytics and metrics in PHP? The Video Data API exposes metrics, views, dimensions, and errors for quality-of-experience monitoring. See Available Resources and Operations.
How do I handle API errors? Wrap calls in try/catch; the SDK throws a typed error exposing the message, status code, and response body. See Error Handling.
How do I change the API base URL?
Pass a server URL with setServerUrl(...) when building the client. See Server Selection.
Which PHP versions are supported? PHP 8.2 and above. See Before you begin.
Is the SDK strongly typed? Yes - it is a type-safe client generated from the FastPix API specification. See Development.
Which FastPix SDK should I use?
FastPix publishes a server SDK for every major backend language, each generated from the same API specification:
| Language | Repo | Install |
|---|---|---|
| PHP (this repo) | fastpix-php | composer require fastpix/sdk |
| Python | fastpix-python | pip install fastpix-python |
| Go | fastpix-go | go get github.com/FastPix/fastpix-go |
| Java | fastpix-java | io.fastpix:sdk (Maven/Gradle) |
| C# / .NET | fastpix-sdk-csharp | dotnet add package Fastpix |
| Ruby | fastpix-ruby | gem install fastpixapi |
To upload and play the media these SDKs create, use the FastPix browser libraries: web-uploads-sdk, react-web-uploader, and web-player-component. Browse everything in the FastPix organization.
Development
This PHP SDK is programmatically generated from our API specifications. Any manual modifications to internal files will be overwritten during subsequent generation cycles.
We value community contributions and feedback. Feel free to submit pull requests or open issues with your suggestions, and we'll do our best to include them in future releases.
Detailed Usage
For comprehensive understanding of each API's functionality, including detailed request and response specifications, parameter descriptions, and additional examples, please refer to the FastPix API Reference.
The API reference offers complete documentation for all available endpoints and features, enabling developers to integrate and leverage FastPix APIs effectively.
All versions of sdk with dependencies
galbar/jsonpath Version ^3.0
guzzlehttp/guzzle Version ^7.0
doctrine/instantiator Version ^1.3.1 || ^2.0
doctrine/lexer Version ^2.0 || ^3.0
jms/metadata Version ^2.6
phpstan/phpdoc-parser Version ^1.4.5 || ^2.1
brick/date-time Version ^0.7 || ^0.9
phpdocumentor/type-resolver Version ^1.8 || ^2.0
brick/math Version ^0.12 || ^0.14