KRINO MATRIX

// API

API reference

The KRINO WORLD HTTP API. The common endpoints are here; the full definition of every endpoint (including the character editor, workshop, social circle and glasses) is in openapi.json (OpenAPI 3.1).

Base URL

Base URL
https://krinomatrix.com/global/products/world/api

Every path below goes after this, so POST /auth/login is https://krinomatrix.com/global/products/world/api/auth/login. The other region is a separate deployment with its own accounts and data. A server you run yourself is at http://<host>:8630/api.

Authentication

Sign in to the app and create a key under Settings → API keys (it starts with km_ and is shown only once), then send Authorization: Bearer <key> on every request. A key works until you delete it; if one leaks, delete it in Settings and it stops working at once.

A key can do everything the app does except manage keys and delete the account (those get 403 and need a signed-in browser). You can also log in with a password for a login token instead; it expires after a week.

Shell
API=https://krinomatrix.com/global/products/world/api
export KRINO_API_KEY=km_...   # create one under Settings → API keys

curl -s $API/characters -H "Authorization: Bearer $KRINO_API_KEY"

Streaming

POST /sessions/{sid}/stream answers with server-sent events, in this order:

EventData
decisionFirst: what the character decided to do this turn (reply, stay quiet, make a gesture…)
deltaA piece of the reply in text; join them in order
doneThe end, with the same object /messages returns
errorReplaces done if generation fails partway: {"message": "…"}
text/event-stream
event: decision
data: {"actions": ["RESPOND"], "policy": "rules"}

event: delta
data: {"text": "Once upon a time, "}

event: delta
data: {"text": "there was a big blue whale…"}

event: done
data: {"reply": {…}, "user": {…}, "actions": […], "decision": {…}, "memory_job": "…"}

If you put a reverse proxy in front, turn off response buffering for this endpoint.

Errors

Errors come back as {"detail": "…"}, written for people, in the site's language.

StatusMeaning
400The request is incomplete, for example an empty message
401Missing or deleted API key, or an expired login token
403An API key can't do this (managing keys and deleting the account need a signed-in browser)
404It doesn't exist, or it isn't yours
409The session belongs to a different character than the one you named
413 / 415The upload is too large / in a format we don't take
422The body doesn't match the schema; detail says which field
429Today's credits are used up; they reset tomorrow
502 / 503An upstream model or voice service failed; retrying usually works

Account

Register

POST/auth/registerPublic

Create an account and sign in. A new account already has the official characters, so you can start talking right away.

Parameters

NameInTypeRequiredDescription
usernamebodystringrequiredUsername
passwordbodystringrequiredPassword6–128 chars
display_namebodystringoptionalThe name shown to characters; defaults to the username

Request

cURL
curl "$API/auth/register" \
  -H 'Content-Type: application/json' \
  -d '{"username": "me", "password": "your-password"}'

Response

JSON
{
  "token": "2wIk7-Ecvo7oSW2Qo1IsO_Nh2S-aDo_Nxe0-bFh0HvQ",
  "user": {
    "id": "58acfe8dca7b4a02ab9cbea54767adb8",
    "username": "me",
    "display_name": "me",
    "settings": {…}
  }
}

Log in

POST/auth/loginPublic

Trade a username and password for a login token (expires after a week), used like an API key. For programs, an API key is simpler.

Parameters

NameInTypeRequiredDescription
usernamebodystringrequiredUsername
passwordbodystringrequiredPassword6–128 chars

Request

cURL
curl "$API/auth/login" \
  -H 'Content-Type: application/json' \
  -d '{"username": "me", "password": "your-password"}'

Response

JSON
{
  "token": "2wIk7-Ecvo7oSW2Qo1IsO_Nh2S-aDo_Nxe0-bFh0HvQ",
  "user": {
    "id": "58acfe8dca7b4a02ab9cbea54767adb8",
    "username": "me",
    "display_name": "me",
    "settings": {…}
  }
}

Log out

POST/auth/logoutAuth

Revoke the current token.

Parameters

No parameters.

Request

cURL
curl -X POST "$API/auth/logout" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{"ok": true}

Your account

GET/meAuth

Your account and settings.

Parameters

No parameters.

Request

