Ostra quickstart

Sign in to the TestRelic Console, add credit, create an API key, try both models in the Playground, make your first API call and connect your coding agent over MCP.

TestRelic account
Billing details and credit
API key
Playground
REST API
MCP

This page takes the Console route. If you'd rather go straight to code, see the API quickstart.

Before you start

  • A TestRelic account. If you use the TestRelic platform you already have one: the Console uses the same sign-in.
  • A card for the first top-up (at least $5).

Step 1: Sign in

Open console.testrelic.ai and sign in with your TestRelic account. On your first sign-in the Console creates a workspace for you, named after you, with you as its Owner. If a teammate invited you, you join their workspace instead. See Onboarding.

Step 2: Add billing details and credit

The Console takes you through a short setup the first time:

  1. Billing details (required): whether you're billing as a company or an individual, a legal name, a billing email and an address. Add a VAT, GST or other tax ID if you have one.
  2. Add credit: pick $5, $10, $25, $100 or $500, or type any amount from $5 to $999, then Pay $25.00 with Stripe (the button shows your amount). Credit appears within a few seconds. You can also redeem a coupon code here.
  3. Create an API key (optional at this point, see the next step).

The Console is pay as you go: its credit is prepaid and separate from any TestRelic platform plan, which includes its own Ostra usage on Growth, Pro and Enterprise. See Billing and credits.

Step 3: Create an API key

  1. Open API keys → Create key.
  2. Give it a name that says where it will be used, for example github-actions-web.
  3. Keep Full access (read-only keys can't run models), pick an expiry, and optionally set a monthly spend cap and an IP allowlist.
  4. Copy the key when it's shown. It starts with ostk_live_ and is shown only once.

Store it as a secret, for example OSTRA_API_KEY in your CI or shell. See API keys.

export OSTRA_API_KEY="ostk_live_..."

Step 4: Try it in the Playground

Open Playground:

  • Ostra Pro opens by default. Pick a sample from Run a sample, or ask your own question. The first request after a quiet period wakes the model, which usually takes under a minute.
  • Switch the model picker to Ostra Decision, pick Failure triage, load the Timeout in CI example and press Run. You get the verdict, its confidence and the cost.

Every Playground run is billed like an API call. The Code tab shows the same request as cURL, Python or TypeScript. See Playground.

Step 5: Make your first API call

AI Prompt — Call Ostra Decision from this project
Add a small Ostra client to this project and use it to triage one failing test.

1. Read the API key from the OSTRA_API_KEY environment variable. Never hard-code or log it.
2. POST https://ostra.testrelic.ai/api/v1/predict with header "Authorization: Bearer <key>" and JSON body:
   {
     "model": "ostra-lite",
     "task": "triage",
     "input": {
       "test_id": "<file> > <test title>",
       "context": {
         "framework": "playwright",
         "error_message": "<the failure's error message>",
         "memory": { "runs_50": <runs of this test in its last 50>, "failed_count_50": <failures among them> }
       }
     }
   }
3. Print output.decision and output.p from the response.
4. On HTTP 429 or 503 wait the Retry-After header (seconds) and retry; on 401/402/403 stop and print error.message.
5. Add a unit test that mocks the HTTP call.
Reference: https://docs.testrelic.ai/lores/api/decision/predict

Step 6: Connect your coding agent

Give Claude Code, Cursor or VS Code the Ostra models as MCP tools.

AI Prompt — Connect the Ostra MCP server
Connect the Ostra MCP server to this editor.

Server URL: https://ostra.testrelic.ai/mcp (Streamable HTTP)
Auth: header "Authorization: Bearer <key>", key from the OSTRA_API_KEY environment variable.
It takes an API key, not OAuth.

Write the config for the MCP client I use (Claude Code: `claude mcp add --transport http ostra <url> --header "Authorization: Bearer $OSTRA_API_KEY"` on one line; Cursor: .cursor/mcp.json with "url" and "headers"; VS Code: .vscode/mcp.json with "type": "http"), then call the ostra_list_models tool to confirm it works.
Reference: https://docs.testrelic.ai/lores/api/mcp

Step 7: Invite your team (optional)

Open Settings → Members, enter email addresses and pick a role. Invitations last 14 days. See Workspaces and members.

The Get started page in the Console tracks these steps with a checklist that ticks itself as you go.

Next steps

Was this page helpful?

On this page