Papr Memory API (1.0.0)

API for managing personal memory items with authentication and user-specific data.

Authentication

This API supports three authentication methods:

  • API Key: Include your API key in the X-API-Key header
    X-API-Key: <your-api-key>
  • Session Token: Include your session token in the X-Session-Token header
    X-Session-Token: <your-session-token>
  • Bearer Token: Include your OAuth2 token from Auth0 in the Authorization header
    Authorization: Bearer <token>

All endpoints require one of these authentication methods.

Download OpenAPI description
Languages
Servers
Production server
https://memory.papr.ai/

v1

Operations

Get a frequency schema by ID or shorthand

Request

Retrieve a specific frequency schema by its full ID (e.g. 'code_search:cosqa:2.0.0') or shorthand alias (e.g. 'cosqa').

Path
frequency_schema_idstring(Frequency Schema Id)required
Headers
X-API-KeyX-Api-Key (string) or X-Api-Key (null)(X-Api-Key)
Any of:
string(X-Api-Key)
curl -i -X GET \
  'https://memory.papr.ai/v1/frequencies/{frequency_schema_id}' \
  -H 'X-API-Key: string'

Responses

Successful Response

Bodyapplication/json
schema_idstring(Schema Id)required

Unique schema ID (domain:name:version)

namestring(Name)required

Schema name

domainstring(Domain)required

Domain (e.g. code_search, biomedical)

versionstring(Version)required

Schema version

descriptionstring(Description)

Human-readable description

Default ""
num_frequenciesinteger(Num Frequencies)required

Number of frequency bands

frequenciesArray of objects(Frequencies)required

Frequency band definitions

frequencies[].​frequency_hznumber(Frequency Hz)required

Frequency in Hz (brain-inspired band)

frequencies[].​namestring(Name)required

Field name extracted at this frequency

frequencies[].​typestring(Type)required

Field type: ENUM, FREE_TEXT, NUMERIC, DATE, MULTI_VALUE

frequencies[].​descriptionstring(Description)

Human-readable field description

Default ""
frequencies[].​weightnumber(Weight)

Default weight for this frequency band

Default 1
configobject(SchemaConfigResponse)required

Operational configuration

config.​dspy_model_pathDspy Model Path (string) or Dspy Model Path (null)(Dspy Model Path)

Path to DSPy-optimized extractor model (null = use direct LLM)

Any of:

Path to DSPy-optimized extractor model (null = use direct LLM)

string(Dspy Model Path)

Path to DSPy-optimized extractor model (null = use direct LLM)

config.​llm_metadata_modelstring(Llm Metadata Model)

LLM model for metadata extraction

Default "gpt-5-mini"
config.​weight_modestring(Weight Mode)

Frequency weight mode (legacy_sparse, code_search_v2, hybrid_optimized_v2)

Default "legacy_sparse"
config.​contrast_gammanumber(Contrast Gamma)

Contrast enhancement gamma

Default 2
config.​use_sparse_weightsboolean(Use Sparse Weights)

Enable sparse frequency weights

Default true
config.​use_complex_interferenceboolean(Use Complex Interference)

Enable complex interference scoring (PDCI, SFI)

Default true
config.​use_adaptive_weightsboolean(Use Adaptive Weights)

Enable query-adaptive frequency weights

Default true
config.​cross_encoder_modelstring(Cross Encoder Model)

Cross-encoder reranking model

Default "Qwen/Qwen3-Reranker-4B"
config.​cross_encoder_topkinteger(Cross Encoder Topk)

Number of candidates for cross-encoder reranking

Default 25
config.​qdrant_topkinteger(Qdrant Topk)

Over-fetch count from Qdrant for reranking

Default 50
config.​enable_entailment_rerankboolean(Enable Entailment Rerank)

Enable entailment-gated reranking (EGR)

Default true
config.​default_scoring_methodstring(Default Scoring Method)

Default scoring method for this schema

