Skip to content

One reading passage shared by many questions.

GET
/api/v1/passages/{id}
curl --request GET \
--url https://api.utmelab.com/api/v1/passages/example \
--header 'X-API-Key: <X-API-Key>'
id
required
string

Passage id, as a question carries it in passage_id.

Media typeapplication/json

A stimulus shared by many questions: one comprehension passage serving five questions, one cloze serving ten. Questions carry only the id; consumers resolve it here, never ignore it.

object
author
string | null
exam
required
string
id
required
string
kind
required
string
subject
required
string
text
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
title
string | null
year
required
integer format: int32

Example

{
"text": {
"inline": [
{
"kind": "bold"
}
]
}
}

An API key is missing or invalid.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The API key lacks the required scope.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

No such passage

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The caller has exceeded the applicable rate limit.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The API is temporarily unavailable.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}