Skip to main content
POST
/
projects
/
{projectId}
/
systems
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 system = await client.systems.upsert('314', {
  config: { temperature: 0.1, maxTokens: 1024 },
  description: 'Production chatbot powered by GPT-4',
  name: 'GPT-4 Chatbot',
});

console.log(system.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 = client.systems.upsert(
project_id="314",
config={
"temperature": 0.1,
"maxTokens": 1024,
},
description="Production chatbot powered by GPT-4",
name="GPT-4 Chatbot",
)
print(system.id)
package main

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

func main() {

url := "https://api2.scorecard.io/api/v2/projects/{projectId}/systems"

payload := strings.NewReader("{\n \"name\": \"GPT-4 Chatbot\",\n \"description\": \"Production chatbot powered by GPT-4\",\n \"config\": {\n \"temperature\": 0.1,\n \"maxTokens\": 1024\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/projects/$PROJECT_ID/systems \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $SCORECARD_API_KEY" \
-d '{
"config": {
"temperature": "bar",
"maxTokens": "bar"
},
"description": "Production chatbot powered by GPT-4",
"name": "GPT-4 Chatbot"
}'
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "GPT-4 Chatbot",
  "description": "Production chatbot powered by GPT-4",
  "productionVersion": {
    "id": "87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0",
    "systemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "Version 1",
    "config": {
      "temperature": 0.1,
      "maxTokens": 1024
    }
  },
  "versions": [
    {
      "id": "87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0",
      "name": "Version 1"
    }
  ]
}
{
"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

projectId
string
required

The ID of the system's Project.

Example:

"314"

Body

application/json
config
object
required

The configuration of the system.

description
string
default:""

The description of the system.

name
string
default:Default system

The name of the system. Should be unique within the project. Default is "Default system"

Response

System created successfully

A System Under Test (SUT).

Systems are templates - to run evaluations, pair them with a SystemVersion that provides specific parameter values.

id
string<uuid>
required

The ID of the system.

name
string
required

The name of the system. Unique within the project.

description
string
default:""
required

The description of the system.

productionVersion
object
required

The production version of the system.

versions
object[]
required

The versions of the system.