Skip to main content
The Graph Completions API runs trained graphs (Graph Evolve) and built-in graphs (e.g. zero_shot_*) for production inference. Endpoints:
  • POST /api/graphs/completions - Policy graphs and general graph completions
  • POST /api/graphs/verifiers/completions - Verifier graphs (see Verifier API)
Authentication: Bearer token via Authorization: Bearer $SYNTH_API_KEY

Request (policy graphs)

{
  "job_id": "graph_gen_abc123",
  "input": {
    "question": "What is the capital of France?"
  }
}
FieldTypeRequiredDescription
job_idstringYesGraph job ID (e.g. graph_gen_...) or built-in zero_shot_* ID
inputobjectNoInput payload for policy graphs
traceobjectNoV3 trace payload for verifier graphs
rubricobjectNoRubric payload for verifier graphs
calibration_examplesarrayNoOptional few-shot examples
modelstringNoOverride the policy model for this call

RLM (v1 vs v2)

There are two common ways to run RLM graphs via graph completions:

RLM for policy-style inference

Use the built-in RLM policy graph:
{
  "job_id": "zero_shot_rlm_single",
  "input": {
    "query": "Analyze this 500k token log for anomalies.",
    "context": "...(large context)...",
    "system_prompt": "You are a senior security researcher..."
  }
}

RLM for verifier-style inference

The built-in verifier RLM graph is:
  • zero_shot_verifier_rubric_rlm (RLM v1 by default)
To explicitly select an RLM implementation, the SDK exposes rlm_impl: "v1" | "v2" when running verifier-shaped RLM (defaults to "v1"). When calling HTTP directly, include the selector alongside the verifier payload:
{
  "job_id": "zero_shot_verifier_rubric_rlm",
  "trace": { "...": "v3 trace payload" },
  "rubric": { "...": "rubric payload" },
  "options": {
    "verifier_shape": "rlm",
    "rlm_impl": "v2"
  }
}
Notes:
  • rlm_impl only applies when verifier_shape is "rlm".
  • For rubric-based verifier scoring, see reference/backend/verifier-api (same payload shape, plus richer verifier-specific examples).

Response

{
  "output": {
    "answer": "Paris"
  },
  "usage": {
    "prompt_tokens": 1024,
    "completion_tokens": 256,
    "total_tokens": 1280
  },
  "node_timing": {
    "node_1": 0.45,
    "node_2": 1.2
  },
  "metadata": {
    "latency_ms": 342,
    "model": "gpt-4o-mini",
    "snapshot_id": "snap_xyz789"
  }
}

Status Codes

  • 200 — Success
  • 400 — Invalid request (missing required fields / invalid graph ID)
  • 401 — Authentication failed
  • 413 — Request too large (trace or input exceeds limits)
  • 422 — Invalid trace format or missing required verifier fields

Graph Types

The Graph Completions API supports two main types of graphs:
  1. Policy Graphs - Generate outputs from inputs (e.g., question answering, text generation)
  2. Verifier Graphs - Evaluate traces against rubrics (see Verifier Completions)
Both use the same graph execution infrastructure but serve different purposes.
  • Verifier Completions: See Verifier API for detailed verifier graph documentation
  • Graph Evolve: See Graphs overview for job creation + artifact download examples