cURL
curl "$API/me" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{
  "id": "58acfe8dca7b4a02ab9cbea54767adb8",
  "username": "me",
  "display_name": "me",
  "settings": {
    "save_sensitive": false,
    "privacy": {"camera": false, "microphone": false},
    "voice": {"stt": "auto", "tts": "auto", "autoplay": true, "voice": ""},
    "interaction": {"proactive": true, "idle_seconds": 45, "animations": true, "stories": true, "web": true},
    "evaluator": {"mode": null},
    "social": {"autonomy": true, "share_life": true}
  },
  "companion_limit": 8
}

Update settings

PATCH/meAuth

Send only the fields you change. Each settings group has the shape you see in settings from GET /me, and within a group you also send only what changes.

Parameters

NameInTypeRequiredDescription
display_namebodystringoptionalThe name shown to characters; defaults to the username
save_sensitivebodybooloptionalLet characters remember sensitive things (health, money…)
privacybodyobjectoptionalPrivacy: camera, microphone
voicebodyobjectoptionalVoice: stt, tts, autoplay, voice
interactionbodyobjectoptionalInteraction: proactive (characters start talking), idle_seconds, stories, web and more
evaluatorbodyobjectoptionalInteraction policy: mode
socialbodyobjectoptionalSocial circle: autonomy, share_life

Request

cURL
curl -X PATCH "$API/me" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"display_name": "Mika", "voice": {"autoplay": false}}'

Response

JSON
{
  "id": "58acfe8dca7b4a02ab9cbea54767adb8",
  "username": "me",
  "display_name": "me",
  "settings": {
    "save_sensitive": false,
    "privacy": {"camera": false, "microphone": false},
    "voice": {"stt": "auto", "tts": "auto", "autoplay": true, "voice": ""},
    "interaction": {"proactive": true, "idle_seconds": 45, "animations": true, "stories": true, "web": true},
    "evaluator": {"mode": null},
    "social": {"autonomy": true, "share_life": true}
  },
  "companion_limit": 8
}

Delete account

DELETE/meAuth

Delete the account and everything in it: characters, memories, chats and relationships. This can't be undone.

Parameters

NameInTypeRequiredDescription
passwordbodystringrequiredYour current password, to confirm it's you

Request

cURL
curl -X DELETE "$API/me" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"password": "your-password"}'

Response

JSON
{"ok": true}

Characters

List characters

GET/charactersAuth

Your characters, newest first.

Parameters

No parameters.

Request

cURL
curl "$API/characters" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
[
  {
    "id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
    "public_id": "KR-27B48Y",
    "slug": "krino",
    "name": "KRINO",
    "tagline": "Krino Matrix's mascot, a calm researcher with glasses",
    "tags": ["official", "glasses"],
    "official": true,
    "version": 1,
    "portrait": {"kind": "chibi", "src": "/static/chibi/krino/chibi.json"}
  },
  …
]

Get a character

GET/characters/{cid}Auth

One character in full, including its greeting and voice settings.

Parameters

NameInTypeRequiredDescription
cidpathstringrequiredCharacter id

Request

cURL
curl "$API/characters/$CHARACTER_ID" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{
  "id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
  "name": "KRINO",
  "greeting": "You're here. What are we solving today?",
  "voice": {"voice": "krino", "rate": 1.0, "pitch": 0.95},
  "default_expression": "neutral",
  "portrait": {"kind": "chibi", "src": "/static/chibi/krino/chibi.json"},
  …
}

Export a character

GET/characters/{cid}/exportAuth

The character as a krino-persona/1 package you can import elsewhere. It holds the persona only; your memories with it are under “Export relationship”.

Parameters

NameInTypeRequiredDescription
cidpathstringrequiredCharacter id
formatquerystringoptionaljson for the package, md for readable Markdowndefault "json"

Request

cURL
curl "$API/characters/$CHARACTER_ID/export" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{
  "format": "krino-persona/1",
  "id": "krino",
  "version": 1,
  "persona": {"name": "KRINO", "personality": …, "speech": …, "greeting": …, …},
  "behavior": {…},
  "lore": […]
}

Chat

Start a session

POST/sessionsAuth

Start a new conversation. The response carries the character's greeting.

Parameters

NameInTypeRequiredDescription
character_idbodystringrequiredCharacter id

Request

cURL
curl "$API/sessions" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d "{\"character_id\": \"$CHARACTER_ID\"}"

Response

JSON
{
  "id": "2f549fa0f5f240a8b7e979c12c275312",
  "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
  "title": null,
  "ended": false,
  "created_at": "2026-11-13T14:34:05+00:00",
  "updated_at": "2026-11-13T14:34:05+00:00",
  "greeting": "You're here. What are we solving today?"
}

