Contents
On this page
Update AI Settings - Plugixa Stream
PUT /plugixa-stream/v1/admin/ai/settings
Save the AI settings. A key left empty keeps the saved one. Keys are stored encrypted.
Needs a user with the plugixa_stream_manage_settings capability (signed in with an Application Password or the login cookie). Administrators hold it; other roles only when you grant it.
Request
PUT https://your-site.example/wp-json/plugixa-stream/v1/admin/ai/settings
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
model |
string |
No | claude-opus-5-5 (the default), claude-sonnet-5-5 or claude-haiku-5-5. |
anthropic_key |
string |
No | Anthropic API key, for translation. |
openai_key |
string |
No | OpenAI API key, for transcription. |
clear_anthropic_key |
boolean |
No | Remove the saved key. Also clear_openai_key. |
{
"model": "claude-sonnet-5-5"
}
Responses
200 OK. The settings as in Get AI Settings.
{
"success": true,
"data": {
"model": "claude-sonnet-5-5",
"models": ["claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5"],
"has_anthropic_key": true,
"has_openai_key": false
}
}
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
plugixa_stream_forbidden |
The caller lacks the capability. |
Plus the errors every endpoint can return.
Examples
curl -s -X PUT "https://your-site.example/wp-json/plugixa-stream/v1/admin/ai/settings" \
-u "$WP_USER:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-5-5"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-stream/v1/admin/ai/settings');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'claude-sonnet-5-5',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-stream/v1/admin/ai/settings', {
method: 'PUT',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ model: 'claude-sonnet-5-5' }),
});
const { data } = await response.json();
Quick Links
Share