// 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
https://krinomatrix.com/global/products/world/apiEvery 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.
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:
| Event | Data |
|---|---|
decision | First: what the character decided to do this turn (reply, stay quiet, make a gesture…) |
delta | A piece of the reply in text; join them in order |
done | The end, with the same object /messages returns |
error | Replaces done if generation fails partway: {"message": "…"} |
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.
| Status | Meaning |
|---|---|
400 | The request is incomplete, for example an empty message |
401 | Missing or deleted API key, or an expired login token |
403 | An API key can't do this (managing keys and deleting the account need a signed-in browser) |
404 | It doesn't exist, or it isn't yours |
409 | The session belongs to a different character than the one you named |
413 / 415 | The upload is too large / in a format we don't take |
422 | The body doesn't match the schema; detail says which field |
429 | Today's credits are used up; they reset tomorrow |
502 / 503 | An 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
username | body | string | required | Username |
password | body | string | required | Password6–128 chars |
display_name | body | string | optional | The name shown to characters; defaults to the username |
Request
curl "$API/auth/register" \
-H 'Content-Type: application/json' \
-d '{"username": "me", "password": "your-password"}'Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
username | body | string | required | Username |
password | body | string | required | Password6–128 chars |
Request
curl "$API/auth/login" \
-H 'Content-Type: application/json' \
-d '{"username": "me", "password": "your-password"}'Response
{
"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 -X POST "$API/auth/logout" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{"ok": true}Your account
GET/meAuth
Your account and settings.
Parameters
No parameters.
Request
curl "$API/me" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
display_name | body | string | optional | The name shown to characters; defaults to the username |
save_sensitive | body | bool | optional | Let characters remember sensitive things (health, money…) |
privacy | body | object | optional | Privacy: camera, microphone |
voice | body | object | optional | Voice: stt, tts, autoplay, voice |
interaction | body | object | optional | Interaction: proactive (characters start talking), idle_seconds, stories, web and more |
evaluator | body | object | optional | Interaction policy: mode |
social | body | object | optional | Social circle: autonomy, share_life |
Request
curl -X PATCH "$API/me" \
-H "Authorization: Bearer $KRINO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"display_name": "Mika", "voice": {"autoplay": false}}'Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
password | body | string | required | Your current password, to confirm it's you |
Request
curl -X DELETE "$API/me" \
-H "Authorization: Bearer $KRINO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"password": "your-password"}'Response
{"ok": true}Characters
List characters
GET/charactersAuth
Your characters, newest first.
Parameters
No parameters.
Request
curl "$API/characters" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
[
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cid | path | string | required | Character id |
Request
curl "$API/characters/$CHARACTER_ID" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cid | path | string | required | Character id |
format | query | string | optional | json for the package, md for readable Markdowndefault "json" |
Request
curl "$API/characters/$CHARACTER_ID/export" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
character_id | body | string | required | Character id |
Request
curl "$API/sessions" \
-H "Authorization: Bearer $KRINO_API_KEY" \
-H 'Content-Type: application/json' \
-d "{\"character_id\": \"$CHARACTER_ID\"}"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
character_id | query | string | required | Character id |
Request
curl "$API/sessions?character_id=$CHARACTER_ID" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
[
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sid | path | string | required | Session id |
Request
curl "$API/sessions/$SESSION_ID" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sid | path | string | required | Session id |
text | body | string | optional | What you say≤ 4000 chars |
audio | body | string | optional | A recording as a data URL (data:audio/wav;base64,…) that the character hears directly; streaming only |
image | body | string | optional | An image as a data URL (data:image/jpeg;base64,…) |
source | body | string | optional | Where it came from: app, voice (voice chat), glassesapp / voice / glasses; default "app" |
character_id | body | string | optional | Optional: check the session belongs to this character, 409 if not |
Request
curl "$API/sessions/$SESSION_ID/messages" \
-H "Authorization: Bearer $KRINO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"text": "How was your day?"}'Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sid | path | string | required | Session id |
text | body | string | optional | What you say≤ 4000 chars |
audio | body | string | optional | A recording as a data URL (data:audio/wav;base64,…) that the character hears directly; streaming only |
image | body | string | optional | An image as a data URL (data:image/jpeg;base64,…) |
source | body | string | optional | Where it came from: app, voice (voice chat), glassesapp / voice / glasses; default "app" |
character_id | body | string | optional | Optional: check the session belongs to this character, 409 if not |
Request
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
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sid | path | string | required | Session id |
type | body | string | required | gesture, idle (you've been away) or perception (show the character an image)idle / gesture / perception |
gesture | body | string | optional | The gesture, such as wave or pat |
idle_count | body | int | optional | How many idle events in a row0–100; default 1 |
text | body | string | optional | An optional line to go with it≤ 400 chars |
image | body | string | optional | An image as a data URL (data:image/jpeg;base64,…) |
character_id | body | string | optional | Optional: check the session belongs to this character, 409 if not |
Request
curl "$API/sessions/$SESSION_ID/events" \
-H "Authorization: Bearer $KRINO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"type": "gesture", "gesture": "wave"}'Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sid | path | string | required | Session id |
Request
curl -X POST "$API/sessions/$SESSION_ID/end" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sid | path | string | required | Session id |
Request
curl -X DELETE "$API/sessions/$SESSION_ID" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{"ok": true}Memory
List memories
GET/memoriesAuth
What the character remembers about you. reality is real (it happened) or story (shared fiction).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
character_id | query | string | required | Character id |
status | query | string | optional | active or forgottendefault "active" |
type | query | string | optional | Filter by type |
q | query | string | optional | Search text |
Request
curl "$API/memories?character_id=$CHARACTER_ID" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
[
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
character_id | body | string | required | Character id |
content | body | string | required | What to remember1–2000 chars |
type | body | string | optional | fact, preference, event or commitmentfact / preference / event / commitment; default "fact" |
reality | body | string | optional | real (it happened) or story (shared fiction)real / story; default "real" |
title | body | string | optional | A short title; taken from the content if omitted |
importance | body | int | optional | Importance, 1–51–5; default 3 |
pinned | body | bool | optional | Pinned: always recalleddefault false |
sensitive | body | bool | optional | Sensitivedefault false |
source_message_id | body | int | optional | The message it came from (its id) |
Request
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
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mid | path | string | required | Memory id |
content | body | string | optional | What to remember |
title | body | string | optional | A short title; taken from the content if omitted |
type | body | string | optional | fact, preference, event or commitment |
reality | body | string | optional | real (it happened) or story (shared fiction) |
importance | body | int | optional | Importance, 1–5 |
pinned | body | bool | optional | Pinned: always recalled |
Request
curl -X PATCH "$API/memories/$MEMORY_ID" \
-H "Authorization: Bearer $KRINO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"importance": 5, "pinned": true}'Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mid | path | string | required | Memory id |
Request
curl -X POST "$API/memories/$MEMORY_ID/forget" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mid | path | string | required | Memory id |
Request
curl -X POST "$API/memories/$MEMORY_ID/restore" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mid | path | string | required | Memory id |
Request
curl -X DELETE "$API/memories/$MEMORY_ID" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
character_id | query | string | required | Character id |
Request
curl "$API/memories/candidates?character_id=$CHARACTER_ID" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
[
{"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cand_id | path | string | required | Proposal id |
content | body | string | optional | Reworded content (optional) |
Request
curl "$API/memories/candidates/$CANDIDATE_ID/accept" \
-H "Authorization: Bearer $KRINO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{}'Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cand_id | path | string | required | Proposal id |
Request
curl -X DELETE "$API/memories/candidates/$CANDIDATE_ID" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
job_id | path | string | required | Job id (memory_job from a turn) |
wait | query | number | optional | Seconds to wait for it to finish, up to 15default 0 |
Request
curl "$API/memory-jobs/$JOB_ID?wait=5" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cid | path | string | required | Character id |
chats | query | bool | optional | Include chatsdefault false |
Request
curl "$API/relations/$CHARACTER_ID/export?chats=true" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cid | path | string | required | Character id |
data | body | object | required | The whole object from “Export relationship” |
Request
curl "$API/relations/$CHARACTER_ID/import" \
-H "Authorization: Bearer $KRINO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"data": "…"}'Response
{"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
text | body | string | required | The text to speak1–600 chars |
voice | body | string | optional | A voice id from GET /voice/config; the default if omitted |
rate | body | number | optional | Speed, 0.5–2.00.5–2; default 1.0 |
style | body | string | optional | A voice description (characters designed from a sentence) |
stream | body | bool | optional | Stream 16-bit PCM (24 kHz mono) as it's synthesized; the first audio arrives in a fraction of a seconddefault false |
opus_stream | body | bool | optional | With stream, send Ogg Opus instead of PCM (decode with WebCodecs)default false |
opus_file | body | bool | optional | Return Ogg Opus instead of WAV for the whole clip; much smallerdefault false |
Request
curl "$API/voice/tts" \
-H "Authorization: Bearer $KRINO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"text": "Good night", "opus_file": true}' \
-o speech.oggResponse
# The body is the audio bytes
Content-Type: audio/ogg # audio/wav when opus_file is falseSpeech to text
POST/voice/sttAuth
Upload a recording as multipart/form-data and get the text back.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file | form | string | required | The recording: webm, ogg, mp4, wav… |
Request
curl "$API/voice/stt" \
-H "Authorization: Bearer $KRINO_API_KEY" \
-F file=@speech.webmResponse
{"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 "$API/voice/config" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
image | body | string | required | The image as a data URL≤ 8000000 chars |
question | body | string | optional | A question about it (optional)≤ 200 chars |
Request
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
{"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 "$API/health"Response
{"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 "$API/credits" \
-H "Authorization: Bearer $KRINO_API_KEY"Response
{"limit": 100.0, "spent": 12.5, "per_cny": 10.0, "image": 2.5}