Download the PHP package iajson/client without Composer

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

iajson/client

PHP reference library for consuming ia.json files -- the universal standard for AI interaction with websites.

Requirements

Installation

Note: The package will be available on Packagist soon. In the meantime, install from GitHub:

Quick Start

Discovery

The library follows the ia.json discovery algorithm:

  1. Tries https://{domain}/ia.json
  2. Falls back to https://{domain}/.well-known/ia.json
  3. Validates the spec structure and version compatibility

Browsing Endpoints

Authentication

Signed Key Registration

For protected endpoints, you must register your AI agent and receive credentials:

Using Existing Credentials

If you already have credentials from a previous registration:

OAuth2 (User Authorization)

For user_required endpoints, you need the user's OAuth2 token:

Request Signing

The Signer class implements the ia.json HMAC signing algorithm:

Error Handling

The library throws typed exceptions for different error conditions:

Laravel Integration

This package includes first-class Laravel support with auto-discovery.

Setup

  1. Publish the configuration:

  2. Add your credentials to .env:

Using the Facade

Dependency Injection

Verifying Incoming AI Agent Requests

If your Laravel application serves as an ia.json-enabled site and receives requests from AI agents, use the VerifyIaSignature middleware:

  1. Register the middleware alias in your bootstrap/app.php (Laravel 11+) or kernel:

  2. Apply it to your routes:

  3. Configure the secret resolver in config/iajson.php:

The verified API key is available in the request:

Configuration Reference

The full config/iajson.php supports the following options:

Key Env Variable Description
domain IAJSON_DOMAIN Domain to discover ia.json from
api_key IAJSON_API_KEY Agent API key
secret IAJSON_SECRET Agent secret
oauth.client_id IAJSON_OAUTH_CLIENT_ID OAuth2 client ID
oauth.client_secret IAJSON_OAUTH_CLIENT_SECRET OAuth2 client secret
cache_ttl IAJSON_CACHE_TTL Spec cache TTL in seconds
verification.algorithm IAJSON_VERIFY_ALGORITHM HMAC algorithm for verification
verification.header_prefix IAJSON_VERIFY_HEADER_PREFIX Auth header prefix
verification.max_age_seconds IAJSON_VERIFY_MAX_AGE Max timestamp age

Spec Compliance

This library implements the ia.json v1.0.0 specification:

License

MIT License. See the ia.json project for the full specification.


All versions of client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.5
psr/http-message Version ^2.0
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 iajson/client contains the following files

Loading the files please wait ...