Skip to main content
POST
/
systems
/
{systemId}
/
versions
JavaScript
import Scorecard from 'scorecard-ai';

const client = new Scorecard({
  apiKey: process.env['SCORECARD_API_KEY'], // This is the default and can be omitted
});

const systemVersion = await client.systems.versions.upsert('12345678-0a8b-4f66-b6f3-2ddcfa097257', {
  config: {
    temperature: 0.5,
    maxTokens: 1024,
    model: 'gemini-2.0-flash',
  },
  name: 'Test model: Gemini',
});

console.log(systemVersion.id);
import os
from scorecard_ai import Scorecard

client = Scorecard(
api_key=os.environ.get("SCORECARD_API_KEY"), # This is the default and can be omitted
)
system_version = client.systems.versions.upsert(
system_id="12345678-0a8b-4f66-b6f3-2ddcfa097257",
config={
"temperature": 0.5,
"maxTokens": 1024,
"model": "gemini-2.0-flash",
},
name="Test model: Gemini",
)
print(system_version.id)
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api2.scorecard.io/api/v2/systems/{systemId}/versions"

payload := strings.NewReader("{\n \"name\": \"Test model: Gemini\",\n \"config\": {\n \"temperature\": 0.5,\n \"maxTokens\": 1024,\n \"model\": \"gemini-2.0-flash\"\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <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))

}
curl https://api2.scorecard.io/api/v2/systems/$SYSTEM_ID/versions \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $SCORECARD_API_KEY" \
-d '{
"config": {
"temperature": "bar",
"maxTokens": "bar",
"model": "bar"
},
"name": "Test model: Gemini"
}'
{
  "id": "87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0",
  "systemId": "12345678-0a8b-4f66-b6f3-2ddcfa097257",
  "name": "Production (Low Temperature)",
  "config": {
    "temperature": 0.1,
    "maxTokens": 1024,
    "model": "gpt-4-turbo"
  }
}
{
"code": "UNAUTHORIZED",
"message": "Invalid or missing authentication token",
"details": {}
}
{
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred while processing your request.",
"details": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

systemId
string<uuid>
required

The ID of the system to create the system version for.

Example:

"12345678-0a8b-4f66-b6f3-2ddcfa097257"

Body

application/json
config
object
required

The configuration of the system version.

name
string

The name of the system version. If creating a new system version and the name isn't provided, it will be autogenerated.

Response

Successfully upserted system version.

A SystemVersion defines the specific settings for a System Under Test.

System versions contain parameter values that determine system behavior during evaluation. They are immutable snapshots - once created, they never change.

When running evaluations, you reference a specific systemVersionId to establish which system version to test.

id
string<uuid>
required

The ID of the system version.

systemId
string<uuid>
required

The ID of the system the system version belongs to.

name
string
required

The name of the system version.

config
object
required

The configuration of the system version.