Test saved AI provider
curl --request POST \
--url https://rxresu.me/api/openapi/ai-providers/{id}/tests \
--header 'x-api-key: <api-key>'import requests
url = "https://rxresu.me/api/openapi/ai-providers/{id}/tests"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://rxresu.me/api/openapi/ai-providers/{id}/tests', 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://rxresu.me/api/openapi/ai-providers/{id}/tests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rxresu.me/api/openapi/ai-providers/{id}/tests"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://rxresu.me/api/openapi/ai-providers/{id}/tests")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rxresu.me/api/openapi/ai-providers/{id}/tests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"managed": true,
"id": "<string>",
"label": "<string>",
"provider": "openai",
"model": "<string>",
"baseURL": "<string>",
"enabled": true,
"testStatus": "<string>",
"testError": "<string>",
"apiKeyPreview": "<string>",
"apiKeyFingerprint": "<string>",
"lastTestedAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"defined": true,
"code": "BAD_REQUEST",
"status": 400,
"message": "Invalid AI provider configuration.",
"data": "<unknown>"
}{
"defined": true,
"code": "FORBIDDEN",
"status": 403,
"message": "AI is managed by the server.",
"data": "<unknown>"
}{
"defined": true,
"code": "NOT_FOUND",
"status": 404,
"message": "AI provider was not found.",
"data": "<unknown>"
}{
"defined": true,
"code": "PRECONDITION_FAILED",
"status": 412,
"message": "AI agent workspace is not configured.",
"data": "<unknown>"
}{
"defined": true,
"code": "BAD_GATEWAY",
"status": 502,
"message": "The AI provider returned an error or is unreachable.",
"data": "<unknown>"
}{
"defined": true,
"code": "<string>",
"status": 123,
"message": "<string>",
"data": "<unknown>"
}AI Providers
Test saved AI provider
Decrypts the saved API key server-side and validates the provider/model connection.
POST
/
ai-providers
/
{id}
/
tests
Test saved AI provider
curl --request POST \
--url https://rxresu.me/api/openapi/ai-providers/{id}/tests \
--header 'x-api-key: <api-key>'import requests
url = "https://rxresu.me/api/openapi/ai-providers/{id}/tests"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://rxresu.me/api/openapi/ai-providers/{id}/tests', 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://rxresu.me/api/openapi/ai-providers/{id}/tests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rxresu.me/api/openapi/ai-providers/{id}/tests"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://rxresu.me/api/openapi/ai-providers/{id}/tests")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rxresu.me/api/openapi/ai-providers/{id}/tests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"managed": true,
"id": "<string>",
"label": "<string>",
"provider": "openai",
"model": "<string>",
"baseURL": "<string>",
"enabled": true,
"testStatus": "<string>",
"testError": "<string>",
"apiKeyPreview": "<string>",
"apiKeyFingerprint": "<string>",
"lastTestedAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"defined": true,
"code": "BAD_REQUEST",
"status": 400,
"message": "Invalid AI provider configuration.",
"data": "<unknown>"
}{
"defined": true,
"code": "FORBIDDEN",
"status": 403,
"message": "AI is managed by the server.",
"data": "<unknown>"
}{
"defined": true,
"code": "NOT_FOUND",
"status": 404,
"message": "AI provider was not found.",
"data": "<unknown>"
}{
"defined": true,
"code": "PRECONDITION_FAILED",
"status": 412,
"message": "AI agent workspace is not configured.",
"data": "<unknown>"
}{
"defined": true,
"code": "BAD_GATEWAY",
"status": 502,
"message": "The AI provider returned an error or is unreachable.",
"data": "<unknown>"
}{
"defined": true,
"code": "<string>",
"status": 123,
"message": "<string>",
"data": "<unknown>"
}Authorizations
apiKeybearerAuthcookieAuth
The API key to authenticate requests.
Path Parameters
Response
OK
Available options:
openai, anthropic, gemini, vercel-ai-gateway, openrouter, mistral, cohere, xai, groq, deepseek, togetherai, fireworks, cerebras, perplexity, ollama, openai-compatible