Default "egr_rerank"
Response
application/json
{ "schema_id": "string", "name": "string", "domain": "string", "version": "string", "description": "", "num_frequencies": 0, "frequencies": [ {} ], "config": { "dspy_model_path": "string", "llm_metadata_model": "gpt-5-mini", "weight_mode": "legacy_sparse", "contrast_gamma": 2, "use_sparse_weights": true, "use_complex_interference": true, "use_adaptive_weights": true, "cross_encoder_model": "Qwen/Qwen3-Reranker-4B", "cross_encoder_topk": 25, "qdrant_topk": 50, "enable_entailment_rerank": true, "default_scoring_method": "egr_rerank" } }

Producer endpoint -- text -> phases + signals + embeddings

Request

Vector-store agnostic producer.

Returns everything you'd want to index in any vector DB -- base embedding, 14-band extracted signals, per-band SBERT/Qwen embeddings, phases, and optional rot_v3 / concat reconstructions.

Uses the SAME extraction + embedding path as /v1/graph/rerank uses for queries, so artifacts produced here can be scored by /v1/graph/rerank without any drift.

Bodyapplication/jsonrequired
textstring(Text)required

Source text to transform.

embeddingArray of Embedding (numbers) or Embedding (null)(Embedding)

Optional caller-provided base embedding (Qwen 2560-d). If omitted, the server computes it.

Any of:

Optional caller-provided base embedding (Qwen 2560-d). If omitted, the server computes it.

domain_idDomain Id (string) or Domain Id (null)(Domain Id)

Domain shortname or full schema id controlling which frequency bands and extraction rules are used. Built-in shortnames: "general" (default), "code", "cosqa", "codetrans", "codetransocean", "codetransocean_hybrid", "text2sql", "scifact", "nfcorpus", "fiqa", "legal", "medical", "ecommerce", "coffee_shops". You can also pass a full schema id (e.g. "code_search:cosqa:2.0.0") or a custom domain_id registered via POST /v1/graph/domains.

Any of:

Domain shortname or full schema id controlling which frequency bands and extraction rules are used. Built-in shortnames: "general" (default), "code", "cosqa", "codetrans", "codetransocean", "codetransocean_hybrid", "text2sql", "scifact", "nfcorpus", "fiqa", "legal", "medical", "ecommerce", "coffee_shops". You can also pass a full schema id (e.g. "code_search:cosqa:2.0.0") or a custom domain_id registered via POST /v1/graph/domains.

string(Domain Id)

Domain shortname or full schema id controlling which frequency bands and extraction rules are used. Built-in shortnames: "general" (default), "code", "cosqa", "codetrans", "codetransocean", "codetransocean_hybrid", "text2sql", "scifact", "nfcorpus", "fiqa", "legal", "medical", "ecommerce", "coffee_shops". You can also pass a full schema id (e.g. "code_search:cosqa:2.0.0") or a custom domain_id registered via POST /v1/graph/domains.

metadataMetadata (object) or Metadata (null)(Metadata)

Free-form user metadata to attach (optional, not used for scoring).

Any of:

Free-form user metadata to attach (optional, not used for scoring).

signal_embedderstring(Signal Embedder)

Embedder for per-band signal vectors. 'sbert' (384d, default) is ~10x cheaper to store than 'qwen' (2560d, matched to base).

Default "sbert"
Enum"sbert""qwen"
return_rot_v3boolean(Return Rot V3)

If true, include the rot_v3 vector in the response.

Default false
return_concatboolean(Return Concat)

If true, include the base + bands concatenation embedding.

Default false
curl -i -X POST \
  https://memory.papr.ai/v1/graph/transform \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "text": "string",
    "embedding": [
      0
    ],
    "domain_id": "string",
    "metadata": {},
    "signal_embedder": "sbert",
    "return_rot_v3": false,
    "return_concat": false
  }'

Responses

Successful Response

Bodyapplication/json
phasesArray of numbers(Phases)required

Per-frequency phase angles (14-dim).

embeddingArray of numbers(Embedding)required

Base embedding (normalized Qwen 2560-d).

signalsobject(Signals)

