If you already call OpenAI from PHP with the community openai-php/client package, you can point that same client at Wren R1 without changing your call sites. You set the base URI and the model name, and the request you already write works.

Install:

composer require openai-php/client
composer require guzzlehttp/guzzle

Point the client at Wren R1 (https://webwright.ai/v1, everything else stays the OpenAI default):

use OpenAI;

$client = OpenAI::factory()
    ->withApiKey(getenv('WREN_API_KEY'))
    ->withBaseUri('https://webwright.ai/v1')
    ->make();

Buffered chat completion:

$response = $client->chat()->create([
    'model' => 'wren-r1',
    'messages' => [
        ['role' => 'user', 'content' => 'Summarize this support ticket in one line.'],
    ],
]);

echo $response->choices[0]->message->content;

Streamed chat completion (createStreamed):

$stream = $client->chat()->createStreamed([
    'model' => 'wren-r1',
    'messages' => [
        ['role' => 'user', 'content' => 'Write a short release note for a bug fix.'],
    ],
]);

foreach ($stream as $response) {
    echo $response->choices[0]->delta->content ?? '';
}

Transcribe audio with the same client:

$response = $client->audio()->transcribe([
    'model' => 'whisper-large-v3-turbo',
    'file' => fopen('call-recording.mp3', 'r'),
]);

echo $response->text;

one base URI, one key, and one model name. Chat, streaming and transcription all run through the client you already have.

What Wren R1 serves

  • One base URL, https://webwright.ai/v1, covers chat completions and audio transcription.
  • Chat model wren-r1, with a 200000 token context window.
  • Transcription model whisper-large-v3-turbo.
  • Published Standard rates: cache $0.10, input $0.40, output $1.60 per 1M tokens.

The WebWright Team