A program synthesis + evaluation API for Principio expressions. Compose programs from IO, translate to readable forms, evaluate and decompose programs, and bootstrap domain primitives.
Generate Principio programs from input/output samples with the unification service.
Execute Principio programs and infer argument/output types.
Render programs as math or natural language with constant substitution.
Linearize and trace program execution into interpretable fragments.
Register primitives and constants for domain-specific evaluation.
Parse programs into fragments/constants or run browser synthesis tasks.
Explore full schemas and try requests live.
Base URL: https://principio.byte-genie.com
No request body.
{
"samples": [
{ "inputs": [1, 2], "output": 3 },
{ "inputs": [5, 7], "output": 12 }
],
"timeout_seconds": 5,
"max_workers": 2,
"use_pattern_seeds": true
}
{
"primitive_names": ["add", "mul", "inc"],
"tasks": [
{
"name": "add_example",
"samples": [{ "inputs": [2, 3], "output": 5 }]
}
],
"enumeration_timeout": 3,
"cpus": 1
}
{
"program": "(lambda (x y) (+ x y))",
"inputs": [4, 6]
}
{
"program": "(lambda (x) (* x x))",
"inputs_list": [[2], [3], [4]]
}
{}
{}
{}
{}
{}
{}
{}
{
"program": "(lambda (x) (+ x 10))",
"modes": ["math", "natural_language"],
"constants": { "ten": 10 }
}
{
"program": "(lambda (x y) (+ (* x x) y))",
"inputs": [3, 4],
"max_fragments": 5
}
{
"domains": ["arithmetic", "list"],
"constants": [
{ "name": "tax_rate", "value": 0.07, "type": "treal" }
],
"primitives": [
{ "name": "two", "value": 2, "type": "tint" }
]
}
{
"program": "(lambda (x) (inc (inc x)))",
"bootstrap": "nlp"
}
{
"program": "(lambda (x) (+ x discount_rate))",
"bootstrap": "customer_rewards"
}
{
"session_id": "session-123",
"client_id": "frontend-1",
"timeout_s": 30,
"use_mock": true
}
{
"session_id": "session-123",
"client_id": "frontend-1",
"timeout_s": 30,
"queries": ["principio api", "program synthesis"]
}
{
"session_id": "session-123",
"client_id": "frontend-1",
"timeout_s": 30
}
{
"event": "connected",
"role": "frontend",
"session_id": "session-123",
"client_id": "frontend-1"
}