List sessions

GET/sessionsAuth

Your conversations with this character, newest first.

Parameters

NameInTypeRequiredDescription
character_idquerystringrequiredCharacter id

Request

cURL
curl "$API/sessions?character_id=$CHARACTER_ID" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
[
  {
    "id": "2f549fa0f5f240a8b7e979c12c275312",
    "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
    "title": "How was your day?",
    "ended": false,
    "created_at": "2026-11-13T14:34:05+00:00",
    "updated_at": "2026-11-13T14:36:12+00:00"
  }
]

Get a session

GET/sessions/{sid}Auth

A conversation with all its messages.

Parameters

NameInTypeRequiredDescription
sidpathstringrequiredSession id

Request

cURL
curl "$API/sessions/$SESSION_ID" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{
  "id": "2f549fa0f5f240a8b7e979c12c275312",
  "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
  "ended": false,
  "messages": [
    {"id": 89, "role": "user", "content": "How was your day?", "created_at": "…"},
    {"id": 90, "role": "assistant", "content": "I'm here. How did today go?", "state": {"expression": "happy", "mood": "happy"}, "created_at": "…"}
  ],
  …
}

Send a message

POST/sessions/{sid}/messagesAuth

Say something and wait for the whole reply. To show the reply as it's written, use the streaming endpoint below.

Parameters

NameInTypeRequiredDescription
sidpathstringrequiredSession id
textbodystringoptionalWhat you say≤ 4000 chars
audiobodystringoptionalA recording as a data URL (data:audio/wav;base64,…) that the character hears directly; streaming only
imagebodystringoptionalAn image as a data URL (data:image/jpeg;base64,…)
sourcebodystringoptionalWhere it came from: app, voice (voice chat), glassesapp / voice / glasses; default "app"
character_idbodystringoptionalOptional: check the session belongs to this character, 409 if not

Request

cURL
curl "$API/sessions/$SESSION_ID/messages" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"text": "How was your day?"}'

Response

JSON
{
  "reply": {
    "id": 90,
    "role": "assistant",
    "content": "I'm here. How did today go?",
    "state": {"expression": "happy", "animation": null, "mood": "happy"},
    "created_at": "2026-11-13T14:34:05+00:00"
  },
  "user": {"id": 89, "role": "user", "content": "How was your day?", …},
  "actions": [{"type": "say", "text": "I'm here. How did today go?"}],
  "decision": {"policy": "rules", "primary": {"action": "RESPOND", …}, …},
  "memory_job": "40a37bb9a38c48a580d9a67e454f49cb"
}

Send a message (streamed)

POST/sessions/{sid}/streamAuth

The same, but the reply arrives piece by piece as server-sent events. You can attach a recording as audio and the character hears it directly.

Parameters

NameInTypeRequiredDescription
sidpathstringrequiredSession id
textbodystringoptionalWhat you say≤ 4000 chars
audiobodystringoptionalA recording as a data URL (data:audio/wav;base64,…) that the character hears directly; streaming only
imagebodystringoptionalAn image as a data URL (data:image/jpeg;base64,…)
sourcebodystringoptionalWhere it came from: app, voice (voice chat), glassesapp / voice / glasses; default "app"
character_idbodystringoptionalOptional: check the session belongs to this character, 409 if not

Request

cURL
curl -N "$API/sessions/$SESSION_ID/stream" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"text": "Tell me a story"}'

Response

text/event-stream
event: decision
data: {"actions": ["RESPOND"], "policy": "rules"}

event: delta
data: {"text": "Once upon a time, "}

event: delta
data: {"text": "there was a big blue whale…"}

event: done
data: {"reply": {…}, "user": {…}, "actions": […], "decision": {…}, "memory_job": "…"}

Send an event

POST/sessions/{sid}/eventsAuth

Interactions without words: a gesture (wave, pat…), you being idle for a while, or showing the character an image. The character decides whether to respond. Returns the same as sending a message.

Parameters

NameInTypeRequiredDescription
sidpathstringrequiredSession id
typebodystringrequiredgesture, idle (you've been away) or perception (show the character an image)idle / gesture / perception
gesturebodystringoptionalThe gesture, such as wave or pat
idle_countbodyintoptionalHow many idle events in a row0–100; default 1
textbodystringoptionalAn optional line to go with it≤ 400 chars
imagebodystringoptionalAn image as a data URL (data:image/jpeg;base64,…)
character_idbodystringoptionalOptional: check the session belongs to this character, 409 if not

Request

cURL
curl "$API/sessions/$SESSION_ID/events" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"type": "gesture", "gesture": "wave"}'

