Skip to content

Lightweight PHP client for the OpenRouter.ai API. Minimal, and easy to use.

License

Notifications You must be signed in to change notification settings

cheinisch/OpenRouter-php-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP OpenRouter Client

Usage

Example

<?php
require __DIR__.'/vendor/autoload.php';

use OpenRouter\Client;

$apiKey = getenv('OPENROUTER_API_KEY') ?: 'sk-or-...';
echo Client::OpenRouterChat($apiKey, 'openai/gpt-4o-mini', 'Say only: OK');

Available Language Models

  • openai/gpt-4o-mini

About

Lightweight PHP client for the OpenRouter.ai API. Minimal, and easy to use.

Topics

Resources

License

Stars

Watchers

Forks

Languages