{"name":"BondGraph Studio — Simulation API","version":"1","description":"Run a BondGraph (BGIF v1) model and return the time-series result as JSON. No auth, CORS open. Intended for AI agents and external tools.","endpoints":{"GET":{"url":"/api/public/simulate","query":{"bgif":"REQUIRED. URL-encoded JSON. Either the full {bgif,layout} wrapper saved by the editor, or a bare BGIF document {bgifVersion,components,systems}.","startTime":"optional number, default 0","endTime":"optional number, default from model.defaultSimulation or 10","stepSize":"optional number, default from model.defaultSimulation or 0.01","solver":"optional \"bdf1\" | \"bdf2\", default \"bdf2\"","tolerance":"optional number; >0 enables adaptive internal stepping","format":"optional \"full\" (default) | \"compact\" — compact drops zero-length variable arrays"},"note":"URLs are limited to ~8 KB on most clients. For larger models, use POST."},"POST":{"url":"/api/public/simulate","contentType":"application/json","body":{"bgif":"REQUIRED. BGIF document or {bgif,layout} wrapper, as a JSON object (not a string).","config":"optional partial SimulationConfig: { startTime?, endTime?, stepSize?, solver?, tolerance? }","format":"optional \"full\" | \"compact\""}}},"response":{"status":"\"completed\" | \"error\"","time":"number[] — sample times in seconds","variables":"Record<string, number[]> — one trace per state / port variable","error":"string, present when status is \"error\"","meta":"{ variableCount, sampleCount, durationMs }"},"example_curl":"curl -X POST https://xn--lda.se/api/public/simulate -H \"content-type: application/json\" -d '{\"bgif\":{...},\"config\":{\"endTime\":5,\"stepSize\":0.01}}'","documentation":"https://xn--lda.se/docs#api","openapi":"/api/public/openapi.json","swaggerUi":"/api-docs","mcp":{"url":"/api/mcp","transport":"streamable-http","tools":["simulate","validate_bgif","list_examples","get_example"]}}