Response

JSON
{
  "reply": {
    "id": 90,
    "role": "assistant",
    "content": "I'm here. How did today go?",
    "state": {"expression": "happy", "animation": null, "mood": "happy"},
    "created_at": "2026-11-13T14:34:05+00:00"
  },
  "user": {"id": 89, "role": "user", "content": "How was your day?", …},
  "actions": [{"type": "say", "text": "I'm here. How did today go?"}],
  "decision": {"policy": "rules", "primary": {"action": "RESPOND", …}, …},
  "memory_job": "40a37bb9a38c48a580d9a67e454f49cb"
}

End a session

POST/sessions/{sid}/endAuth

Close the conversation. The character writes a short summary of it.

Parameters

NameInTypeRequiredDescription
sidpathstringrequiredSession id

Request

cURL
curl -X POST "$API/sessions/$SESSION_ID/end" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{
  "id": "2f549fa0f5f240a8b7e979c12c275312",
  "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
  "ended": true,
  "summary": {"id": "b6a975397f63406dbc8f63c98676a1f5", "title": "Chat 11-13 22:34: How was your day?"},
  …
}

Delete a session

DELETE/sessions/{sid}Auth

Delete the conversation and its messages.

Parameters

NameInTypeRequiredDescription
sidpathstringrequiredSession id

Request

cURL
curl -X DELETE "$API/sessions/$SESSION_ID" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{"ok": true}

Memory

List memories

GET/memoriesAuth

What the character remembers about you. reality is real (it happened) or story (shared fiction).

Parameters

NameInTypeRequiredDescription
character_idquerystringrequiredCharacter id
statusquerystringoptionalactive or forgottendefault "active"
typequerystringoptionalFilter by type
qquerystringoptionalSearch text

Request

cURL
curl "$API/memories?character_id=$CHARACTER_ID" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
[
  {
    "id": "806576307f4a428d871dceee6921f2cd",
    "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
    "type": "preference",
    "title": "I like plain rice",
    "content": "I like plain rice",
    "origin": "manual",
    "reality": "real",
    "status": "active",
    "status_reason": null,
    "importance": 3,
    "pinned": false,
    "sensitive": false,
    "created_at": "2026-11-13T14:34:05+00:00",
    "updated_at": "2026-11-13T14:34:05+00:00",
    …
  }
]

Add a memory

POST/memoriesAuth

Tell the character something to remember.

Parameters

NameInTypeRequiredDescription
character_idbodystringrequiredCharacter id
contentbodystringrequiredWhat to remember1–2000 chars
typebodystringoptionalfact, preference, event or commitmentfact / preference / event / commitment; default "fact"
realitybodystringoptionalreal (it happened) or story (shared fiction)real / story; default "real"
titlebodystringoptionalA short title; taken from the content if omitted
importancebodyintoptionalImportance, 1–51–5; default 3
pinnedbodybooloptionalPinned: always recalleddefault false
sensitivebodybooloptionalSensitivedefault false
source_message_idbodyintoptionalThe message it came from (its id)

Request

cURL
curl "$API/memories" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d "{\"character_id\": \"$CHARACTER_ID\", \"content\": \"I like plain rice\", \"type\": \"preference\"}"

Response

JSON
{
  "id": "806576307f4a428d871dceee6921f2cd",
  "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
  "type": "preference",
  "title": "I like plain rice",
  "content": "I like plain rice",
  "origin": "manual",
  "reality": "real",
  "status": "active",
  "status_reason": null,
  "importance": 3,
  "pinned": false,
  "sensitive": false,
  "created_at": "2026-11-13T14:34:05+00:00",
  "updated_at": "2026-11-13T14:34:05+00:00",
  …
}

Edit a memory

PATCH/memories/{mid}Auth

Correct what it got wrong. Send only the fields you change.

Parameters

NameInTypeRequiredDescription
midpathstringrequiredMemory id
contentbodystringoptionalWhat to remember
titlebodystringoptionalA short title; taken from the content if omitted
typebodystringoptionalfact, preference, event or commitment
realitybodystringoptionalreal (it happened) or story (shared fiction)
importancebodyintoptionalImportance, 1–5
pinnedbodybooloptionalPinned: always recalled