Signal band-name -> extracted text (e.g. {'docstring': '...', 'function_name': '...'}).

signal_embeddingsobject(Signal Embeddings)

Signal band-name -> embedding vector (384-d sbert or 2560-d qwen).

rot_v3Array of Rot V3 (numbers) or Rot V3 (null)(Rot V3)

Rotation v3 vector (only when return_rot_v3=true).

Any of:

Rotation v3 vector (only when return_rot_v3=true).

concat_embeddingArray of Concat Embedding (numbers) or Concat Embedding (null)(Concat Embedding)

Base + bands concatenation (only when return_concat=true).

Any of:

Base + bands concatenation (only when return_concat=true).

idstring(Id)required

Request id for log correlation.

domain_idstring(Domain Id)required

Domain used for extraction.

metaobject(Meta)

Timing and stats.

Response
application/json
{ "phases": [ 0 ], "embedding": [ 0 ], "signals": { "property1": "string", "property2": "string" }, "signal_embeddings": { "property1": [], "property2": [] }, "rot_v3": [ 0 ], "concat_embedding": [ 0 ], "id": "string", "domain_id": "string", "meta": {} }

Rerank candidate documents against a query

Request

Bodyapplication/jsonrequired
queryQuery (string) or QueryItem (object)(Query)required

Query text (string) or QueryItem with pre-computed artifacts.

Any of:

Query text (string) or QueryItem with pre-computed artifacts.

string(Query)

Query text (string) or QueryItem with pre-computed artifacts.

documentsArray of strings or DocumentInput (object)(Documents)required

Candidate documents (string or DocumentInput with pre-computed artifacts).

Any of:
string
top_kTop K (integer) or Top K (null)(Top K)

Return at most this many results. Defaults to len(documents).

Any of:

Return at most this many results. Defaults to len(documents).

[ 1 .. 2000 ]
integer(Top K)[ 1 .. 2000 ]

Return at most this many results. Defaults to len(documents).

domain_idDomain Id (string) or Domain Id (null)(Domain Id)

Domain shortname or full schema id controlling which frequency bands and extraction rules are used. Built-in shortnames: "general" (default), "code", "cosqa", "codetrans", "codetransocean", "codetransocean_hybrid", "text2sql", "scifact", "nfcorpus", "fiqa", "legal", "medical", "ecommerce", "coffee_shops". You can also pass a full schema id (e.g. "code_search:cosqa:2.0.0") or a custom domain_id registered via POST /v1/graph/domains.

Default "general"
Any of:

Domain shortname or full schema id controlling which frequency bands and extraction rules are used. Built-in shortnames: "general" (default), "code", "cosqa", "codetrans", "codetransocean", "codetransocean_hybrid", "text2sql", "scifact", "nfcorpus", "fiqa", "legal", "medical", "ecommerce", "coffee_shops". You can also pass a full schema id (e.g. "code_search:cosqa:2.0.0") or a custom domain_id registered via POST /v1/graph/domains.

string(Domain Id)

Domain shortname or full schema id controlling which frequency bands and extraction rules are used. Built-in shortnames: "general" (default), "code", "cosqa", "codetrans", "codetransocean", "codetransocean_hybrid", "text2sql", "scifact", "nfcorpus", "fiqa", "legal", "medical", "ecommerce", "coffee_shops". You can also pass a full schema id (e.g. "code_search:cosqa:2.0.0") or a custom domain_id registered via POST /v1/graph/domains.

Default "general"
methodstring(Method)

Public: enhanced or max (CE reranker). Accepts deprecated 'fast'/'enhanced' aliases.

Default "fast"
Enum"fast""enhanced"
signal_embedderstring(Signal Embedder)

Embedder for per-band signal vectors when extracting query/docs. 'sbert' (384d, default) is ~10x cheaper to store than 'qwen' (2560d). Must match the embedder used for any BYO signal_embeddings.

Default "sbert"
Enum"sbert""qwen"
signal_filtersSignal Filters (object) or Signal Filters (null)(Signal Filters)

