Download the PHP package leapocr/leapocr-php without Composer

On this page you can find all versions of the php package leapocr/leapocr-php. 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 leapocr-php

LeapOCR PHP SDK

Packagist Version Packagist Downloads CI License: MIT PHP

Official PHP SDK for LeapOCR - Transform documents into structured data using AI-powered OCR.

Overview

LeapOCR provides enterprise-grade document processing with AI-powered data extraction. This SDK offers a modern PHP interface for local file uploads, remote URL processing, job polling, and result retrieval.

Installation

Quick Start

Prerequisites

Basic Example

Key Features

Processing Models

Use Model::STANDARD_V2 or Model::PRO_V2, or pass a custom model string through ProcessOptions.

Usage Examples

Processing a Local File

Waiting for Completion

Using a Template

Getting Status and Results Separately

For more runnable samples, see examples/.

Output Formats

Format Description Use Case
Format::STRUCTURED Single JSON object Extract specific fields across the document
Format::MARKDOWN Text per page Convert a document into readable OCR text

Configuration

Error Handling

The SDK throws typed exceptions for the public API:

Webhook Signature Verification

Use LeapOCR::verifyWebhookSignature() with the raw request body exactly as received. LeapOCR sends customer webhooks with X-Webhook-Signature and X-Webhook-Timestamp, and signs timestamp . "." . rawBody with your webhook secret.

Do not verify against re-encoded JSON. Use the original body string and timestamp header from the HTTP request.

Development

Tooling

The SDK uses mise for local tooling:

Regenerating the SDK

The generated client is derived from the live API and then filtered down to SDK-tagged operations only:

Running Tests

The integration suite reads LEAPOCR_BASE_URL and also accepts OCR_BASE_URL for parity with the other LeapOCR SDK test setups.

Publishing

Publish the PHP SDK to Packagist. Composer users install it with:

Versions should come from Git tags such as v0.1.0, not from a hard-coded version field in composer.json.

One-time setup

  1. Create the public repository at https://github.com/leapocr/leapocr-php.
  2. Submit that repository on Packagist as leapocr/leapocr-php.
  3. Optionally add GitHub Actions secrets for explicit Packagist refreshes:
    • PACKAGIST_USERNAME
    • PACKAGIST_TOKEN

Releasing

The release workflow will validate the package, run lint and unit tests, build a release archive, create a GitHub release, and notify Packagist when the Packagist secrets are configured.

For the full setup checklist, see .github/PACKAGIST_SETUP.md.

Generation Notes


All versions of leapocr-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.8
guzzlehttp/psr7 Version ^2.7
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 leapocr/leapocr-php contains the following files

Loading the files please wait ...