ModelWorks logoModelWorks

Code

View and interact with your circuit's JSON definition

Code

The Code tab lets you explore and work directly with your circuit's definitions. The code page is split into two sub-tabs:

  • Query Schema — the input/output contract for the circuit version.
  • Circuit Source — the full circuit.json definition for the version.

Query Schema Tab

The Query Schema tab displays the generated input/output schema for the selected circuit version. This is the contract your API consumers program against:

  • Input schema: The key/value fields the circuit accepts when queried, including their types and whether they are required.
  • Output schema: The fields the circuit produces on a successful run, including their types and any default values.

Use this tab to verify the public-facing contract of a version without reading the full JSON definition. Switch versions via the version dropdown to compare how the schema evolved across releases.

Circuit Source Tab

The Circuit Source tab shows the entire circuit.json for the selected version. You can:

  • Switch versions via the version dropdown — view or compare any published version’s code instantly.
  • Read-only editor shows the entire circuit.json for the selected version with syntax highlighting.
  • File stats display the total lines and bytes of the JSON blob, so you can gauge size and complexity at a glance.
  • Copy the full JSON to your clipboard with a single click, making it easy to paste into your own projects or sharing tools.
  • Download the JSON file for offline editing, backup, or CI/CD integration.

Permissions: Public circuits expose their JSON to everyone. For protected or private circuits, you must have read access (as the owner or a granted collaborator).


How it works

  1. Version selector: At the top, choose any version identifier. Both the Query Schema and Circuit Source tabs update immediately to reflect that version.
  2. Stats & actions: Under the header bar, see how many lines and bytes the JSON contains. Use Copy to grab the entire definition or Download to save it as a .json file.
  3. Editor viewport: Scroll through or search within the code. Everything is read-only to prevent accidental edits in the UI — modifications happen by creating and uploading a new version.

With the Code tab, you always have full transparency into your circuit’s logic, parameters, and steps — ensuring traceability and easy collaboration across your team.

On this page

On this page