Skip to content

Get a Lorebook record

GET
/open/v1/worldbook/detail
curl --request GET \
--url 'https://api.harperharbor.com/open/v1/worldbook/detail?worldbookId=example' \
--header 'Authorization: Bearer <token>'

Returns the raw Lorebook record (no entries). Accessible when the caller owns the book or the book is public. tags is a comma-joined string on this route. isOwner/isFollowed are omitted when false. Errors from the service are returned as 400 with the raw error string (e.g. permission denied, record not found).

worldbookId
required
string

Lorebook id.

Lorebook.

Media typeapplication/json
object
id
required

Numeric row id.

integer format: int64
worldbookId
required
string
name
required
string
description
required
string
iconUrl
required
string
visibility
required
string
Allowed values: private public waitReview
version
required
integer
forkFrom
required

Source Lorebook id when forked; empty otherwise.

string
entryCount
required
integer
entryContentMax

Entry content limit: 4000 chars for Chinese, 6000 for Japanese or Korean, 12000 for English, following the language of the cards this book is bound to, the widest when there are several; an unbound book uses its own language.

integer
useCount
required
integer
followCount
required
integer
tags
required

Comma-joined tags.

string
language
required
string
from
required
string
format
required
string
Allowed values: "" tavern
createTime
required
string format: date-time
nullable
lastUpdateTime
required
string format: date-time
nullable
isOwner

Present only when true.

boolean
isFollowed

Present only when true.

boolean
Example
{
"visibility": "private",
"format": ""
}

worldbookId required, permission denied, record not found, or a database error string. Body {"error": "<string>"}.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

unauthorized.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

worldbook service not available (body {"error": "worldbook service not available"}).

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}