Skip to main content
POST
Create annotation
You are reading the docs of Galtea 5.20. Read this page in the latest version.

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Headers

Prefer
string

Send return=minimal to get no body back from a write and skip reading the resource: a create answers 201 with only Location, and an update answers 204.

Example:

"return=minimal"

Body

application/json
sessionId
string
required

The session to annotate.

Minimum string length: 1
Example:

"session_123"

metricId
string
required

Metric ID, shared by every revision of the metric. A revision ID answers 404.

Minimum string length: 1
Example:

"metric_123"

score
number
required

The human score, from 0 to 1.

Required range: 0 <= x <= 1
Example:

0.75

inferenceResultId
string | null

A turn of the session, to annotate that turn alone. Leave it out to annotate the whole session.

Minimum string length: 1
Example:

"inferenceResult_123"

reason
string | null

Why the annotator gave this score.

Example:

"Accurate"

Response

Annotation created successfully. On Prefer: return=minimal, or when the read after the write fails, the answer has no body.

id
string
required
Example:

"annotation_123"

sessionId
string
required

The annotated session.

Example:

"session_123"

metricId
string
required

Metric ID, shared by every revision of the metric. A revision ID answers 404.

Example:

"metric_123"

inferenceResultId
string | null
required

The annotated turn of the session. Null for an annotation of the whole session.

Example:

"inferenceResult_123"

annotatorId
string | null
required

The user who last wrote the score. Null once that user is deleted.

Example:

"user_123"

score
number
required

The human score, from 0 to 1.

Example:

0.75

reason
string | null
required

Why the annotator gave this score.

Example:

"Accurate"

createdAt
string<date-time>
required
updatedAt
string<date-time>
required