Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RunAPI Core PHP SDK

Packagist License

The RunAPI Core PHP SDK provides shared authentication, PSR HTTP transport, retry, polling, typed errors, response objects, file upload, and account primitives for RunAPI PHP packages. Application code should normally install a concrete model package such as runapi-ai/wan; install runapi-ai/core directly only when building shared PHP SDK tooling.

Install

composer require runapi-ai/core

Requirements

  • PHP 8.2 or newer
  • Composer
  • A PSR-18 / PSR-17 / PSR-7 compatible HTTP stack

The package includes a Guzzle-based default HTTP stack and also accepts custom PSR implementations.

Request Identifiers And Safe Task Creation

Task-creation calls accept an optional opaque Idempotency-Key up to 512 characters. Generate one value per logical task and reuse it only with identical input after an unknown result. Reusing the value with different input returns 409 Conflict; do not derive it from X-Client-Request-Id.

use RunApi\Core\RequestOptions;

$options = new RequestOptions(headers: [
    'X-Client-Request-Id' => 'order-123',
    'Idempotency-Key' => 'opaque-logical-task-123',
]);

Links

License

Licensed under the Apache License, Version 2.0.

Releases

Packages

Contributors

Languages