Hard cutoffs on per-frequency signals, e.g. {'domain_match': 0.6}. Docs below are dropped.

Any of:

Hard cutoffs on per-frequency signals, e.g. {'domain_match': 0.6}. Docs below are dropped.

signal_multipliersSignal Multipliers (object) or Signal Multipliers (null)(Signal Multipliers)

Per-frequency scoring weight multipliers. Keys may be field names (e.g. 'claim_stance', 'causal_verb') or Hz-strings (e.g. '19.0'). Values: 'auto' (default) or 1.0 = unchanged, 2.0 = 2x boost, 0.0 = disable that band. Fields not specified default to 'auto'. Stacks on top of the schema-level FrequencyField.weight multipliers; request-level overrides win on conflict.

Any of:

Per-frequency scoring weight multipliers. Keys may be field names (e.g. 'claim_stance', 'causal_verb') or Hz-strings (e.g. '19.0'). Values: 'auto' (default) or 1.0 = unchanged, 2.0 = 2x boost, 0.0 = disable that band. Fields not specified default to 'auto'. Stacks on top of the schema-level FrequencyField.weight multipliers; request-level overrides win on conflict.

routing_configGraphDomainRoutingConfig (object) or null

Per-request CAESAR-VIII routing overrides. Stacks on top of domain defaults and MongoDB graph_domains.routing_config.

Any of:

Per-request CAESAR-VIII routing overrides. Stacks on top of domain defaults and MongoDB graph_domains.routing_config.

return_signal_scoresboolean(Return Signal Scores)

If true, each result carries signal_scores (method-level scores like base_sim, caesar8_score) and signal_scores_by_band (per-frequency band alignments such as key_apis, language).

Default false
return_documentsboolean(Return Documents)

If true, echo back each input document in the result.

Default false
return_debugboolean(Return Debug)

If true, include CAESAR meta-signals + timing in meta.debug.

Default false
curl -i -X POST \
  https://memory.papr.ai/v1/graph/rerank \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "query": "string",
    "documents": [
      "string"
    ],
    "top_k": 1,
    "domain_id": "general",
    "method": "fast",
    "signal_embedder": "sbert",
    "signal_filters": {
      "property1": 0,
      "property2": 0
    },
    "signal_multipliers": {},
    "routing_config": {
      "disabled_rules": [
        "string"
      ],
      "enabled_rule_packs": [
        "string"
      ],
      "threshold_overrides": {
        "property1": 0,
        "property2": 0
      },
      "enhanced_initial_source": "string",
      "holographic_floor": true,
      "ce_gate_min_phi": 0,
      "egr_lambda_ce": 0,
      "caesar4_source": "string"
    },
    "return_signal_scores": false,
    "return_documents": false,
    "return_debug": false
  }'

Responses

Successful Response

Bodyapplication/json
idstring(Id)required

Request id for log correlation.

resultsArray of objects(Results)required
results[].​indexinteger(Index)required

Position in the input documents array.

results[].​idId (string) or Id (null)(Id)

Doc id if input was an object, else null.

Any of:

Doc id if input was an object, else null.

string(Id)

Doc id if input was an object, else null.

results[].​relevance_scorenumber(Relevance Score)required

Final ranked score — the real similarity from the CAESAR-8 routed method.

results[].​score_methodScore Method (string) or Score Method (null)(Score Method)

Which method CAESAR-8 routed to for this query (e.g. 'caesar7', 'baseline_rerank'). Tells you what kind of signal relevance_score reflects.

Any of:

Which method CAESAR-8 routed to for this query (e.g. 'caesar7', 'baseline_rerank'). Tells you what kind of signal relevance_score reflects.

string(Score Method)

Which method CAESAR-8 routed to for this query (e.g. 'caesar7', 'baseline_rerank'). Tells you what kind of signal relevance_score reflects.

results[].​signal_scoresSignal Scores (object) or Signal Scores (null)(Signal Scores)

Stable, documented signals (only if return_signal_scores=true). Always includes base_sim and caesar8_score. On enhanced method, also includes rot_k{32,128,256,512}_sim low-rank rotation variants.

