Warm up Ostra Pro
POST /api/v1/warm — start Ostra Pro ahead of a burst of work, so the first request does not wait for a cold start.
https://ostra.testrelic.ai/api/v1/warmStarts Ostra Pro if it’s asleep, so the next request doesn’t wait for a cold start.
Ostra Pro scales to zero after 5 quiet minutes. A cold start usually takes under a minute, and up to about 5 minutes the first time after a model update. Call this before a burst of work (a CI job, an agent run) and poll it until it says ready.
- Auth
Authorization: Bearer $OSTRA_API_KEYorx-api-key: $OSTRA_API_KEY. Any key, read-only included.- Rate limit
- Not rate limited.
- Cost
- Free. Any key works, read-only included. Not rate limited.
curl -X POST https://ostra.testrelic.ai/api/v1/warm \
-H "Authorization: Bearer $OSTRA_API_KEY"import os
import requests
response = requests.post(
"https://ostra.testrelic.ai/api/v1/warm",
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/warm', {
method: 'POST',
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("POST", "https://ostra.testrelic.ai/api/v1/warm", 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/warm"))
.header("Authorization", "Bearer " + System.getenv("OSTRA_API_KEY"))
.POST(HttpRequest.BodyPublishers.noBody())
.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.Post, "https://ostra.testrelic.ai/api/v1/warm");
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/warm")
request = Net::HTTP::Post.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/warm");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("OSTRA_API_KEY"),
],
CURLOPT_POSTFIELDS => "",
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), PHP_EOL;
echo $response, PHP_EOL;{
"model": "ostra-pro",
"state": "ready"
}{
"model": "ostra-pro",
"state": "starting",
"retry_after_seconds": 30
}Request body
No body.
Response
modelstringostra-pro.statestringready: a replica is up.starting: one is starting; poll again.One ofreadystartingretry_after_secondsintegerWith
starting: when to poll again (30).
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. |
| 502 | upstream_error | Ostra Pro answered unexpectedly. Retry shortly. |
Every error has the same envelope and a request_id. See Errors for messages and retry advice.
POSTCreate a message
POST /api/v1/messages — Ostra Pro in Anthropic Messages format, for Anthropic SDKs and Anthropic-compatible tools.
MCP server
Connect Claude Code, Cursor, VS Code, the Claude API or any MCP client to the Ostra MCP server — URL, transport, authentication, protocol versions, tools, errors and long-running calls.