> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runtype.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runtype.com/_mcp/server.

# Record a calibration for a question set version

POST https://api.runtype.com/v1/question-sets/{id}/versions/{versionNumber}/calibrations
Content-Type: application/json

Append a calibration measurement to a published version and make it the current one. Calibrations are never edited or deleted, so every past decision keeps the calibration it was taken under.

Reference: https://docs.runtype.com/api-reference/runtype-api/question-sets/record-a-calibration-for-a-question-set-version

## Authentication

- `Authorization` header (bearer token, required) — API key or Clerk session token

## Servers

- `https://api.runtype.com` (Production, default)
- `https://api.runtype-staging.com` (Staging)

## Request

### Path parameters

- `id` (string, required)
- `versionNumber` (integer, required)

### Body (application/json)

This endpoint expects an object.

- `record` (V1QuestionSetsIdVersionsVersionNumberCalibrationsPostRequestBodyContentApplicationJsonSchemaRecord, required)
- `evalRunId` (string, optional) — The eval run that measured this calibration. It must resolve in this account; the row is then recorded as `eval_suite`. Without it the row is `customer`.

## Response

### 201

Recorded

- `calibration` (JudgmentCalibrationRecord, required)
- `version` (QuestionSetVersion, required)

## Errors

### 400 Bad Request Error

Invalid request

- `error` (string, required)
- `details` (list of QuestionSetErrorDetailsItems, optional)
- `code` (string, optional) — Stable code, e.g. QUESTION_SET_INVALID or QUESTION_SET_UNRESOLVED.

### 401 Unauthorized Error

Unauthorized

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 403 Forbidden Error

Insufficient permissions, or no organization context

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 404 Not Found Error

Not found

- `error` (string, required)
- `details` (list of QuestionSetErrorDetailsItems, optional)
- `code` (string, optional) — Stable code, e.g. QUESTION_SET_INVALID or QUESTION_SET_UNRESOLVED.

### 409 Conflict Error

Conflict

- `error` (string, required)
- `details` (list of QuestionSetErrorDetailsItems, optional)
- `code` (string, optional) — Stable code, e.g. QUESTION_SET_INVALID or QUESTION_SET_UNRESOLVED.

## Types

### V1QuestionSetsIdVersionsVersionNumberCalibrationsPostRequestBodyContentApplicationJsonSchemaRecord

- `labeledSetRef` (string, required)
- `measuredModel` (string, required)
- `perQuestion` (map from string to V1QuestionSetsIdVersionsVersionNumberCalibrationsPostRequestBodyContentApplicationJsonSchemaRecordPerQuestion, required)

### JudgmentCalibrationRecord

- `createdAt` (string, required)
- `createdByUserId` (string, required, nullable)
- `evalRunId` (string, required, nullable)
- `id` (string, required)
- `measuredModel` (string, required)
- `questionSetVersionId` (string, required)
- `record` (map from string to any, required) — The calibration record as posted.
- `source` (enum, required) — Derived: `eval_suite` only when the posted `evalRunId` resolved to an eval run in this account.
  - Allowed values: `eval_suite`, `customer`

### QuestionSetVersion

- `createdAt` (string, required)
- `createdByUserId` (string, required, nullable)
- `currentCalibrationId` (string, required, nullable)
- `id` (string, required)
- `inputMapping` (map from string to string, required, nullable)
- `model` (string, required, nullable) — Requested judgment model id; null uses the platform default.
- `publishedAt` (string, required, nullable) — Set once, at the first publish; a published version never changes.
- `questionSetId` (string, required)
- `questions` (map from string to any, required) — Judgment questions keyed by question id. Each is `{ type: "boolean" | "choice" | "score", instructions, criteria }`. The id is never sent to the model, so instructions and criteria carry the meaning.
- `versionNumber` (integer, required)

### QuestionSetErrorDetailsItems

- `message` (string, required)
- `code` (string, optional) — Stable Runtype validation code (e.g. MISSING_REQUIRED_FIELD, INVALID_ENUM).
- `path` (string, optional) — Dotted JSON path to the offending field.
- `suggestion` (string, optional) — Actionable hint (allowed values, accepted range, …).

### ErrorDetailsItems

- `message` (string, required)
- `code` (string, optional) — Stable Runtype validation code (e.g. MISSING_REQUIRED_FIELD, INVALID_ENUM).
- `path` (string, optional) — Dotted JSON path to the offending field.
- `suggestion` (string, optional) — Actionable hint (allowed values, accepted range, …).

### V1QuestionSetsIdVersionsVersionNumberCalibrationsPostRequestBodyContentApplicationJsonSchemaRecordPerQuestion

- `ece` (double, required)
- `handledRate` (double, required)
- `heldOutAccuracy` (double, required)
- `targetAccuracy` (double, required)
- `threshold` (double, required)

## Examples

**Request**

```json
{
  "record": {
    "labeledSetRef": "string",
    "measuredModel": "string",
    "perQuestion": {}
  }
}
```

**Response**

```json
{
  "calibration": {
    "createdAt": "string",
    "createdByUserId": "string",
    "evalRunId": "string",
    "id": "string",
    "measuredModel": "string",
    "questionSetVersionId": "string",
    "record": {},
    "source": "eval_suite"
  },
  "version": {
    "createdAt": "string",
    "createdByUserId": "string",
    "currentCalibrationId": "string",
    "id": "string",
    "inputMapping": {},
    "model": "string",
    "publishedAt": "string",
    "questionSetId": "string",
    "questions": {},
    "versionNumber": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.runtype.com/v1/question-sets/id/versions/1/calibrations"

payload = { "record": {
        "labeledSetRef": "string",
        "measuredModel": "string",
        "perQuestion": {}
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.runtype.com/v1/question-sets/id/versions/1/calibrations';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"record":{"labeledSetRef":"string","measuredModel":"string","perQuestion":{}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://api.runtype.com/v1/question-sets/id/versions/1/calibrations"

	payload := strings.NewReader("{\n  \"record\": {\n    \"labeledSetRef\": \"string\",\n    \"measuredModel\": \"string\",\n    \"perQuestion\": {}\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(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.runtype.com/v1/question-sets/id/versions/1/calibrations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"record\": {\n    \"labeledSetRef\": \"string\",\n    \"measuredModel\": \"string\",\n    \"perQuestion\": {}\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.runtype.com/v1/question-sets/id/versions/1/calibrations")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"record\": {\n    \"labeledSetRef\": \"string\",\n    \"measuredModel\": \"string\",\n    \"perQuestion\": {}\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.runtype.com/v1/question-sets/id/versions/1/calibrations', [
  'body' => '{
  "record": {
    "labeledSetRef": "string",
    "measuredModel": "string",
    "perQuestion": {}
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.runtype.com/v1/question-sets/id/versions/1/calibrations");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"record\": {\n    \"labeledSetRef\": \"string\",\n    \"measuredModel\": \"string\",\n    \"perQuestion\": {}\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["record": [
    "labeledSetRef": "string",
    "measuredModel": "string",
    "perQuestion": []
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.runtype.com/v1/question-sets/id/versions/1/calibrations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```