Skip to content
Documentation
Hosted platformREST API reference

Conversations

What the routed chat remembers for the caller: conversations the platform keeps for `/v1/chat/completions` (`osr.conversation_id` continues one across desktop, browser and playground; the platform prepends the history and a rolling summary) and the long-term memory - facts the person stated about themselves, listed, edited, disabled or deleted here; `PUT /memory/settings` turns it off.

Hosted platformAPI version 1.7.0

get/api/v1/conversations

List Conversations

Requires an API key

Parameters

NameInTypeDefaultDescription
clientquerystring | null
qquerystring""
limitqueryinteger50

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/conversations?q=&limit=50" \
  -H "Authorization: Bearer $OSR_API_KEY"

delete/api/v1/conversations

Delete Conversations

Requires an API key

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/conversations" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/conversations/{conversation_id}

Get Conversation

Requires an API key

Parameters

NameInTypeDefaultDescription
conversation_id(required)pathstring

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/conversations/<conversation_id>" \
  -H "Authorization: Bearer $OSR_API_KEY"

patch/api/v1/conversations/{conversation_id}

Rename Conversation

Requires an API key

Parameters

NameInTypeDefaultDescription
conversation_id(required)pathstring

Request bodyConversationPatch

FieldTypeDefaultDescription
title(required)string

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PATCH "$OSR_URL/api/v1/conversations/<conversation_id>" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "title": "string" }'
Bodyjson
{
  "title": "string"
}

delete/api/v1/conversations/{conversation_id}

Delete Conversation

Requires an API key

Parameters

NameInTypeDefaultDescription
conversation_id(required)pathstring

Responses

204Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/conversations/<conversation_id>" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/conversations/{conversation_id}/split

Split Conversation

A topic change the person confirmed: the turns from from_seq on become their own conversation.

Requires an API key

Parameters

NameInTypeDefaultDescription
conversation_id(required)pathstring

Request bodyConversationSplitIn

FieldTypeDefaultDescription
from_seq(required)integer

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/conversations/<conversation_id>/split" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "from_seq": 1 }'
Bodyjson
{
  "from_seq": 1
}

get/api/v1/memory

Get Memory

Requires an API key

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/memory" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/memory

Add Memory

Requires an API key

Request bodyMemoryIn

FieldTypeDefaultDescription
content(required)string
kindstring"note"

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/memory" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "Prove that sqrt(2) is irrational." }'
Bodyjson
{
  "content": "Prove that sqrt(2) is irrational."
}

delete/api/v1/memory

Delete Memories

Requires an API key

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/memory" \
  -H "Authorization: Bearer $OSR_API_KEY"

put/api/v1/memory/settings

Put Memory Settings

Requires an API key

Request bodyMemorySettingsIn

FieldTypeDefaultDescription
enabled(required)boolean

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PUT "$OSR_URL/api/v1/memory/settings" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": false }'
Bodyjson
{
  "enabled": false
}

patch/api/v1/memory/{memory_id}

Patch Memory

Requires an API key

Parameters

NameInTypeDefaultDescription
memory_id(required)pathstring

Request bodyMemoryPatch

FieldTypeDefaultDescription
contentstring | null
disabledboolean | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PATCH "$OSR_URL/api/v1/memory/<memory_id>" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "Prove that sqrt(2) is irrational.", "disabled": false }'
Bodyjson
{
  "content": "Prove that sqrt(2) is irrational.",
  "disabled": false
}

delete/api/v1/memory/{memory_id}

Delete Memory

Requires an API key

Parameters

NameInTypeDefaultDescription
memory_id(required)pathstring

Responses

204Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/memory/<memory_id>" \
  -H "Authorization: Bearer $OSR_API_KEY"