Any of:

Stable, documented signals (only if return_signal_scores=true). Always includes base_sim and caesar8_score. On enhanced method, also includes rot_k{32,128,256,512}_sim low-rank rotation variants.

results[].​signal_scores_by_bandSignal Scores By Band (object) or Signal Scores By Band (null)(Signal Scores By Band)

Per-band signal similarities, keyed by band name (e.g. {'causal_agent': 0.83, 'causal_verb': 0.91}). Only set if return_signal_scores=true and the pipeline computed gated SFI.

Any of:

Per-band signal similarities, keyed by band name (e.g. {'causal_agent': 0.83, 'causal_verb': 0.91}). Only set if return_signal_scores=true and the pipeline computed gated SFI.

results[].​debug_scoresDebug Scores (object) or Debug Scores (null)(Debug Scores)

Kitchen-sink: every *_sim signal computed by the pipeline. Only if return_debug=true. NOT a stable contract — keys may change.

Any of:

Kitchen-sink: every *_sim signal computed by the pipeline. Only if return_debug=true. NOT a stable contract — keys may change.

results[].​documentDocumentInput (object) or null

Echoed input doc (only if return_documents=true).

Any of:

Echoed input doc (only if return_documents=true).

metaobject(GraphMeta)required
meta.​domain_idstring(Domain Id)required
meta.​method_usedstring(Method Used)required
Enum"enhanced""max""fast"
meta.​billed_unitsinteger(Billed Units)

Mini interactions consumed.

Default 0
meta.​usageUsage (object) or Usage (null)(Usage)

Cohere/Voyage-compatible usage block, e.g. {'search_units': 1, 'docs_scored': 100}. Populated for /v1/graph/rerank and /v1/graph/search.

Any of:

Cohere/Voyage-compatible usage block, e.g. {'search_units': 1, 'docs_scored': 100}. Populated for /v1/graph/rerank and /v1/graph/search.

meta.​timing_msobject(Timing Ms)

Latency breakdown in milliseconds. Top-level keys: services_init, pipeline, total. Optional phases is a nested dict with per-stage timings: query_processing, retrieval, rerank, caesar_routing.

meta.​debugDebug (object) or Debug (null)(Debug)

Debug payload when return_debug=true. Includes: selection_signals (scalar routing inputs), v3a_routing / v4a_routing (method selection diagnostics), routing_signals (method_bgrs, method_t1lrs, pool quality), spread_signals (gauss/sfi/hcond spread boosters), signal_multipliers, signal_weights, signal_weights_sparse, routing_config, domain_method_priors, doc_scores (per-doc method score vectors), router_state (v4a EMA snapshot), rule_fired, zone, caesar8_mode. Per-phase timings live in timing_ms.phases.

Any of:

Debug payload when return_debug=true. Includes: selection_signals (scalar routing inputs), v3a_routing / v4a_routing (method selection diagnostics), routing_signals (method_bgrs, method_t1lrs, pool quality), spread_signals (gauss/sfi/hcond spread boosters), signal_multipliers, signal_weights, signal_weights_sparse, routing_config, domain_method_priors, doc_scores (per-doc method score vectors), router_state (v4a EMA snapshot), rule_fired, zone, caesar8_mode. Per-phase timings live in timing_ms.phases.

Response
application/json
{ "id": "string", "results": [ {} ], "meta": { "domain_id": "string", "method_used": "enhanced", "billed_units": 0, "usage": {}, "timing_ms": {}, "debug": {} } }

Memory

Operations

Memory Status

Operations

User

Operations

Feedback

Operations

Schema Management

Operations

Messages

Operations

omo

Operations

Namespace

Operations

Frequency Schemas

Operations

Holographic Transform (Deprecated)

Operations

Graph (CAESAR-8)

Operations

Graph Domains

Operations

Instance Configuration

Operations

AI Proxy

Operations

Sync

Operations

Telemetry

Operations

Document

Operations

GraphQL

Operations

Authentication

Operations