curl --request POST \
--url https://api.example.com/v1/panel/settings/ai/providers/{slug}/test \
--header 'Content-Type: application/json' \
--header 'X-CSRF-Token: <x-csrf-token>' \
--data '
{
"model": "<string>"
}
'import requests
url = "https://api.example.com/v1/panel/settings/ai/providers/{slug}/test"
payload = { "model": "<string>" }
headers = {
"X-CSRF-Token": "<x-csrf-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CSRF-Token': '<x-csrf-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>'})
};
fetch('https://api.example.com/v1/panel/settings/ai/providers/{slug}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/panel/settings/ai/providers/{slug}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CSRF-Token: <x-csrf-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/panel/settings/ai/providers/{slug}/test"
payload := strings.NewReader("{\n \"model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CSRF-Token", "<x-csrf-token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/panel/settings/ai/providers/{slug}/test")
.header("X-CSRF-Token", "<x-csrf-token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/panel/settings/ai/providers/{slug}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CSRF-Token"] = '<x-csrf-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"slug": "<string>",
"kind": "openai_compatible",
"displayName": "<string>",
"enabled": true,
"zeroRetention": true,
"trainsOnData": true,
"keyConfigured": true,
"lastCheckOk": true,
"updatedAt": "2023-11-07T05:31:56Z",
"baseUrl": "<string>",
"retentionNote": "<string>",
"dataRegion": "<string>",
"lastCheckedAt": "2023-11-07T05:31:56Z",
"lastCheckError": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}Post v1panelsettingsaiproviders test
Requires settings.write. Makes one small completion against the stored credential and records the outcome on the provider, so “is this configured correctly?” is answerable without spending a real request later. The prompt is Omniflow’s own text; no customer content is involved.
A test that ran and failed answers 200 with lastCheckOk false, because the outcome is what was asked for. A test that could not be attempted — no key stored, no model to test with, an unregistered provider — answers 4xx and stores nothing, because recording a failure would claim something was tried.
It sits behind settings.write rather than settings.read: it opens a sealed credential and spends the installation’s money. It is rate limited per operator.
curl --request POST \
--url https://api.example.com/v1/panel/settings/ai/providers/{slug}/test \
--header 'Content-Type: application/json' \
--header 'X-CSRF-Token: <x-csrf-token>' \
--data '
{
"model": "<string>"
}
'import requests
url = "https://api.example.com/v1/panel/settings/ai/providers/{slug}/test"
payload = { "model": "<string>" }
headers = {
"X-CSRF-Token": "<x-csrf-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CSRF-Token': '<x-csrf-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>'})
};
fetch('https://api.example.com/v1/panel/settings/ai/providers/{slug}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/panel/settings/ai/providers/{slug}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CSRF-Token: <x-csrf-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/panel/settings/ai/providers/{slug}/test"
payload := strings.NewReader("{\n \"model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CSRF-Token", "<x-csrf-token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/panel/settings/ai/providers/{slug}/test")
.header("X-CSRF-Token", "<x-csrf-token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/panel/settings/ai/providers/{slug}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CSRF-Token"] = '<x-csrf-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"slug": "<string>",
"kind": "openai_compatible",
"displayName": "<string>",
"enabled": true,
"zeroRetention": true,
"trainsOnData": true,
"keyConfigured": true,
"lastCheckOk": true,
"updatedAt": "2023-11-07T05:31:56Z",
"baseUrl": "<string>",
"retentionNote": "<string>",
"dataRegion": "<string>",
"lastCheckedAt": "2023-11-07T05:31:56Z",
"lastCheckError": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}Headers
Echoes the token from the current session. Required on every unsafe method.
Path Parameters
^[a-z0-9][a-z0-9_-]{1,40}$Body
Which model to test with. Omit it to use whatever model a feature already points at this provider — that is the configuration worth proving. A provider nothing points at yet has none to infer, and the request is refused rather than guessed.
120Response
The test ran; the provider carries its outcome
^[a-z0-9][a-z0-9_-]{1,40}$openai_compatible, anthropic, gemini 1 - 120The owner's answer from the provider's own terms. Omniflow cannot verify it and does not pretend to; it is recorded so the panel can warn before a feature is switched on rather than after data left.
Whether a credential is stored. The credential itself is never returned.
Where the provider is reached. Required for the OpenAI-compatible adapter, which is how an owner points at a model they host themselves. It is an address rather than a secret and is returned.
200060Why the last test failed, or how the last one passed. It never carries the provider's own message, which can echo the prompt, and never a transport error, which can carry a key held in a query string.
500