{"openapi":"3.1.0","info":{"title":"Syvain Metrics API","version":"1.0.0","description":"Organization-scoped API for experiment registration, metric ingestion, folders, annotations, and metric inspection."},"servers":[{"url":"https://metrics.syvain.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Clerk organization API key for SDK/CLI management and query endpoints. Do not use organization API keys for public metric ingest calls."},"ingestionKeyAuth":{"type":"http","scheme":"bearer","description":"Per-experiment ingestion key. Required for POST /api/v1/experiments/{experimentId}/ingest."}},"schemas":{"Annotation":{"type":"object","properties":{"id":{"type":"string"},"experiment_id":{"type":"string"},"annotation":{"type":"string"},"metadata":{"type":"object"},"created_at_ms":{"type":"number"}},"required":["id","experiment_id","annotation","metadata","created_at_ms"],"additionalProperties":false},"AnnotationCreate":{"type":"object","properties":{"annotation":{"type":"string","allOf":[{"minLength":1},{"maxLength":16000}]},"metadata":{"type":"object","default":{}}},"required":["annotation"],"additionalProperties":false},"ErrorEnvelope":{"type":"object","properties":{"data":{"type":"null"},"error":{"type":"object","properties":{"message":{"type":"string"},"details":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["data","error"],"additionalProperties":false},"Experiment":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"folder":{"anyOf":[{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"metadata":{"type":"object"},"status":{"type":"string","enum":["created","running","done","error"]},"error_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at_ms":{"type":"number"},"updated_at_ms":{"type":"number"},"started_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"done_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_heartbeat_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_event_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","org_id","folder","url","slug","description","metadata","status","error_name","error_detail","created_at_ms","updated_at_ms","started_at_ms","done_at_ms","last_heartbeat_at_ms","last_event_at_ms"],"additionalProperties":false},"Folder":{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false},"IngestionKey":{"type":"object","properties":{"id":{"type":"string"},"experiment_id":{"type":"string"},"name":{"type":"string"},"created_at_ms":{"type":"number"},"expires_at_ms":{"type":"number"},"revoked_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_used_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","experiment_id","name","created_at_ms","expires_at_ms","revoked_at_ms","last_used_at_ms"],"additionalProperties":false},"Metadata":{"type":"object"},"MetricEvent":{"type":"object","properties":{"client_event_id":{"type":"string","allOf":[{"minLength":1},{"maxLength":200}]},"name":{"type":"string","description":"A nonempty printable ASCII metric name, at most 256 bytes raw and 512 bytes after canonical s-prefixed percent encoding.","allOf":[{"minLength":1}]},"value":{"type":"number"},"step":{"anyOf":[{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991},{"maximum":9007199254740990}]},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"timestamp_ms":{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]}},"required":["name","value","step"],"additionalProperties":false},"MetricSeriesColumnBatches":{"type":"array","items":{"type":"object","properties":{"experimentId":{"type":"string","allOf":[{"minLength":1}]},"metricName":{"type":"string","description":"A nonempty printable ASCII metric name, at most 256 bytes raw and 512 bytes after canonical s-prefixed percent encoding.","allOf":[{"minLength":1}]},"metadataHash":{"type":"string","allOf":[{"minLength":1}]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"data":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"number"}},"timestamp":{"type":"array","items":{"type":"number"}},"value":{"type":"array","items":{"type":"number"}}},"required":["steps","timestamp","value"],"additionalProperties":false}},"required":["experimentId","metricName","metadataHash","metadata","data"],"additionalProperties":false}},"MetricSeriesColumnBatch":{"type":"object","properties":{"experimentId":{"type":"string","allOf":[{"minLength":1}]},"metricName":{"type":"string","description":"A nonempty printable ASCII metric name, at most 256 bytes raw and 512 bytes after canonical s-prefixed percent encoding.","allOf":[{"minLength":1}]},"metadataHash":{"type":"string","allOf":[{"minLength":1}]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"data":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"number"}},"timestamp":{"type":"array","items":{"type":"number"}},"value":{"type":"array","items":{"type":"number"}}},"required":["steps","timestamp","value"],"additionalProperties":false}},"required":["experimentId","metricName","metadataHash","metadata","data"],"additionalProperties":false},"SeriesQueryRequest":{"type":"object","properties":{"series":{"type":"array","items":{"type":"object","properties":{"experimentId":{"type":"string","allOf":[{"minLength":1}]},"metricName":{"type":"string","description":"A nonempty printable ASCII metric name, at most 256 bytes raw and 512 bytes after canonical s-prefixed percent encoding.","allOf":[{"minLength":1}]},"metadataFilter":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","allOf":[{"minLength":1}]},"value":{"type":"string"}},"required":["key"],"additionalProperties":false},"allOf":[{"maxItems":32}]}},"required":["experimentId"],"additionalProperties":false},"allOf":[{"minItems":1},{"maxItems":64}]},"order":{"type":"object","properties":{"axis":{"type":"string","enum":["step","timestamp"]},"direction":{"type":"string","enum":["asc","desc"]}},"required":["axis","direction"],"additionalProperties":false},"stream":{"type":"boolean","default":false}},"required":["series","order"],"additionalProperties":false},"MetricsCatalogQuery":{"type":"object","properties":{"experimentIds":{"type":"array","items":{"type":"string","allOf":[{"minLength":1}]},"allOf":[{"minItems":1},{"maxItems":64}]}},"required":["experimentIds"],"additionalProperties":false},"MetricsCatalogQueryResult":{"type":"array","items":{"type":"object","properties":{"experimentId":{"type":"string","allOf":[{"minLength":1}]},"metricName":{"type":"string","allOf":[{"minLength":1}]},"metadataKeys":{"type":"array","items":{"type":"string"}}},"required":["experimentId","metricName","metadataKeys"],"additionalProperties":false}},"EffectSchema1_Objects_":{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false}}},"tags":[{"name":"Ingest"},{"name":"Query"},{"name":"Annotations"},{"name":"Experiments"},{"name":"Auth"}],"paths":{"/api/v1/auth/status":{"get":{"summary":"Read the authenticated organization.","responses":{"200":{"description":"Authenticated organization status.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"auth":{"type":"object","properties":{"kind":{"type":"string","enum":["api_key","session","ingestion_key"]}},"required":["kind"],"additionalProperties":false},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name"],"additionalProperties":false}},"required":["auth","organization"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Auth"]}},"/api/v1/folders":{"get":{"summary":"List folders.","parameters":[{"in":"query","name":"path","required":false,"schema":{"type":"string","allOf":[{"pattern":"^\\/"}]},"description":"Exact dashboard path such as /dendro-mamba."}],"responses":{"200":{"description":"Folder list.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"folders":{"type":"array","items":{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false}}},"required":["folders"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Experiments"]},"post":{"summary":"Create a folder.","responses":{"201":{"description":"Created folder.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"folder":{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false}},"required":["folder"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Experiments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1},{"maxLength":200}]},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/folders/{folderId}":{"get":{"summary":"Read a folder with direct child folders and experiments.","parameters":[{"in":"path","name":"folderId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}}],"responses":{"200":{"description":"Folder contents.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"folder":{"$ref":"#/components/schemas/EffectSchema1_Objects_"},"folders":{"type":"array","items":{"$ref":"#/components/schemas/EffectSchema1_Objects_"}},"experiments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"folder":{"anyOf":[{"$ref":"#/components/schemas/EffectSchema1_Objects_"},{"type":"null"}]},"url":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"metadata":{"type":"object"},"status":{"type":"string","enum":["created","running","done","error"]},"error_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at_ms":{"type":"number"},"updated_at_ms":{"type":"number"},"started_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"done_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_heartbeat_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_event_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","org_id","folder","url","slug","description","metadata","status","error_name","error_detail","created_at_ms","updated_at_ms","started_at_ms","done_at_ms","last_heartbeat_at_ms","last_event_at_ms"],"additionalProperties":false}}},"required":["folder","folders","experiments"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Experiments"]},"patch":{"summary":"Rename or move a folder.","parameters":[{"in":"path","name":"folderId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}}],"responses":{"200":{"description":"Updated folder.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"folder":{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false}},"required":["folder"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Experiments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1},{"maxLength":200}]},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"anyOf":[{"required":["name"]},{"required":["parent_id"]}]}}}}}},"/api/v1/query/series":{"post":{"summary":"Query lossless metric series column batches.","responses":{"200":{"description":"A buffered JSON envelope, or one lossless metric series column batch per NDJSON line when stream is true.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"experimentId":{"type":"string","allOf":[{"minLength":1}]},"metricName":{"type":"string","description":"A nonempty printable ASCII metric name, at most 256 bytes raw and 512 bytes after canonical s-prefixed percent encoding.","allOf":[{"minLength":1}]},"metadataHash":{"type":"string","allOf":[{"minLength":1}]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"data":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"number"}},"timestamp":{"type":"array","items":{"type":"number"}},"value":{"type":"array","items":{"type":"number"}}},"required":["steps","timestamp","value"],"additionalProperties":false}},"required":["experimentId","metricName","metadataHash","metadata","data"],"additionalProperties":false}},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}},"application/x-ndjson":{"schema":{"type":"object","properties":{"experimentId":{"type":"string","allOf":[{"minLength":1}]},"metricName":{"type":"string","description":"A nonempty printable ASCII metric name, at most 256 bytes raw and 512 bytes after canonical s-prefixed percent encoding.","allOf":[{"minLength":1}]},"metadataHash":{"type":"string","allOf":[{"minLength":1}]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"data":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"number"}},"timestamp":{"type":"array","items":{"type":"number"}},"value":{"type":"array","items":{"type":"number"}}},"required":["steps","timestamp","value"],"additionalProperties":false}},"required":["experimentId","metricName","metadataHash","metadata","data"],"additionalProperties":false}}}}},"description":"Returns every matching metric point grouped by experiment, metric name, and complete metadata object. Each selection may include metricName to restrict that experiment to one metric; omitting it selects all metrics. Multiple selections are unioned. Set stream to true to receive application/x-ndjson with one MetricSeriesColumnBatch object per line as backend batches arrive.","tags":["Query"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"series":{"type":"array","items":{"type":"object","properties":{"experimentId":{"type":"string","allOf":[{"minLength":1}]},"metricName":{"type":"string","description":"A nonempty printable ASCII metric name, at most 256 bytes raw and 512 bytes after canonical s-prefixed percent encoding.","allOf":[{"minLength":1}]},"metadataFilter":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","allOf":[{"minLength":1}]},"value":{"type":"string"}},"required":["key"],"additionalProperties":false},"allOf":[{"maxItems":32}]}},"required":["experimentId"],"additionalProperties":false},"allOf":[{"minItems":1},{"maxItems":64}]},"order":{"type":"object","properties":{"axis":{"type":"string","enum":["step","timestamp"]},"direction":{"type":"string","enum":["asc","desc"]}},"required":["axis","direction"],"additionalProperties":false},"stream":{"type":"boolean","default":false}},"required":["series","order"],"additionalProperties":false}}}}}},"/api/v1/query/metric-catalog":{"post":{"summary":"Query metric names and metadata keys for multiple experiments.","responses":{"200":{"description":"Multi-experiment metric catalog.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"experimentId":{"type":"string","allOf":[{"minLength":1}]},"metricName":{"type":"string","allOf":[{"minLength":1}]},"metadataKeys":{"type":"array","items":{"type":"string"}}},"required":["experimentId","metricName","metadataKeys"],"additionalProperties":false}},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"description":"Returns distinct authorized experiment and metric name combinations with their observed metadata keys.","tags":["Query"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"experimentIds":{"type":"array","items":{"type":"string","allOf":[{"minLength":1}]},"allOf":[{"minItems":1},{"maxItems":64}]}},"required":["experimentIds"],"additionalProperties":false}}}}}},"/api/v1/experiments":{"get":{"summary":"List experiments.","parameters":[{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["created","running","done","error"]}},{"in":"query","name":"slug","required":false,"schema":{"type":"string"}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"from","required":false,"schema":{"anyOf":[{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]},{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]}]}},{"in":"query","name":"to","required":false,"schema":{"anyOf":[{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]},{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":100000}]},{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":100000}]}],"default":200}}],"responses":{"200":{"description":"Experiment list.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"experiments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"folder":{"anyOf":[{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"metadata":{"type":"object"},"status":{"type":"string","enum":["created","running","done","error"]},"error_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at_ms":{"type":"number"},"updated_at_ms":{"type":"number"},"started_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"done_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_heartbeat_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_event_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","org_id","folder","url","slug","description","metadata","status","error_name","error_detail","created_at_ms","updated_at_ms","started_at_ms","done_at_ms","last_heartbeat_at_ms","last_event_at_ms"],"additionalProperties":false}}},"required":["experiments"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Experiments"]},"post":{"summary":"Create or upsert an experiment by slug.","responses":{"201":{"description":"Experiment.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"experiment":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"folder":{"anyOf":[{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"metadata":{"type":"object"},"status":{"type":"string","enum":["created","running","done","error"]},"error_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at_ms":{"type":"number"},"updated_at_ms":{"type":"number"},"started_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"done_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_heartbeat_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_event_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","org_id","folder","url","slug","description","metadata","status","error_name","error_detail","created_at_ms","updated_at_ms","started_at_ms","done_at_ms","last_heartbeat_at_ms","last_event_at_ms"],"additionalProperties":false}},"required":["experiment"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Experiments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","allOf":[{"minLength":1},{"maxLength":200}]},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string","allOf":[{"maxLength":4000,"default":""}]},"metadata":{"type":"object","default":{}}},"required":["slug"],"additionalProperties":false}}}}}},"/api/v1/experiments/{experimentId}":{"get":{"summary":"Read one experiment.","parameters":[{"in":"path","name":"experimentId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}}],"responses":{"200":{"description":"Experiment.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"experiment":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"folder":{"anyOf":[{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"metadata":{"type":"object"},"status":{"type":"string","enum":["created","running","done","error"]},"error_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at_ms":{"type":"number"},"updated_at_ms":{"type":"number"},"started_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"done_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_heartbeat_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_event_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","org_id","folder","url","slug","description","metadata","status","error_name","error_detail","created_at_ms","updated_at_ms","started_at_ms","done_at_ms","last_heartbeat_at_ms","last_event_at_ms"],"additionalProperties":false}},"required":["experiment"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Experiments"]},"post":{"summary":"Update experiment lifecycle status.","parameters":[{"in":"path","name":"experimentId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}}],"responses":{"200":{"description":"Updated experiment.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"experiment":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"folder":{"anyOf":[{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"metadata":{"type":"object"},"status":{"type":"string","enum":["created","running","done","error"]},"error_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at_ms":{"type":"number"},"updated_at_ms":{"type":"number"},"started_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"done_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_heartbeat_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_event_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","org_id","folder","url","slug","description","metadata","status","error_name","error_detail","created_at_ms","updated_at_ms","started_at_ms","done_at_ms","last_heartbeat_at_ms","last_event_at_ms"],"additionalProperties":false}},"required":["experiment"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Experiments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["running","done","error"]},"error":{"type":"object","properties":{"name":{"type":"string","allOf":[{"maxLength":500,"default":"Error"}]},"detail":{"type":"string","allOf":[{"maxLength":8000,"default":""}]}},"additionalProperties":false},"timestamp_ms":{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]}},"required":["status"],"additionalProperties":false}}}}},"patch":{"summary":"Move experiment to a folder.","parameters":[{"in":"path","name":"experimentId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}}],"responses":{"200":{"description":"Moved experiment.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"experiment":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"folder":{"anyOf":[{"type":"object","properties":{"folder_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"parent_id_path":{"type":"array","items":{"type":"string"}},"path_name":{"type":"string","allOf":[{"pattern":"^\\/"}]}},"required":["folder_id","org_id","name","parent_id_path","path_name"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"metadata":{"type":"object"},"status":{"type":"string","enum":["created","running","done","error"]},"error_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at_ms":{"type":"number"},"updated_at_ms":{"type":"number"},"started_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"done_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_heartbeat_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_event_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","org_id","folder","url","slug","description","metadata","status","error_name","error_detail","created_at_ms","updated_at_ms","started_at_ms","done_at_ms","last_heartbeat_at_ms","last_event_at_ms"],"additionalProperties":false}},"required":["experiment"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Experiments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["folder_id"],"additionalProperties":false}}}}}},"/api/v1/experiments/{experimentId}/ingest":{"post":{"summary":"Ingest metric events for an experiment.","parameters":[{"in":"path","name":"experimentId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}}],"responses":{"202":{"description":"Queued ingest.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"mode":{"type":"string","enum":["queued"]}},"required":["ok","mode"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"description":"MUST authenticate with a per-experiment ingestion key in the Authorization bearer token. The Python SDK mints these ingestion keys automatically.","tags":["Ingest"],"security":[{"ingestionKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"client_event_id":{"type":"string","allOf":[{"minLength":1},{"maxLength":200}]},"name":{"type":"string","description":"A nonempty printable ASCII metric name, at most 256 bytes raw and 512 bytes after canonical s-prefixed percent encoding.","allOf":[{"minLength":1}]},"value":{"type":"number"},"step":{"anyOf":[{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991},{"maximum":9007199254740990}]},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"timestamp_ms":{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]}},"required":["name","value","step"],"additionalProperties":false},"allOf":[{"maxItems":1000}]}},"required":["data"],"additionalProperties":false}}}}}},"/api/v1/experiments/{experimentId}/ingestion-keys":{"get":{"summary":"List ingestion keys for an experiment.","parameters":[{"in":"path","name":"experimentId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}}],"responses":{"200":{"description":"Ingestion keys.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"experiment_id":{"type":"string"},"name":{"type":"string"},"created_at_ms":{"type":"number"},"expires_at_ms":{"type":"number"},"revoked_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_used_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","experiment_id","name","created_at_ms","expires_at_ms","revoked_at_ms","last_used_at_ms"],"additionalProperties":false}}},"required":["keys"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Ingest"]},"post":{"summary":"Create an ingestion key for an experiment.","parameters":[{"in":"path","name":"experimentId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}}],"responses":{"201":{"description":"Created ingestion key and one-time token.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string"},"experiment_id":{"type":"string"},"name":{"type":"string"},"created_at_ms":{"type":"number"},"expires_at_ms":{"type":"number"},"revoked_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_used_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","experiment_id","name","created_at_ms","expires_at_ms","revoked_at_ms","last_used_at_ms"],"additionalProperties":false},"token":{"type":"string"}},"required":["key","token"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Ingest"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1},{"maxLength":200,"default":"SDK ingestion key"}]},"ttl_ms":{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":604800000}]}},"additionalProperties":false}}}}}},"/api/v1/experiments/{experimentId}/ingestion-keys/{keyId}":{"delete":{"summary":"Revoke an ingestion key.","parameters":[{"in":"path","name":"experimentId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}},{"in":"path","name":"keyId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}}],"responses":{"200":{"description":"Revoked ingestion key.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string"},"experiment_id":{"type":"string"},"name":{"type":"string"},"created_at_ms":{"type":"number"},"expires_at_ms":{"type":"number"},"revoked_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_used_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","experiment_id","name","created_at_ms","expires_at_ms","revoked_at_ms","last_used_at_ms"],"additionalProperties":false}},"required":["key"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Ingest"]}},"/api/v1/experiments/{experimentId}/annotations":{"get":{"summary":"List annotations.","parameters":[{"in":"path","name":"experimentId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}},{"in":"query","name":"from","required":false,"schema":{"anyOf":[{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]},{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]}]}},{"in":"query","name":"to","required":false,"schema":{"anyOf":[{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]},{"type":"integer","allOf":[{"minimum":0},{"maximum":9007199254740991}]}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":100000}]},{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":100000}]}],"default":10000}}],"responses":{"200":{"description":"Annotations.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"annotations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"experiment_id":{"type":"string"},"annotation":{"type":"string"},"metadata":{"type":"object"},"created_at_ms":{"type":"number"}},"required":["id","experiment_id","annotation","metadata","created_at_ms"],"additionalProperties":false}}},"required":["annotations"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Annotations"]},"post":{"summary":"Create an annotation.","parameters":[{"in":"path","name":"experimentId","required":true,"schema":{"type":"string","allOf":[{"minLength":1}]}}],"responses":{"200":{"description":"Created annotation.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"annotation":{"type":"object","properties":{"id":{"type":"string"},"experiment_id":{"type":"string"},"annotation":{"type":"string"},"metadata":{"type":"object"},"created_at_ms":{"type":"number"}},"required":["id","experiment_id","annotation","metadata","created_at_ms"],"additionalProperties":false}},"required":["annotation"],"additionalProperties":false},"error":{"type":"null"}},"required":["data","error"],"additionalProperties":false}}}}},"tags":["Annotations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"annotation":{"type":"string","allOf":[{"minLength":1},{"maxLength":16000}]},"metadata":{"type":"object","default":{}}},"required":["annotation"],"additionalProperties":false}}}}}}}}