Apivalk - The OpenAPI-First Framework for REST APIs That Soar

A Lightweight, Framework-Agnostic REST API Ecosystem for PHP. Built for speed, precision, and type-safe development.

Harness the power of the Valkyrie. APIs that soar instead of crawl. Apivalk gives you an OpenAPI-first mind that brings structure, automation, and clarity to your backend.

⚡ OpenAPI-first 🧠 Type-safe 🪶 Lightweight 🔮 Framework-agnostic

Why Apivalk?

OpenAPI-First Direction

OpenAPI is the heart of Apivalk: one definition powering models, validation, routing, documentation, and ecosystem-wide consistency.

REST APIs, Done Right

A clean, modern approach to building robust, well-documented REST APIs, with structure and best practices built in.

Unified Standards for PHP

Apivalk defines a consistent, ecosystem-wide standard for building APIs, finally eliminating fragmentation in PHP API development.

Shared Contracts & Rules

Centralized contracts and rule definitions shared across the Apivalk ecosystem. Enforces best-practice REST API design, consistency, and long-term maintainability.

Framework-Agnostic by Design

Use Apivalk with Laravel, Symfony, Slim, or native PHP. No lock-in. No restrictions. Just clean boundaries.

One Engine - Any Stack

A lightweight “framework-like” engine that sits inside your app. Build a small service or an entire platform - Apivalk just plugs in.

PHP Version Support

ApivalkPHP currently supports PHP 7.2+ to support legacy projects. At some point ApivalkPHP will hard upgrade to PHP 8+. We just wanted to start with a legacy minded package and ecosystem but we will as soon upgrade to use newest features. This change will be announced as a breaking change.

Built for Developers

“ APIs should soar - not crawl. With Apivalk, your backend is guided by the Valkyrie herself: swift, precise, and unstoppable. ”

❤️ Crafted with love for and by developers who care about elegance, performance and clean APIs.

DX First • Developer Centric

Clean APIs. Minimal boilerplate. Beautiful defaults. Designed to stay out of your way and let you build fast.

Smart by Design

OpenAPI-first, type-safe, auto routing. A modern engine that creates structure instead of chaos with best practices in mind.

Future-Proof PHP

PHP 7.2+ legacy friendly, PHP 8+ modern ready. The ecosystem grows and your APIs grow with it.

Framework Bridges

While Apivalk is fully framework-agnostic, we offer dedicated integration bridges for the two most widely used PHP ecosystems Laravel and Symfony. Each bridge provides a preconfigured Apivalk setup that uses the frameworks features.

Apivalk Laravel Bridge

The Laravel integration package preconfigures Apivalk using the framework’s request/response system, middleware stack, exception handler and route fallback mechanism.

  • • Automatic Apivalk bootstrapping inside Laravel
  • • Uses Laravel's `Request` & `Response` objects
  • • Middleware automatically piped into Apivalk
  • • Framework-native logging and exception handling
  • • Drop-in `{any}` fallback route for full API routing

composer require apivalk/laravel-bridge

// routes/api.php
Route::fallback(\Apivalk\Laravel\Bridge::class);

                

Apivalk Symfony Bridge

The Symfony bridge integrates Apivalk with the HttpKernel, EventDispatcher, Symfony routing and the framework’s DI container.

  • • Apivalk registered as a HttpKernel controller
  • • Uses Symfony Request/Response & HttpFoundation
  • • Middleware mapped to Event Subscribers & Kernels
  • • Works with Attributes or YAML routing
  • • Automatic exception → ApiProblem mapping

composer require apivalk/symfony-bridge

# config/routes/apivalk.yaml
apivalk:
    path: /api/{path?}
    controller: Apivalk\Symfony\Bridge::handle
    requirements:
        path: ".+"

                

Advanced Framework Capabilities

Apivalk provides a modern, minimal and powerful foundation for building clean, well-structured and high-performance REST APIs from middleware to documentation.

🚀 Fast Routing Engine

Ultra-light, minimal and optimized routing layer with support for PSR-7/15 conventions and route caching for maximum performance.

