Skip to main content
POST
Save a generated statement
Use this endpoint to save an assistant reply that isn’t a factual answer, such as a suggestion, a plan or a draft, so the user can confirm it later. You typically call it after Classify an assistant reply returns provenance: AI_GENERATED, because that endpoint saves nothing for these replies. EDN saves the reply as an unconfirmed AI_GENERATED memory. It isn’t used in SIPs until the user confirms it with Confirm a memory.
If your app has no confirm feature, you can skip this endpoint.

What EDN does

  1. Saves the statement as an AI_GENERATED memory.
  2. Keeps it out of SIPs until the user confirms it.

Required headers

Request

Response

200 OK

Important behavior

  • AI_GENERATED memories are never used as facts in a SIP. They become usable only after the user confirms them with Confirm a memory.
  • Each call counts toward your daily limit on saving memory.

Errors

See Error handling.

Authorizations

Authorization
string
header
required

Your EDN API key, sent as Bearer YOUR_API_KEY. Create keys in the Console.

Body

application/json
assistant_message
string
required

The statement the assistant made, to be saved as an unconfirmed guess.

Minimum string length: 1
Example:

"Here is a draft plan for the launch."

session_id
string
required

Which chat this belongs to.

Required string length: 1 - 128
Example:

"chat-42"

project_id
string | null

Which project/workspace this belongs to. Leave it out for a regular chat.

Response

Successful Response

record_id
string
required

The ID of the saved AI_GENERATED memory.