Request

cURL
curl -X PATCH "$API/memories/$MEMORY_ID" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"importance": 5, "pinned": true}'

Response

JSON
{
  "id": "806576307f4a428d871dceee6921f2cd",
  "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
  "type": "preference",
  "title": "I like plain rice",
  "content": "I like plain rice",
  "origin": "manual",
  "reality": "real",
  "status": "active",
  "status_reason": null,
  "importance": 3,
  "pinned": false,
  "sensitive": false,
  "created_at": "2026-11-13T14:34:05+00:00",
  "updated_at": "2026-11-13T14:34:05+00:00",
  …
}

Forget

POST/memories/{mid}/forgetAuth

The character stops recalling this memory. /restore brings it back.

Parameters

NameInTypeRequiredDescription
midpathstringrequiredMemory id

Request

cURL
curl -X POST "$API/memories/$MEMORY_ID/forget" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{
  "id": "806576307f4a428d871dceee6921f2cd",
  "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
  "type": "preference",
  "title": "I like plain rice",
  "content": "I like plain rice",
  "origin": "manual",
  "reality": "real",
  "status": "forgotten",
  "status_reason": "You asked me to forget",
  "importance": 3,
  "pinned": false,
  "sensitive": false,
  "created_at": "2026-11-13T14:34:05+00:00",
  "updated_at": "2026-11-13T14:34:05+00:00",
  …
}

Restore

POST/memories/{mid}/restoreAuth

Bring a forgotten memory back.

Parameters

NameInTypeRequiredDescription
midpathstringrequiredMemory id

Request

cURL
curl -X POST "$API/memories/$MEMORY_ID/restore" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{
  "id": "806576307f4a428d871dceee6921f2cd",
  "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
  "type": "preference",
  "title": "I like plain rice",
  "content": "I like plain rice",
  "origin": "manual",
  "reality": "real",
  "status": "active",
  "status_reason": null,
  "importance": 3,
  "pinned": false,
  "sensitive": false,
  "created_at": "2026-11-13T14:34:05+00:00",
  "updated_at": "2026-11-13T14:34:05+00:00",
  …
}

Delete permanently

DELETE/memories/{mid}Auth

Delete the memory for good.

Parameters

NameInTypeRequiredDescription
midpathstringrequiredMemory id

Request

cURL
curl -X DELETE "$API/memories/$MEMORY_ID" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{"ok": true, "removed": {"memories": 1, "messages": 0}}

Proposed memories

GET/memories/candidatesAuth

Things the character proposes to remember from your conversations, waiting for you to confirm.

Parameters

NameInTypeRequiredDescription
character_idquerystringrequiredCharacter id

Request

cURL
curl "$API/memories/candidates?character_id=$CHARACTER_ID" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
[
  {"id": "…", "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c", "content": "Going for a run tomorrow", "type": "commitment", …}
]

Accept

POST/memories/candidates/{cand_id}/acceptAuth

Accept the proposal, optionally rewording it.

Parameters

NameInTypeRequiredDescription
cand_idpathstringrequiredProposal id
contentbodystringoptionalReworded content (optional)

Request

cURL
curl "$API/memories/candidates/$CANDIDATE_ID/accept" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'

Response

JSON
{
  "id": "806576307f4a428d871dceee6921f2cd",
  "character_id": "c54631270dbe4ae9b7fb44ff27d5ae2c",
  "type": "preference",
  "title": "I like plain rice",
  "content": "I like plain rice",
  "origin": "manual",
  "reality": "real",
  "status": "active",
  "status_reason": null,
  "importance": 3,
  "pinned": false,
  "sensitive": false,
  "created_at": "2026-11-13T14:34:05+00:00",
  "updated_at": "2026-11-13T14:34:05+00:00",
  …
}

Reject

DELETE/memories/candidates/{cand_id}Auth

Don't remember it.

Parameters

NameInTypeRequiredDescription
cand_idpathstringrequiredProposal id

Request

cURL
curl -X DELETE "$API/memories/candidates/$CANDIDATE_ID" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{"ok": true}

Memory job

GET/memory-jobs/{job_id}Auth

After each turn the character updates its memories in the background; the turn result carries the job id as memory_job. With wait, the call returns as soon as the job finishes, waiting at most that many seconds.

Parameters

