API for managing personal memory items with authentication and user-specific data.
API for managing personal memory items with authentication and user-specific data.
This API supports three authentication methods:
X-API-Key headerX-API-Key: <your-api-key>X-Session-Token headerX-Session-Token: <your-session-token>Authorization headerAuthorization: Bearer <token>All endpoints require one of these authentication methods.
curl -i -X GET \
'https://memory.papr.ai/v1/frequencies/{frequency_schema_id}' \
-H 'X-API-Key: string'Successful Response
Frequency band definitions
Operational configuration
Path to DSPy-optimized extractor model (null = use direct LLM)
Path to DSPy-optimized extractor model (null = use direct LLM)
Path to DSPy-optimized extractor model (null = use direct LLM)
LLM model for metadata extraction
Frequency weight mode (legacy_sparse, code_search_v2, hybrid_optimized_v2)
Enable complex interference scoring (PDCI, SFI)
Enable query-adaptive frequency weights
Cross-encoder reranking model
Number of candidates for cross-encoder reranking
Enable entailment-gated reranking (EGR)
{ "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" } }
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.
Optional caller-provided base embedding (Qwen 2560-d). If omitted, the server computes it.
Optional caller-provided base embedding (Qwen 2560-d). If omitted, the server computes it.
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.
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.
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.
Free-form user metadata to attach (optional, not used for scoring).
Free-form user metadata to attach (optional, not used for scoring).
Embedder for per-band signal vectors. 'sbert' (384d, default) is ~10x cheaper to store than 'qwen' (2560d, matched to base).
If true, include the rot_v3 vector in the response.
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
}'Successful Response
Signal band-name -> extracted text (e.g. {'docstring': '...', 'function_name': '...'}).
Signal band-name -> embedding vector (384-d sbert or 2560-d qwen).
Rotation v3 vector (only when return_rot_v3=true).
Rotation v3 vector (only when return_rot_v3=true).
Base + bands concatenation (only when return_concat=true).
Base + bands concatenation (only when return_concat=true).
{ "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": {} }
Query text (string) or QueryItem with pre-computed artifacts.
Query text (string) or QueryItem with pre-computed artifacts.
Query text (string) or QueryItem with pre-computed artifacts.
Candidate documents (string or DocumentInput with pre-computed artifacts).
Return at most this many results. Defaults to len(documents).
Return at most this many results. Defaults to len(documents).
Return at most this many results. Defaults to len(documents).
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.
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.
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.
Public: enhanced or max (CE reranker). Accepts deprecated 'fast'/'enhanced' aliases.
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.
Hard cutoffs on per-frequency signals, e.g. {'domain_match': 0.6}. Docs below are dropped.
Hard cutoffs on per-frequency signals, e.g. {'domain_match': 0.6}. Docs below are dropped.
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.
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.
Per-request CAESAR-VIII routing overrides. Stacks on top of domain defaults and MongoDB graph_domains.routing_config.
Per-request CAESAR-VIII routing overrides. Stacks on top of domain defaults and MongoDB graph_domains.routing_config.
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).
If true, echo back each input document in the result.
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
}'Successful Response
Doc id if input was an object, else null.
Doc id if input was an object, else null.
Doc id if input was an object, else null.
Final ranked score — the real similarity from the CAESAR-8 routed method.
Which method CAESAR-8 routed to for this query (e.g. 'caesar7', 'baseline_rerank'). Tells you what kind of signal relevance_score reflects.
Which method CAESAR-8 routed to for this query (e.g. 'caesar7', 'baseline_rerank'). Tells you what kind of signal relevance_score reflects.
Which method CAESAR-8 routed to for this query (e.g. 'caesar7', 'baseline_rerank'). Tells you what kind of signal relevance_score reflects.
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.
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.
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.
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.
Kitchen-sink: every *_sim signal computed by the pipeline. Only if return_debug=true. NOT a stable contract — keys may change.
Kitchen-sink: every *_sim signal computed by the pipeline. Only if return_debug=true. NOT a stable contract — keys may change.
Cohere/Voyage-compatible usage block, e.g. {'search_units': 1, 'docs_scored': 100}. Populated for /v1/graph/rerank and /v1/graph/search.
Cohere/Voyage-compatible usage block, e.g. {'search_units': 1, 'docs_scored': 100}. Populated for /v1/graph/rerank and /v1/graph/search.
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.
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.
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.
{ "id": "string", "results": [ { … } ], "meta": { "domain_id": "string", "method_used": "enhanced", "billed_units": 0, "usage": {}, "timing_ms": {}, "debug": {} } }