🔒 Type-Safe Architecture

Strong typing for all requests and responses, strict DTOs, validation hooks, predictable interfaces, and clean error handling - even on PHP 7.2.

🛠️ Framework-Agnostic

Works with Laravel, Symfony, Slim or no framework at all. Keep your architecture - add structure, direction and consistency.

🔄 Middleware System

A modern PSR-15 compatible middleware pipeline:

  • • Request/Response manipulation
  • • Authentication & Authorization
  • • Rate Limiting
  • • CORS handling
  • • Custom user-defined middleware

🧼 Works great with IDEs

The way of how the Apivalk code and especially the code (documentation) is generated by Apivalk is fully IDE-compatible. This means you can use your favorite IDE for code completion, refactoring and navigation.

📝 API Documentation

Automatic OpenAPI documentation generation:

  • • OpenAPI / Swagger compatible
  • • Generated from PHP code annotations
  • • Interactive API browser (Swagger UI)
  • • Export in multiple formats

📦 Modern PHP Standards

Fully PSR-4 compliant, follows modern PHP coding standards and includes clean, predictable folder structures for controllers, requests and responses.

💻 PHP 7.2 – 8.x Support

Maximum compatibility for legacy modernization while preparing for a future PHP 7.4+ / PHP 8 baseline.

⚡ Plug & Play Architecture

Add Apivalk to an existing project without restructuring your entire backend. Drop it in and your API begins to soar.

Introducing Apivalk

Apivalk is a lightweight, framework-agnostic PHP REST API framework designed for robust, type-safe and well-documented APIs. Inspired by the Valkyrie - the mythical winged warrior - Apivalk focuses on speed, precision, and strength in your backend.

Built to fly across both legacy (PHP 7.2+) and modern (PHP 8+) environments, Apivalk is your companion for clean, maintainable and performant API development.

  • OpenAPI-first architecture with auto-generated routes, validation, and documentation from a single source of truth.
  • Framework-agnostic - Integrate with Laravel, Symfony, Slim or native PHP. Keep your architecture, add direction.
  • Type-safe request & response handling with strict typing, DTOs and clean-code oriented interfaces.
  • Ultra-lightweight with minimal dependencies and a strong focus on performance.
  • Part of the Apivalk ecosystem - shared patterns, tools, and documentation.
Explore the Ecosystem →

// Install via Composer
composer require apivalk/apivalk-php

// Example HTTP layer structure (Laravel, Symfony, ...)
// app/Http/Api/Controller/Pet/CreatePetController.php
// app/Http/Api/Request/Pet/CreatePetRequest.php
// app/Http/Api/Response/Pet/CreatePetResponse.php

// Bootstrap Apivalk in your kernel / front controller
$apivalkConfiguration = new ApivalkConfiguration(
    // openapi: __DIR__ . '/openapi.yaml',
    // middleware, handlers, ...
);

$apivalk = new Apivalk($apivalkConfiguration);
$apivalk->run();

// Example catch-all integration in Laravel
Route::any('{any}', function () use ($apivalk) {
    return $apivalk->handleRequest(request());
})->where('any', '.*');

                

Apivalk Ecosystem

Apivalk is not a lightweight framework but also a collection of shared patterns, tools and documentation. An ecosystem made to help you to develop great REST APIs.

Apivalk

OpenAPI-first REST API framework for PHP.

Learn More →

Apivalk CLI

Scaffolding, generators, and tooling for local DX.

Planned

Apivalk Cloud

Managed platform for deploying and running Apivalk-powered REST APIs.

In Research

We ❤️ our Sponsors

Platinum Sponsors 💎

Platinum Sponsor 1
Platinum Sponsor 2

Gold Sponsors 🏆

Gold Sponsor A
Gold Sponsor B
Gold Sponsor C

Bronze Sponsors 🥉

Bronze Sponsor 1 Sponsor 1
Bronze Sponsor 2 Sponsor 2
Bronze Sponsor 3 Sponsor 3
Bronze Sponsor 4 Sponsor 4