Skip to content

Saving & reopening a chat

A chat can leave the platform as a JSON file and come back into any session you can open. It is the plain way to keep a conversation you care about, hand it to a colleague, or pick it up again on a different model.

  1. Open the chat.

  2. Use the download button.

  3. You get <the chat's title>.json, written by the browser.

Nothing is asked of the server: everything the file holds is already on screen.

  1. Open the session you want it in — the same one, or another.

  2. Import the file.

  3. It arrives as a new chat at the end of that session, with its whole history: system prompt, every question, every answer.

The imported chat is a new chat, not the old one moved. It gets its own id and its own position, so importing the same file twice gives you two copies.

The file names the model the conversation ran on, and you can change it before importing. The history stays; the next answer comes from the model you picked.

That is the interesting use, and it is why the format keeps the model name rather than the model itself: asking a second model to carry on where the first one stopped is a comparison you cannot set up any other way.

{
"model_name": "GPT-4",
"title": "Medical Q&A",
"context_text": "You are a medical assistant.",
"messages": [
{ "role": "system", "content": "You are a medical assistant." },
{ "role": "user", "content": "What is hypertension?" },
{ "role": "assistant", "content": "Hypertension is a condition..." }
]
}
FieldTypeWhat it is
model_namestringThe model the conversation ran on
titlestringWhat the chat is called
context_textstring?The system prompt, if it had one
messagesarrayThe conversation, in order
messages[].rolestringsystem, user or assistant
messages[].contentstringThe text

It is deliberately small. There are no ids, no timestamps and no run traces in it: a file that carried them would look like it could restore them, and it cannot — what comes back is a conversation, not the work that produced it. For that, see the Archive.

Anything you can do with the button, you can do with one request — which is how you would import a hundred conversations rather than one.

POST /api/sessions/{session_id}/chats/import
Authorization: Bearer <token>
Content-Type: application/json

The body is the file, verbatim. The response is the created chat with its messages, ids and positions filled in.

The server checks the session is yours, works out the next free position, and writes the messages in the order you gave them. It does not ask any model anything: importing costs nothing.