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.

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 sdk

FastPix PHP SDK

Packagist version Packagist downloads license PHP version

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:

  1. Check your PHP version
  2. Check your Composer installation
  3. Create a PHP project
  4. Install the FastPix SDK
  5. Verify the SDK installation
  6. Verify that PHP can load the SDK
  7. Configure authentication
  8. Verify that your credentials are set
  9. Initialize the FastPix client
  10. Make your first API request
  11. Capture the media ID
  12. 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:

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 ls at the package-name prompt. ls is 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:

If this command fails, do not continue to API requests. Check:


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:

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:

The completed workflow is:

FastPix PHP SDK workflow: a PHP application uses Composer to install the FastPix PHP SDK, which authenticates to the FastPix API over HTTP Basic Auth, creates a media asset, and receives a media ID (data.id).

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

Manage Videos

Playback

Playlist

Signing Keys

DRM Configurations

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

Manage Live Stream

Live Playback

Simulcast Stream

Video Data API

Monitor video performance and quality with comprehensive analytics and real-time metrics.

For detailed documentation, see FastPix Video Data Overview.

Metrics

Views

Dimensions

Errors

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.

Media Clips

Subtitles

Media Tracks

Access Control

Format Support

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

PHP Build Version
Package Version
Requires php Version >=8.2
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
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 fastpix/sdk contains the following files

Loading the files please wait ...