Skip to content
SynthGraph
Developers

Instrument your research in Python.

The SDK is the primary integration surface. It wraps the generation and training code you already run and sends structured provenance to the API over HTTPS.

python
from synthgraph import SynthGraphClient
Request a DemoSDK in early development
  • 01

    Installation

    The SDK is a Python package with a small dependency surface. It targets the Python versions research environments actually run.

    shell
    $ pip install synthgraph
  • 02

    Client configuration

    The API key is read from the environment, never hard-coded. The endpoint is configurable so the same code can run against a hosted deployment or one you operate yourself.

    client.py
    import os from synthgraph import SynthGraphClient client = SynthGraphClient(    api_key=os.environ["SYNTHGRAPH_API_KEY"],    # Point at a hosted or self-controlled deployment.    api_url=os.environ.get("SYNTHGRAPH_API_URL"),)
  • 03

    Projects and experiments

    Ownership runs User → Project → Experiment. An experiment holds the generations and training runs that belong together.

    setup.py
    project = client.projects.create(    name="Wildlife Detection",    description="Synthetic rain scenes for detection in adverse weather",) experiment = client.experiments.create(    project_id=project.id,    name="Rainy Scene Generation",)
  • 04

    Generations

    A generation is created before the run, with the generator, parameters and seed that define it. That ordering is what makes the record trustworthy: the configuration is written down before the outcome is known.

    sweep.py
    from synthgraph import Generator, Reproducibility generation = client.generations.create(    experiment_id=experiment.id,    name="Rainy Scene Generation",    generator=Generator(        name="blender",        version="4.2.0",    ),    parameters={        "weather": "rain",        "occlusion": 0.30,        "camera_distance": 12,    },    reproducibility=Reproducibility(        seed=42,    ),)
  • 05

    References

    Datasets and assets are attached by reference and version. Nothing requires uploading a dataset to SynthGraph in order to record its provenance.

    sweep.py
    # The dataset stays where it already lives. SynthGraph records# the reference, the version and the checksum — not the bytes.client.generations.complete(    generation.id,    dataset={        "name": "rain_dataset",        "version": "v7",        "uri": "s3://research/rain-v7",        "checksum": "sha256:9c1f...e40b",    },    assets=[        {"name": "vehicle-model", "version": "v7"},        {"name": "forest-texture", "version": "v4"},    ],)
  • 06

    Lifecycle

    A generation moves from pending to running to completed or failed. Once it is running, the fields that define the run are fixed; a failure is recorded rather than discarded.

    sweep.py
    try:    frames = render_dataset(**parameters)except RenderError as error:    # A failed run keeps its provenance and stays in the history.    client.generations.fail(generation.id, reason=str(error))    raise client.generations.complete(generation.id, frame_count=len(frames))

Reliability

A sweep runs for hours. The client has to survive it.

  • Safe retries

    A dropped connection during a long sweep should not leave a half-written record.

  • Idempotency

    Repeating a create call does not produce a duplicate run.

  • Backend validation

    The API decides what a valid record is; the client does not get to disagree.

  • Typed models

    Generator, Reproducibility and reference types are typed rather than loose dictionaries.

  • Flexible metadata

    Domain-specific metadata rides alongside the fields the model defines.

  • Storage neutrality

    References describe where data lives without assuming a provider.

API architecture

  1. Your code

    generator, training script, notebook

  2. SynthGraph SDK

    typed models, retries, idempotency

  3. HTTPS / JSON

    authenticated request

  4. SynthGraph API

    server-side validation and authorization

  5. Provenance storage

    records, versions, relationships

Current status

Private pilot

The SDK is in early development and is being integrated against real research workflows during the pilot. It is not a released v1.0, the surface is still changing, and the snippets on this page describe the intended shape of the client rather than a frozen contract.

Private research pilot

Your next experiment should leave a trail.

SynthGraph is currently available through a limited research pilot. Request a demo to see how provenance fits into your existing workflow.

SynthGraph is being developed with a small number of research workflows before broader access.