Skip to main content
Graph optimization endpoints create and manage training runs that produce an optimized graph (policy/verifier/RLM) plus downloadable artifacts. This page covers:
  • Graph Evolve job endpoints (/api/graphgen/...) used by the Graph Evolve product surface
  • A note on Graph Evolve job endpoints (/api/graph-evolve/...) used by the unified graph optimization job
Authentication: Bearer token via Authorization: Bearer $SYNTH_API_KEY

Graph Evolve

Create job

Endpoint: POST /api/graphgen/jobs
{
  "dataset": { "...": "GraphEvolveTaskSet JSON" },
  "policy_model": "gpt-4o-mini",
  "rollout_budget": 200,
  "proposer_effort": "medium",
  "auto_start": true
}
Notes:
  • dataset is a GraphEvolveTaskSet JSON object (see Graphs quickstart for a full example).
  • The remaining fields tune training and may evolve over time.
Response: returns a graph_gen_job_id.

Get job status

Endpoint: GET /api/graphgen/jobs/{graph_gen_job_id}

Stream job events

Endpoint: GET /api/graphgen/jobs/{graph_gen_job_id}/events/stream This endpoint streams server-sent events (SSE) for live progress updates.

Download best artifacts

Endpoint: GET /api/graphgen/jobs/{graph_gen_job_id}/download Downloads the best prompt snapshot and related export artifacts after the job reaches a terminal state.

Run inference (Graph Evolve-trained graphs)

Endpoint: POST /api/graphgen/graph/completions
{
  "job_id": "graph_gen_XXXX",
  "input": { "query": "Upgrade my plan" }
}
For the unified inference API across trained + built-in graphs, use POST /api/graphs/completions (see reference/backend/graphs-completions-api).

Graph Evolve (graph optimization jobs)

The SDK’s GraphOptimizationJob uses:
  • /api/graph-evolve/jobs and legacy /api/graph_evolve/jobs
The request body mirrors the “graph optimization” job configuration used by the SDK (TOML or programmatic dict). If you need to call this directly, prefer using the Python SDK (synth_ai.sdk.optimization.graph) to ensure payload compatibility.

Status Codes

  • 200 / 201 — Success
  • 400 — Invalid request
  • 401 — Authentication failed
  • 404 — Job not found