NameInTypeRequiredDescription
job_idpathstringrequiredJob id (memory_job from a turn)
waitquerynumberoptionalSeconds to wait for it to finish, up to 15default 0

Request

cURL
curl "$API/memory-jobs/$JOB_ID?wait=5" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{
  "id": "40a37bb9a38c48a580d9a67e454f49cb",
  "status": "done",
  "result": {"created": [], "updated": [], "confirmed": [], "pending": [], "dropped": []},
  "error": null
}

Export relationship

GET/relations/{cid}/exportAuth

Your private data with this character: memories and relationship progress, optionally with chats.

Parameters

NameInTypeRequiredDescription
cidpathstringrequiredCharacter id
chatsquerybooloptionalInclude chatsdefault false

Request

cURL
curl "$API/relations/$CHARACTER_ID/export?chats=true" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{
  "format": "krino-relation/1",
  "character": {"slug": "krino", "name": "KRINO"},
  "exported_at": "2026-11-13T14:37:20+00:00",
  "memories": […],
  "bond": {"closeness": 0.8, "stage_index": 0, "turns": 1, "days": 1, …}
}

Import relationship

POST/relations/{cid}/importAuth

Import an exported relationship, for example into another account. Duplicate memories are skipped.

Parameters

NameInTypeRequiredDescription
cidpathstringrequiredCharacter id
databodyobjectrequiredThe whole object from “Export relationship”

Request

cURL
curl "$API/relations/$CHARACTER_ID/import" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"data": "…"}'

Response

JSON
{"created": 12, "duplicate": 0}

Voice & vision

Text to speech

POST/voice/ttsAuth

Speak text aloud. The response is the audio itself, not JSON; check Content-Type for the format.

Parameters

NameInTypeRequiredDescription
textbodystringrequiredThe text to speak1–600 chars
voicebodystringoptionalA voice id from GET /voice/config; the default if omitted
ratebodynumberoptionalSpeed, 0.5–2.00.5–2; default 1.0
stylebodystringoptionalA voice description (characters designed from a sentence)
streambodybooloptionalStream 16-bit PCM (24 kHz mono) as it's synthesized; the first audio arrives in a fraction of a seconddefault false
opus_streambodybooloptionalWith stream, send Ogg Opus instead of PCM (decode with WebCodecs)default false
opus_filebodybooloptionalReturn Ogg Opus instead of WAV for the whole clip; much smallerdefault false

Request

cURL
curl "$API/voice/tts" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"text": "Good night", "opus_file": true}' \
  -o speech.ogg

Response

Shell
# The body is the audio bytes
Content-Type: audio/ogg   # audio/wav when opus_file is false

Speech to text

POST/voice/sttAuth

Upload a recording as multipart/form-data and get the text back.

Parameters

NameInTypeRequiredDescription
fileformstringrequiredThe recording: webm, ogg, mp4, wav…

Request

cURL
curl "$API/voice/stt" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -F file=@speech.webm

Response

JSON
{"text": "How was your day"}

Voice services

GET/voice/configAuth

Which voice and vision services this server offers, and the voices to choose from.

Parameters

No parameters.

Request

cURL
curl "$API/voice/config" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{
  "stt": {"provider": "dashscope", "server": true},
  "tts": {"provider": "qwen", "server": true, "voices": […], "default": "…"},
  "vlm": {"provider": "openai", "simulated": false},
  "hear": true
}

Describe an image

POST/vision/describeAuth

Have the model describe an image or answer a question about it.

Parameters

NameInTypeRequiredDescription
imagebodystringrequiredThe image as a data URL≤ 8000000 chars
questionbodystringoptionalA question about it (optional)≤ 200 chars

Request

cURL
curl "$API/vision/describe" \
  -H "Authorization: Bearer $KRINO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"image": "data:image/jpeg;base64,…", "question": "What is this?"}'

Response

JSON
{"text": "A small blue pixel-art whale."}

Status

Health

GET/healthPublic

Whether the service is up. No sign-in needed.

Parameters

No parameters.

Request

cURL
curl "$API/health"

Response

JSON
{"ok": true}

Today's credits

GET/creditsAuth

Today's credit limit and usage. When it runs out the API returns 429 until the next day.

Parameters

No parameters.

Request

cURL
curl "$API/credits" \
  -H "Authorization: Bearer $KRINO_API_KEY"

Response

JSON
{"limit": 100.0, "spent": 12.5, "per_cny": 10.0, "image": 2.5}