List models
GET /api/v1/models — the Ostra models your key can call, with their tasks, limits and prices.
https://ostra.testrelic.ai/api/v1/modelsLists the models your key can call, with their tasks, limits and prices.
Use it to check a key works (any key, read-only included) and to read the live Ostra Decision release. It’s free and not rate limited.
- Auth
Authorization: Bearer $OSTRA_API_KEY. Any key, read-only included.- Rate limit
- Not rate limited.
- Cost
- Free.
- Over MCP
- Same operation as the
ostra_list_modelstool.
curl https://ostra.testrelic.ai/api/v1/models \
-H "Authorization: Bearer $OSTRA_API_KEY"import os
import requests
response = requests.get(
"https://ostra.testrelic.ai/api/v1/models",
headers={
"Authorization": f"Bearer {os.environ['OSTRA_API_KEY']}",
},
timeout=60,
)
response.raise_for_status()
print(response.json())const response = await fetch('https://ostra.testrelic.ai/api/v1/models', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.OSTRA_API_KEY}`,
},
});
if (!response.ok) {
throw new Error(`Ostra ${response.status}: ${await response.text()}`);
}
console.log(await response.json());package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://ostra.testrelic.ai/api/v1/models", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("OSTRA_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status)
fmt.Println(string(out))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class OstraExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://ostra.testrelic.ai/api/v1/models"))
.header("Authorization", "Bearer " + System.getenv("OSTRA_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("OSTRA_API_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Get, "https://ostra.testrelic.ai/api/v1/models");
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());require "net/http"
require "uri"
uri = URI("https://ostra.testrelic.ai/api/v1/models")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch("OSTRA_API_KEY")}"
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(request) }
puts response.code
puts response.body<?php
$ch = curl_init("https://ostra.testrelic.ai/api/v1/models");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("OSTRA_API_KEY"),
],
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), PHP_EOL;
echo $response, PHP_EOL;{
"object": "list",
"data": [
{
"id": "ostra-lite",
"name": "Ostra Decision",
"status": "beta",
"release": "v.beta.5",
"tasks": [
{
"task": "triage",
"name": "Failure triage",
"description": "Classifies a failing test as flaky, product bug, test bug, environment or selector drift.",
"mcpTool": "ostra_triage_failure",
"rateLabel": "$0.50 / 1M failures",
"outputRateLabel": "$0.00 / 1M decisions",
"version": "1.4.0",
"contentHash": "sha256:3f9a1c07d2e4b8a6",
"gatePassed": true,
"classes": [
"flaky",
"product_bug",
"test_bug",
"environment",
"selector_drift"
],
"deferThreshold": 0.6
},
{
"task": "test_impact",
"name": "Test impact",
"description": "Ranks candidate tests by the probability that a diff breaks them.",
"mcpTool": "ostra_select_impacted_tests",
"rateLabel": "$2.00 / 1M diffs",
"outputRateLabel": "$0.00 / 1M decisions",
"version": "1.1.2",
"contentHash": "sha256:a07be3315c9d4f12",
"gatePassed": true,
"classes": [
"not_impacted",
"impacted"
],
"deferThreshold": 0.55
},
{
"task": "selector_survival",
"name": "Selector survival",
"description": "Predicts whether UI locators survive the next release.",
"mcpTool": "ostra_check_selector",
"rateLabel": "$0.25 / 1M selectors",
"outputRateLabel": "$0.00 / 1M decisions",
"version": "1.2.0",
"contentHash": "sha256:5d21f0e9c4a7b3e8",
"gatePassed": true,
"classes": [
"survives",
"breaks"
],
"deferThreshold": 0.6
}
],
"pricing": {
"input": "$0.25–$2.00 / 1M inputs",
"output": "$0.00 / 1M decisions"
},
"latencyP50Ms": 41,
"requests7d": 1284
},
{
"id": "ostra-pro",
"object": "model",
"created": 1794873600,
"owned_by": "testrelic",
"name": "Ostra Pro",
"version": "1.0",
"base_url": "https://ostra.testrelic.ai/api/v1",
"context_window": 262144,
"max_output_tokens": 32768,
"pricing": {
"input": "$0.64 / 1M input tokens",
"cached_input": "$0.06 / 1M cached input tokens",
"output": "$4.47 / 1M output tokens"
},
"mcp_tool": "ostra_pro_chat"
}
]
}Request body
No body.
Response
objectstringAlways
list.Valuelistdataarray of objectsOne entry per model: Ostra Decision, then Ostra Pro.
Show 16 child fieldsHide child fields
idstringModel id to send as
model:ostra-lite(Ostra Decision) orostra-pro(Ostra Pro).namestringDisplay name:
Ostra DecisionorOstra Pro.statusstringOstra Decision only:
beta.releasestringOstra Decision only: the live release, e.g.
v.beta.5, orunavailableif it can’t be reached right now.tasksarray of objectsOstra Decision only: its three tasks.
Show 11 child fieldsHide child fields
taskstringTask id to send as
task.One oftriagetest_impactselector_survivalnamestringDisplay name.
descriptionstringWhat the task answers.
mcpToolstringThe MCP tool that runs this task.
rateLabelstringInput price, e.g.
$0.50 / 1M failures.outputRateLabelstringOutput price (always
$0.00).versionstringVersion of this task’s model in the live release.
contentHashstringContent hash of that model.
gatePassedbooleanThe model passed its release quality gate.
classesarray of stringsThe classes the task can answer.
deferThresholdnumberThe task’s default confidence bar for a firm answer. A class can use a different bar; each answer reports the one it used in
threshold.
pricingmap of stringsHuman-readable prices:
input,output, and for Ostra Procached_input.latencyP50Msnumber or nullOstra Decision only: your workspace’s median latency over 7 days.
requests7dintegerOstra Decision only: your workspace’s requests over 7 days.
objectstringOstra Pro only:
model.createdintegerOstra Pro only: Unix time the model version was released.
owned_bystringOstra Pro only:
testrelic.versionstringOstra Pro only:
1.0.base_urlstringOstra Pro only: base URL for OpenAI-compatible clients.
context_windowintegerOstra Pro only: 262,144 tokens.
max_output_tokensintegerOstra Pro only: 32,768 tokens.
mcp_toolstringOstra Pro only:
ostra_pro_chat.
Response headers
x-request-idstringId of this request (
req_+ 26 characters). Quote it to support.
Errors
| Status | Type | When |
|---|---|---|
| 401 | authentication_error | The API key is missing, malformed, unknown, revoked or expired. |
| 403 | permission_error | The caller’s IP isn’t in the key’s allowlist. |
Every error has the same envelope and a request_id. See Errors for messages and retry advice.