POST
/
api
/
v1
/
judge
/
create
/
sdk
Add New Judge Sdk
curl --request POST \
  --url https://api.collinear.ai/api/v1/judge/create/sdk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "judge_name": "<string>",
  "space_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "model_name": "<string>",
  "nano_model_type": "prompt",
  "qa_few_shot": [
    {}
  ],
  "nli_few_shot": [
    {}
  ],
  "conv_few_shot": [
    {}
  ],
  "rag_api_key": "<string>",
  "rag_index": "<string>",
  "rag_namespace": "<string>",
  "rag_top_k": 123,
  "rag_host": "<string>"
}'
{}

Overview

Call this helper after uploading a dataset so the Assess run has a specific judge ID to target. It is intended for SDK and automation scenarios. Generate a disposable judge configuration for SDK-driven assessments. Call this after uploading a dataset so the evaluation run can target a specific Collinear safety rubric.

Request body

  • judge_name: Unique name for the judge run (use a timestamp to avoid collisions).
  • model_name: Judge backing model. For safety scoring use collinear_guard.
  • space_id: UUID for the space that owns this judge.

Example request

curl https://stage.collinear.ai/api/v1/judge/create/sdk \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "judge_name": "assess-judge-<TIMESTAMP>",
    "model_name": "collinear_guard",
    "space_id": "<SPACE_ID>"
  }'

Response

The API returns a minimal JSON document:
{"id": "<JUDGE_ID>"}
Capture the id and pass it to the assess run endpoint. Judges created through this helper are ephemeral and scoped to the target space.

Authorizations

Authorization
string
header
required

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

Body

application/json
judge_name
string
required
space_id
string<uuid>
required
model_name
string
required
nano_model_type
enum<string> | null
Available options:
prompt,
refusal,
response
qa_few_shot
Qa Few Shot · object[] | null
nli_few_shot
Nli Few Shot · object[] | null
conv_few_shot
Conv Few Shot · object[] | null
rag_api_key
string | null
rag_index
string | null
rag_namespace
string | null
rag_top_k
integer | null
rag_host
string | null

Response

Successful Response

The response is of type object.