Skip to main content
POST
/
v2
/
memory
/
ask
Ask Memory
curl --request POST \
  --url https://api.velt.dev/v2/memory/ask \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "question": "<string>",
    "organizationId": "<string>",
    "documentId": "<string>",
    "filters": {},
    "recencyDays": 123
  }
}
'
{
  "result": {
    "answer": "Reviewers consistently reject copy that makes medical claims without a citation...",
    "citations": [
      { "recordId": "act_8f3...", "snippet": "Claim 'clinically proven' lacks a citation." }
    ],
    "confidence": 0.74,
    "recordsSearched": 18
  }
}
Use this API to ask a natural-language question over your Memory. The answer is grounded in your judgments and ingested knowledge, and comes with citations and a confidence score. When retrieval finds no relevant context, answer is an empty string with confidence: 0 rather than an invented answer; treat that as “Memory has nothing to say about this yet.”

Endpoint

POST https://api.velt.dev/v2/memory/ask

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

Ask a policy question

{
  "data": {
    "question": "How do we handle marketing copy that makes medical claims?"
  }
}

Response

answer is the grounded answer (an empty string when there is no grounding context). citations point at the judgment records the answer drew on. confidence is 0 when the answer is empty.

Success Response

{
  "result": {
    "answer": "Reviewers consistently reject copy that makes medical claims without a citation...",
    "citations": [
      { "recordId": "act_8f3...", "snippet": "Claim 'clinically proven' lacks a citation." }
    ],
    "confidence": 0.74,
    "recordsSearched": 18
  }
}

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
{
  "result": {
    "answer": "Reviewers consistently reject copy that makes medical claims without a citation...",
    "citations": [
      { "recordId": "act_8f3...", "snippet": "Claim 'clinically proven' lacks a citation." }
    ],
    "confidence": 0.74,
    "recordsSearched": 18
  }
}