---
title: "Producer endpoint -- text -> phases + signals + embeddings"
method: POST
path: "/v1/graph/transform"
tags: ["v1", "Graph"]
---

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

`POST /v1/graph/transform`

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.

## Request body

- GraphTransformRequest — Producer endpoint -- turns text into all the per-doc artifacts you'd want to store in any vector DB (Qdrant, pgvector, Pinecone, in-memory). Always extracts and embeds signals for all 14 bands.
  - `text` string, required — Source text to transform.
  - `embedding` number[], nullable — Optional caller-provided base embedding (Qwen 2560-d). If omitted, the server computes it.
  - `domain_id` string, nullable — 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.
  - `metadata` object, nullable — Free-form user metadata to attach (optional, not used for scoring).
  - `signal_embedder` 'sbert' | 'qwen' — Embedder for per-band signal vectors. 'sbert' (384d, default) is ~10x cheaper to store than 'qwen' (2560d, matched to base).
  - `return_rot_v3` boolean — If true, include the rot_v3 vector in the response.
  - `return_concat` boolean — If true, include the base + bands concatenation embedding.

## Response `200`

Successful Response

- GraphTransformResponse — Transform response - returns artifacts that can be passed to rerank/search. All fields map 1:1 to DocumentInput fields for rerank.
  - `phases` number[], required — Per-frequency phase angles (14-dim).
  - `embedding` number[], required — Base embedding (normalized Qwen 2560-d).
  - `signals` object — Signal band-name -> extracted text (e.g. {'docstring': '...', 'function_name': '...'}).
  - `signal_embeddings` object — Signal band-name -> embedding vector (384-d sbert or 2560-d qwen).
  - `rot_v3` number[], nullable — Rotation v3 vector (only when return_rot_v3=true).
  - `concat_embedding` number[], nullable — Base + bands concatenation (only when return_concat=true).
  - `id` string, required — Request id for log correlation.
  - `domain_id` string, required — Domain used for extraction.
  - `meta` object — Timing and stats.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/papr-ai/apis/papr-memory-api.md) · [All operations](https://skmtc.net/papr-ai/apis/papr-memory-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/papr-ai/papr-memory-api/versions/b553be9aad37/schema)
