{"openapi":"3.1.0","info":{"title":"Jevreduce API","description":"Start your saved workflows from your own code, hear when they finish, and get the results.\n\nSign in with an API key, sent as a bearer token. The guides are at https://docs.jevreduce.com.","version":"1.0.0"},"servers":[{"url":"https://api.jevreduce.com"}],"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/models":{"get":{"tags":["Models and estimates"],"summary":"List models","description":"The models this server offers, with their limits and prices, and whether each is set up.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"models_v1_models_get","responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"},"example":{"models":[{"id":"jev","name":"Jev 1.14","provider":"typesafe","wire_model":"jev-1.14.0","endpoint":"https://api.typesafe.ai","max_options":255,"max_questions":128,"max_state_tokens":32000,"max_total_tokens":64000,"max_question_tokens":null,"bytes_per_token":4.0,"request_overhead_tokens":180,"request_headroom":0.75,"option_bytes_per_token":5.8,"option_tokens":10.0,"member_bytes_per_token":4.7,"member_tokens":44.0,"confidence_origin":"provider_reported","probability_origin":"provider_native","requests_per_minute":1200,"tokens_per_second":250000,"quota_scope":"typesafe-account","probability_decimal_places":2,"price_usd_per_million_tokens":0.042,"max_input_tokens":32000,"configured":true,"fixture":false,"endpoint_identity_pinned":false,"weights_version_pinned":false}]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["read"]}]}},"/v1/compile":{"post":{"tags":["Models and estimates"],"summary":"Check a definition","description":"Check a definition without running it: the order its steps run in, and warnings about it. A definition\nthat can't run is refused (422), saying why.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"compile_plan_v1_compile_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Definition"},"examples":{"review triage":{"summary":"One step","value":{"name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","input":"source:reviews","model":"jev","questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint?"}}}]}}}}},"required":true},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompileResult"},"example":{"compiler_version":"0.1.0","definition":{"schema_version":"jevreduce.local.v1","name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","input":"source:reviews","kind":"evaluate","model":"jev","state_path":[],"questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint?","criteria":null}}}]},"order":["complaints"],"features":{"packing":true,"sort":true},"warnings":[]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["read"]}]}},"/v1/estimate":{"post":{"tags":["Models and estimates"],"summary":"Estimate a run","description":"Estimate each step's rows, requests, time and cost before a run.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"estimate_v1_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateRequest"},"examples":{"full":{"summary":"Every row","value":{"definition":{"name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","input":"source:reviews","model":"jev","questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint?"}}}]}}}}}},"required":true},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Estimate"},"example":{"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","rows_in":1200,"rows_out":1200,"answers":1200,"requests":1200,"tokens":264000,"seconds":211.2,"cost_usd":0.0111,"sliced_groups":0}],"total":{"requests":1200,"tokens":264000,"seconds":211.2,"cost_usd":0.0111,"highest_request_usd":0.002688},"exact":false,"notes":["Sizes are estimated from the file. Real runs report exact token counts."]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["read"]}]}},"/v1/datasets":{"get":{"tags":["Files and datasets"],"summary":"List datasets","description":"The workspace's newest 1,000 datasets, oldest first: in the order they were first uploaded.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"datasets_v1_datasets_get","responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetList"},"example":{"items":[{"id":"ds_4b1e9c07a2d84f6e9b30","name":"Customer reviews","context":"","filename":"reviews.csv","snapshots":["snap_91c2d7e04a6b4f18a3e5"],"latest_snapshot":"snap_91c2d7e04a6b4f18a3e5","record_count":1200,"version":1,"allowed_for_training":false}]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["read"]}]}},"/v1/datasets/{ident}":{"get":{"tags":["Files and datasets"],"summary":"Get a dataset","description":"A dataset: its name, its file's versions, and its newest version as `latest_snapshot`.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"dataset_v1_datasets__ident__get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Dataset ID","description":"The dataset's ID, such as `ds_4b1e9c07a2d84f6e9b30`."},"description":"The dataset's ID, such as `ds_4b1e9c07a2d84f6e9b30`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"},"example":{"id":"ds_4b1e9c07a2d84f6e9b30","name":"Customer reviews","context":"","filename":"reviews.csv","snapshots":["snap_91c2d7e04a6b4f18a3e5"],"latest_snapshot":"snap_91c2d7e04a6b4f18a3e5","record_count":1200,"version":1,"allowed_for_training":false}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"patch":{"tags":["Files and datasets"],"summary":"Update a dataset","description":"Change a dataset's context or whether its answers may train another model. Its files' versions stay\nas they are.\n\nAPI keys need the `write` permission: Full access.","operationId":"update_dataset_v1_datasets__ident__patch","security":[{"bearer":["write"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Dataset ID","description":"The dataset's ID, such as `ds_4b1e9c07a2d84f6e9b30`."},"description":"The dataset's ID, such as `ds_4b1e9c07a2d84f6e9b30`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUpdate"},"examples":{"context":{"summary":"Say what the file is","value":{"context":"Reviews from the online shop, one per row."}},"training":{"summary":"Let its answers train another model","value":{"allowed_for_training":true}}}}}},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"},"example":{"id":"ds_4b1e9c07a2d84f6e9b30","name":"Customer reviews","context":"Reviews from the online shop, one per row.","filename":"reviews.csv","snapshots":["snap_91c2d7e04a6b4f18a3e5"],"latest_snapshot":"snap_91c2d7e04a6b4f18a3e5","record_count":1200,"version":1,"allowed_for_training":false}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/uploads":{"post":{"tags":["Files and datasets"],"summary":"Upload a file","description":"Upload a file in one request, and read its rows. It becomes a new dataset, or with `dataset_id` the\nnewest version of that dataset. The reply is the dataset.\n\nAPI keys need the `run` permission: Run workflows or Full access.","operationId":"upload_v1_uploads_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_v1_uploads_post"}}},"required":true},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"},"example":{"id":"ds_4b1e9c07a2d84f6e9b30","name":"Customer reviews","context":"","filename":"reviews.csv","snapshots":["snap_91c2d7e04a6b4f18a3e5"],"latest_snapshot":"snap_91c2d7e04a6b4f18a3e5","record_count":1200,"version":1,"allowed_for_training":false}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["run"]}]}},"/v1/uploads/start":{"post":{"tags":["Files and datasets"],"summary":"Start a direct upload","description":"Start a direct upload, whose bytes go straight to storage: describe the file, send its bytes to `url`\nwith `method` and `headers`, then finish it with `POST /v1/uploads/{upload_id}/complete`. A server with\ndirect uploads switched off answers 501.\n\nAPI keys need the `run` permission: Run workflows or Full access.","operationId":"start_upload_v1_uploads_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadStart"},"examples":{"csv":{"summary":"A big CSV file","value":{"filename":"reviews.csv","size":48213677,"content_type":"text/csv","name":"Customer reviews","context":""}}}}},"required":true},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadTicket"},"example":{"upload_id":"upl_6a2e8c4f0b1d39e75c80","method":"PUT","url":"https://jevreduce-uploads.s3.amazonaws.com/uploads/upl_6a2e8c4f0b1d39e75c80?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&…","headers":{"Content-Type":"text/csv","If-None-Match":"*"},"expires_at":1790648104.2}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"501":{"description":"Not available yet: this feature is switched off on this server.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["run"]}]}},"/v1/uploads/bytes":{"put":{"summary":"Receive Upload","description":"Take a direct upload's bytes on the local profile, where this API stands in for object storage.\n\nLike a presigned S3 URL, the signed grant the upload's ticket gives, sent as a header, is what allows the\nPUT, so it needs no sign-in. Writing to disk happens in threads, so other requests carry on meanwhile.","operationId":"receive_upload_v1_uploads_bytes_put","parameters":[{"name":"X-Upload-Grant","in":"header","required":true,"schema":{"type":"string","title":"X-Upload-Grant"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/uploads/{upload_id}/complete":{"post":{"tags":["Files and datasets"],"summary":"Finish a direct upload","description":"Say the file's bytes are sent, so its rows are read. Ask `GET /v1/uploads/{upload_id}` until it's\nready.\n\nAPI keys need the `run` permission: Run workflows or Full access.","operationId":"complete_upload_v1_uploads__upload_id__complete_post","security":[{"bearer":["run"]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload ID","description":"The direct upload's `upload_id`, from `POST /v1/uploads/start`."},"description":"The direct upload's `upload_id`, from `POST /v1/uploads/start`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadCompleted"},"example":{"upload_id":"upl_6a2e8c4f0b1d39e75c80","status":"ingesting"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"A conflict, such as an Idempotency-Key sent again with a different request, or a stale save.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/uploads/{upload_id}":{"get":{"tags":["Files and datasets"],"summary":"Get a direct upload's progress","description":"How far a direct upload has got: the rows read so far, and its dataset once it's ready.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"upload_progress_v1_uploads__upload_id__get","security":[{"bearer":["read"]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload ID","description":"The direct upload's `upload_id`, from `POST /v1/uploads/start`."},"description":"The direct upload's `upload_id`, from `POST /v1/uploads/start`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadProgress"},"example":{"upload_id":"upl_6a2e8c4f0b1d39e75c80","status":"ready","records":1200,"dataset":{"id":"ds_4b1e9c07a2d84f6e9b30","name":"Customer reviews","context":"","filename":"reviews.csv","snapshots":["snap_91c2d7e04a6b4f18a3e5"],"latest_snapshot":"snap_91c2d7e04a6b4f18a3e5","record_count":1200,"version":1,"allowed_for_training":false},"error":null}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/snapshots/{ident}":{"get":{"tags":["Files and datasets"],"summary":"Get a file version","description":"One version of a dataset's file: its facts, such as its columns and row count, and its first 20 rows\nas `sample`.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"snapshot_v1_snapshots__ident__get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Snapshot ID","description":"One version of a dataset's file, such as `snap_91c2d7e04a6b4f18a3e5`: a dataset's `latest_snapshot` or one of its `snapshots`."},"description":"One version of a dataset's file, such as `snap_91c2d7e04a6b4f18a3e5`: a dataset's `latest_snapshot` or one of its `snapshots`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"},"example":{"id":"snap_91c2d7e04a6b4f18a3e5","dataset_id":"ds_4b1e9c07a2d84f6e9b30","version":1,"name":"Customer reviews","filename":"reviews.csv","context":"","record_count":1200,"schema":{"fields":[{"path":["id"],"types":["string"]},{"path":["text"],"types":["string"]}],"complete":true},"raw_artifact":"orgs/5d1f8b3e9a2c47e6b0d4f1a8c3e5b7d9f2a4c6e8b0d1f3a5c7e9b2d4f6a8c0e1/2151255715eaf59882b3f24f65a0bb8476e69716ebcbb8fddaccfa92c3f121fb","records_artifact":"orgs/5d1f8b3e9a2c47e6b0d4f1a8c3e5b7d9f2a4c6e8b0d1f3a5c7e9b2d4f6a8c0e1/90a549cd0000cab31266862f83ae5b1ac58c20dc0c82f744f3f564ce53d2d265","adapter":"upload-v2","status":"published","field_sizes":{"format":"jevreduce.field_sizes.v1","average_bytes":{"[]":71.4,"[\"id\"]":8.0,"[\"text\"]":45.2}},"group_counts":{"[\"id\"]":{"format":"jevreduce.group_count.v2","groups":1200,"largest_key":"r-1001","largest_members":1,"unusable":0,"sizes":[[1,1200]]}},"notes":[],"sample":[{"location":{"filename":"reviews.csv","record":1},"payload":{"id":"r-1001","text":"Arrived broken, and support never replied."},"record_id":"r000001"},{"location":{"filename":"reviews.csv","record":2},"payload":{"id":"r-1002","text":"Great value, would buy again."},"record_id":"r000002"}]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/library/{kind}":{"get":{"tags":["Library"],"summary":"List Library entries","description":"The newest 1,000 saved questions, queries or workflows, oldest first: in the order they were first\nsaved.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"library_v1_library__kind__get","security":[{"bearer":["read"]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind","description":"What's saved: `questions`, `queries` or `workflows`."},"description":"What's saved: `questions`, `queries` or `workflows`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryEntryList"},"example":{"items":[{"id":"workflow_7c3a0e5d91f24b8c6d10","name":"Review triage","document":{"name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","input":"source:reviews","model":"jev","questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint?"}}}]},"version":4,"meta":{"goal":"Find the complaints in our reviews","datasets":["ds_4b1e9c07a2d84f6e9b30"],"created_from":"planner"}}]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"post":{"tags":["Library"],"summary":"Save a Library entry","description":"Save a new question, query or workflow. A workflow's `document` is a definition, checked as a run's\nwould be, except that it can have no steps yet.\n\nAPI keys need the `write` permission: Full access.","operationId":"create_library_v1_library__kind__post","security":[{"bearer":["write"]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind","description":"What's saved: `questions`, `queries` or `workflows`."},"description":"What's saved: `questions`, `queries` or `workflows`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryWrite"},"examples":{"workflow":{"summary":"A workflow","value":{"name":"Review triage","document":{"name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","input":"source:reviews","model":"jev","questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint?"}}}]},"expected_version":0}},"question":{"summary":"A question","value":{"name":"Complaint","document":{"type":"noul","instructions":"Is this review a complaint?"},"expected_version":0}}}}}},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryEntry"},"example":{"id":"workflow_7c3a0e5d91f24b8c6d10","name":"Review triage","document":{"name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","input":"source:reviews","model":"jev","questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint?"}}}]},"version":4,"meta":{"goal":"Find the complaints in our reviews","datasets":["ds_4b1e9c07a2d84f6e9b30"],"created_from":"planner"}}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"A conflict, such as an Idempotency-Key sent again with a different request, or a stale save.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/library/{kind}/{ident}":{"get":{"tags":["Library"],"summary":"Get a Library entry","description":"A saved question, query or workflow, at its newest version.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"library_entry_v1_library__kind___ident__get","security":[{"bearer":["read"]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind","description":"What's saved: `questions`, `queries` or `workflows`."},"description":"What's saved: `questions`, `queries` or `workflows`."},{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Entry ID","description":"The Library entry's ID."},"description":"The Library entry's ID."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryEntry"},"example":{"id":"workflow_7c3a0e5d91f24b8c6d10","name":"Review triage","document":{"name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","input":"source:reviews","model":"jev","questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint?"}}}]},"version":4,"meta":{"goal":"Find the complaints in our reviews","datasets":["ds_4b1e9c07a2d84f6e9b30"],"created_from":"planner"}}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"put":{"tags":["Library"],"summary":"Update a Library entry","description":"Save a new version of a question, query or workflow. `expected_version` must be the version you read,\nor the save is refused (409), so two people's saves don't overwrite each other.\n\nAPI keys need the `write` permission: Full access.","operationId":"update_library_v1_library__kind___ident__put","security":[{"bearer":["write"]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind","description":"What's saved: `questions`, `queries` or `workflows`."},"description":"What's saved: `questions`, `queries` or `workflows`."},{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Entry ID","description":"The Library entry's ID."},"description":"The Library entry's ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryWrite"},"examples":{"workflow":{"summary":"A new version of a workflow","value":{"name":"Review triage","document":{"name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","input":"source:reviews","model":"jev","questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint about a product?"}}}]},"expected_version":4}}}}}},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryEntry"},"example":{"id":"workflow_7c3a0e5d91f24b8c6d10","name":"Review triage","document":{"name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","input":"source:reviews","model":"jev","questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint about a product?"}}}]},"version":5,"meta":{"goal":"Find the complaints in our reviews","datasets":["ds_4b1e9c07a2d84f6e9b30"],"created_from":"planner"}}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"A conflict, such as an Idempotency-Key sent again with a different request, or a stale save.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/library/workflows/{ident}/conversation":{"get":{"tags":["Library"],"summary":"Get a workflow's planner conversation","description":"What the person and the Workflow Planner said about a saved workflow: the newest 200 lines, oldest\nfirst, each numbered by `seq` in the order it was added.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"conversation_v1_library_workflows__ident__conversation_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Workflow ID","description":"The saved workflow's ID, such as `workflow_7c3a0e5d91f24b8c6d10`."},"description":"The saved workflow's ID, such as `workflow_7c3a0e5d91f24b8c6d10`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"},"example":{"items":[{"seq":0,"from":"you","text":"Find the complaints in our reviews","model":null,"changes":[],"created":1791484800.1,"created_at":"2026-10-08T18:40:00Z"},{"seq":1,"from":"planner","text":"I drafted a workflow with one step that asks whether each review is a complaint.","model":"anthropic/claude-sonnet-5.5","changes":["Added a question: Is this review a complaint?"],"created":1791484812.3,"created_at":"2026-10-08T18:40:12Z"}]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"post":{"tags":["Library"],"summary":"Add to a workflow's planner conversation","description":"Add 1 to 20 lines to the end of a saved workflow's conversation with the Workflow Planner, in the order\nthey're listed. The reply is the lines as kept, each with its `seq` and when it was kept.\n\nAPI keys need the `write` permission: Full access.","operationId":"add_to_conversation_v1_library_workflows__ident__conversation_post","security":[{"bearer":["write"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Workflow ID","description":"The saved workflow's ID, such as `workflow_7c3a0e5d91f24b8c6d10`."},"description":"The saved workflow's ID, such as `workflow_7c3a0e5d91f24b8c6d10`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationWrite"},"examples":{"turn":{"summary":"A request and the planner's reply","value":{"messages":[{"from":"you","text":"Only complaints about a product, not about delivery"},{"from":"planner","text":"I changed the question so it asks about products only.","model":"anthropic/claude-sonnet-5.5","changes":["Changed a question: Is this review a complaint about a product?"]}]}}}}}},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"},"example":{"items":[{"seq":2,"from":"you","text":"Only complaints about a product, not about delivery","model":null,"changes":[],"created":1791485020.6,"created_at":"2026-10-08T18:43:40Z"},{"seq":3,"from":"planner","text":"I changed the question so it asks about products only.","model":"anthropic/claude-sonnet-5.5","changes":["Changed a question: Is this review a complaint about a product?"],"created":1791485020.6,"created_at":"2026-10-08T18:43:40Z"}]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs":{"post":{"tags":["Runs"],"summary":"Start a run from a definition","description":"Start a run of the definition in the request, rather than of a saved workflow. It replies at once with\nthe run, queued. [Workflow definitions](https://docs.jevreduce.com/definitions) says what a definition\nholds.\n\nAPI keys need the `write` permission: Full access.","operationId":"start_v1_runs_post","security":[{"bearer":["write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A value you choose, such as `nightly-2026-09-29`, that makes a retry safe: the same key and request again returns the run the first one started, and the same key with a different request is refused (409). Required for API keys.","title":"Idempotency-Key"},"description":"A value you choose, such as `nightly-2026-09-29`, that makes a retry safe: the same key and request again returns the run the first one started, and the same key with a different request is refused (409). Required for API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartRun"},"examples":{"definition":{"summary":"One step","value":{"definition":{"name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","input":"source:reviews","model":"jev","questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint?"}}}]},"max_requests":1500}}}}}},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"example":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_5f1c3a7e9b2d4f6a8c0e2b4d6f8a1c3e","status":"queued","body":{},"dispatched":false,"trace_id":"trace_5c1e9a7f3b2d4e6a8c0f","trace_parent_id":"event_0d4b8f2a6c1e3957b7a2","trace_started_at":"2026-09-29T02:00:04.195000+00:00","requests":0,"created":1790647204.2,"rows":{"read":0,"succeeded":0,"failed":0,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_5f1c3a7e9b2d4f6a8c0e2b4d6f8a1c3e","results_csv":"https://api.jevreduce.com/v1/runs/run_5f1c3a7e9b2d4f6a8c0e2b4d6f8a1c3e/export?format=csv","app":"https://app.jevreduce.com/runs/run_5f1c3a7e9b2d4f6a8c0e2b4d6f8a1c3e"},"deliveries":[],"trial":false,"sample":null,"workflow_id":null,"labels":null,"workflow_version":null,"started_by":{"kind":"api_key","id":"key_6d0e3b8f2a1c4e7d9b5f","name":"Data team"},"created_at":"2026-09-29T02:00:04Z","finished_at":null,"max_requests":1500,"cost_usd":0.0,"reserved_usd":0.0,"error":null}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"402":{"description":"Not enough credits: the run can cost more than the organization has available, as `needed_usd` and `available_usd` say.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"A conflict, such as an Idempotency-Key sent again with a different request, or a stale save.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many runs started by API keys are going at once. Wait `Retry-After` seconds, then send the same request again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"get":{"tags":["Runs"],"summary":"List runs","description":"The newest runs, newest first, 100 to a page, without their `rows` or `deliveries`. A page with more to\ncome has `next_cursor`: send it back as `cursor` for the next page, with the same filters.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"list_runs_v1_runs_get","security":[{"bearer":["read"]}],"parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this saved workflow's runs.","title":"Workflow Id"},"description":"Only this saved workflow's runs."},{"name":"trial","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only try runs (true), or only full runs (false).","title":"Trial"},"description":"Only try runs (true), or only full runs (false)."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RunStatus"}},{"type":"null"}],"description":"Only runs with this status. It can repeat.","title":"Status"},"description":"Only runs with this status. It can repeat."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A reply's `next_cursor`, for the next page. Leave it out for the first.","title":"Cursor"},"description":"A reply's `next_cursor`, for the next page. Leave it out for the first."},{"name":"latest","in":"query","required":false,"schema":{"type":"boolean","description":"Only each saved workflow's newest full run and newest try run, all on one page. It takes no other filter or cursor.","default":false,"title":"Latest"},"description":"Only each saved workflow's newest full run and newest try run, all on one page. It takes no other filter or cursor."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunList"},"example":{"items":[{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"succeeded","body":{},"dispatched":true,"trace_id":"trace_5c1e9a7f3b2d4e6a8c0f","trace_parent_id":"event_0d4b8f2a6c1e3957b7a2","trace_started_at":"2026-09-29T02:00:04.195000+00:00","requests":1203,"created":1790647204.2,"rows":null,"links":{"self":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","results_csv":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/export?format=csv","app":"https://app.jevreduce.com/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"deliveries":null,"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":"2026-09-29T02:03:41Z","max_requests":1500,"cost_usd":0.0111,"reserved_usd":0.0,"error":null}],"next_cursor":"WzE3OTA2NDcyMDQuMiwicnVuXzhkMmY0YTFjMGI5ZTdkNmY1YTNjMmUxYjBhOWY4ZDdjIl0"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/workflows/{workflow_id}/runs":{"post":{"tags":["Saved workflows"],"summary":"Start a run of a saved workflow","description":"Start a run of a saved workflow: its latest version unless `version` names another, on the files it\nwas saved with unless `sources` names others. It replies at once with the run, queued.\n\nAPI keys need the `run` permission: Run workflows or Full access.","operationId":"start_workflow_v1_workflows__workflow_id__runs_post","security":[{"bearer":["run"]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow ID","description":"The saved workflow's ID, such as `workflow_7c3a0e5d91f24b8c6d10`."},"description":"The saved workflow's ID, such as `workflow_7c3a0e5d91f24b8c6d10`."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A value you choose, such as `nightly-2026-09-29`, that makes a retry safe: the same key and request again returns the run the first one started, and the same key with a different request is refused (409). Required for API keys.","title":"Idempotency-Key"},"description":"A value you choose, such as `nightly-2026-09-29`, that makes a retry safe: the same key and request again returns the run the first one started, and the same key with a different request is refused (409). Required for API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartWorkflowRun"},"examples":{"latest":{"summary":"On the newest version of an input's file","value":{"max_requests":1500,"sources":{"reviews":"latest"}}},"saved":{"summary":"On the files it was saved with","value":{"max_requests":1500}},"try":{"summary":"A try run on 20 rows","value":{"max_requests":100,"sample":{"rows":20}}}}}}},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"example":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"queued","body":{},"dispatched":false,"trace_id":"trace_5c1e9a7f3b2d4e6a8c0f","trace_parent_id":"event_0d4b8f2a6c1e3957b7a2","trace_started_at":"2026-09-29T02:00:04.195000+00:00","requests":0,"created":1790647204.2,"rows":{"read":0,"succeeded":0,"failed":0,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","results_csv":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/export?format=csv","app":"https://app.jevreduce.com/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"deliveries":[],"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":null,"max_requests":1500,"cost_usd":0.0,"reserved_usd":0.0,"error":null}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"402":{"description":"Not enough credits: the run can cost more than the organization has available, as `needed_usd` and `available_usd` say.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"A conflict, such as an Idempotency-Key sent again with a different request, or a stale save.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many runs started by API keys are going at once. Wait `Retry-After` seconds, then send the same request again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}":{"get":{"tags":["Runs"],"summary":"Get a run","description":"The run, with its rows counted and each of its deliveries to a bucket. Ask again every few seconds\nuntil its `status` is final, or hear when it ends with a webhook.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"run_v1_runs__ident__get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"example":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"succeeded","body":{},"dispatched":true,"trace_id":"trace_5c1e9a7f3b2d4e6a8c0f","trace_parent_id":"event_0d4b8f2a6c1e3957b7a2","trace_started_at":"2026-09-29T02:00:04.195000+00:00","requests":1203,"created":1790647204.2,"rows":{"read":1200,"succeeded":1200,"failed":0,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","results_csv":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/export?format=csv","app":"https://app.jevreduce.com/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"deliveries":[{"destination_id":"dest_5e0b7c2a19d34f86a1b2","status":"delivered","location":"s3://acme-data/jevreduce/workflow_7c3a0e5d91f24b8c6d10/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/results.csv"}],"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":"2026-09-29T02:03:41Z","max_requests":1500,"cost_usd":0.0111,"reserved_usd":0.0,"error":null}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/cancel":{"post":{"tags":["Runs"],"summary":"Cancel a run","description":"Stop a run: a queued one is cancelled at once, and a running one is `cancelling` until its work stops.\nA run that has ended is returned as it is.\n\nAPI keys need the `run` permission: Run workflows or Full access.","operationId":"cancel_v1_runs__ident__cancel_post","security":[{"bearer":["run"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"example":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"cancelling","body":{},"dispatched":true,"trace_id":"trace_5c1e9a7f3b2d4e6a8c0f","trace_parent_id":"event_0d4b8f2a6c1e3957b7a2","trace_started_at":"2026-09-29T02:00:04.195000+00:00","requests":412,"created":1790647204.2,"rows":{"read":1200,"succeeded":405,"failed":0,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","results_csv":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/export?format=csv","app":"https://app.jevreduce.com/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"deliveries":[],"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":null,"max_requests":1500,"cost_usd":0.0038,"reserved_usd":0.0,"error":null}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/replays":{"post":{"tags":["Runs"],"summary":"Rerun a run","description":"Start a new run of what a run ran, on the same files, optionally asking other models (which needs\n`write`). It replies at once with the new run, queued.\n\nAPI keys need the `run` permission: Run workflows or Full access.","operationId":"replay_v1_runs__ident__replays_post","security":[{"bearer":["run"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A value you choose, such as `nightly-2026-09-29`, that makes a retry safe: the same key and request again returns the run the first one started, and the same key with a different request is refused (409). Required for API keys.","title":"Idempotency-Key"},"description":"A value you choose, such as `nightly-2026-09-29`, that makes a retry safe: the same key and request again returns the run the first one started, and the same key with a different request is refused (409). Required for API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Replay"},"examples":{"same":{"summary":"The same again","value":{"max_requests":1500}},"models":{"summary":"With another model (needs write)","value":{"models":{"complaints":"kev-4b"},"max_requests":1500}}}}}},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"example":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_3e9b1d7f5a2c4e6b8d0f1a3c5e7b9d2f","status":"queued","body":{},"dispatched":false,"trace_id":"trace_5c1e9a7f3b2d4e6a8c0f","trace_parent_id":"event_0d4b8f2a6c1e3957b7a2","trace_started_at":"2026-09-29T02:00:04.195000+00:00","requests":0,"created":1790647204.2,"rows":{"read":0,"succeeded":0,"failed":0,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_3e9b1d7f5a2c4e6b8d0f1a3c5e7b9d2f","results_csv":"https://api.jevreduce.com/v1/runs/run_3e9b1d7f5a2c4e6b8d0f1a3c5e7b9d2f/export?format=csv","app":"https://app.jevreduce.com/runs/run_3e9b1d7f5a2c4e6b8d0f1a3c5e7b9d2f"},"deliveries":[],"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":null,"max_requests":1500,"cost_usd":0.0,"reserved_usd":0.0,"error":null}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"402":{"description":"Not enough credits: the run can cost more than the organization has available, as `needed_usd` and `available_usd` say.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"A conflict, such as an Idempotency-Key sent again with a different request, or a stale save.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many runs started by API keys are going at once. Wait `Retry-After` seconds, then send the same request again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/progress":{"get":{"tags":["Runs"],"summary":"Get a run's progress","description":"How far each step of the run has got, with its rows counted by status, and the requests sent so far.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"progress_v1_runs__ident__progress_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunProgress"},"example":{"id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"running","phase":"Find complaints","requests":412,"max_requests":1500,"started":1790647204.2,"elapsed_s":74.6,"cost_usd":0.0038,"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","expected":1200,"done":405,"counts":{"succeeded":405,"failed":0,"unknown":0,"review":0,"excluded":0,"skipped":0}}]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/outputs":{"get":{"tags":["Downloads"],"summary":"List a run's rows","description":"A page of the run's rows, step by step, each with its answers and a short `label`. Send\n`next_offset` back as `offset` for the next page. Filtering an Ask step's rows by an answer or close calls\nreads the step's rows in order, so a page deep into a big step takes longer.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"output_v1_runs__ident__outputs_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A step's `id`, from the run's definition. Leave it out for every step.","title":"Stage"},"description":"A step's `id`, from the run's definition. Leave it out for every step."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/NodeStatus"}},{"type":"null"}],"description":"Only rows with this status. It can repeat.","title":"Status"},"description":"Only rows with this status. It can repeat."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"The most rows on a page.","default":100,"title":"Limit"},"description":"The most rows on a page."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"How many to skip: a page's `next_offset`. Leave it out for the first page.","default":0,"title":"Offset"},"description":"How many to skip: a page's `next_offset`. Leave it out for the first page."},{"name":"answer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only an Ask step's rows whose answer to a question reads as a label, written question:label, such as `complaint:yes`: yes or no, an option, or a scale's level, as downloads write them. Needs `stage`.","title":"Answer"},"description":"Only an Ask step's rows whose answer to a question reads as a label, written question:label, such as `complaint:yes`: yes or no, an option, or a scale's level, as downloads write them. Needs `stage`."},{"name":"close_calls","in":"query","required":false,"schema":{"type":"boolean","description":"Only an Ask step's rows with a close call among their answers. Needs `stage`.","default":false,"title":"Close Calls"},"description":"Only an Ask step's rows with a close call among their answers. Needs `stage`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowList"},"example":{"items":[{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","id":"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f","run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","stage":"complaints","kind":"judgment","status":"succeeded","body":{"payload":{"input":{"id":"r-1001","text":"Arrived broken, and support never replied."},"answers":{"complaint":{"kind":"binary","probability_origin":"provider_native","probability":0.94,"close_call":false}}},"parents":["0b7d3f9a1c5e2b8d4f6a0c3e5b7d9f1a"],"attempt_id":"attempt_9d3b7f1e5a2c40d8b6e1","model":"jev","fixture":false,"error":null},"ordinal":0,"label":"r-1001"}],"next_offset":100}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/answers":{"get":{"tags":["Downloads"],"summary":"Add up a step's answers","description":"Every answer an Ask step has given so far, added up over all of its rows: for each question, how many\nrows have an answer, how many read as each label, the most common label, a scale's average, and how many\nare close calls, with how many rows have a close call at all. It reads the step's rows a page at a time,\nso a big step takes a moment.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"answers_v1_runs__ident__answers_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},{"name":"stage","in":"query","required":true,"schema":{"type":"string","description":"An Ask step's `id`, from the run's definition.","title":"Stage"},"description":"An Ask step's `id`, from the run's definition."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepAnswers"},"example":{"stage":"complaints","rows":1188,"close_call_rows":31,"questions":[{"question":"complaint","answered":1188,"counts":{"yes":402,"no":786},"shares":{"yes":0.3384,"no":0.6616},"most_common":"no","average":null,"calibrated_average":null,"close_calls":31}]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/graph":{"get":{"tags":["Downloads"],"summary":"Get a run's row graph","description":"The run's first rows, up to `limit`, each with the rows it came from (`parents`), for drawing how rows\nflow from step to step.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"graph_v1_runs__ident__graph_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":300,"minimum":1,"description":"The most rows to show.","default":150,"title":"Limit"},"description":"The most rows to show."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowGraph"},"example":{"nodes":[{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","id":"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f","run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","stage":"complaints","kind":"judgment","status":"succeeded","ordinal":0,"parents":["0b7d3f9a1c5e2b8d4f6a0c3e5b7d9f1a"],"label":"r-1001"}],"truncated":true,"limit":150}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/attempts":{"get":{"tags":["Runs"],"summary":"List a run's model requests","description":"A page of the requests the run sent to models, oldest first. Send `next_offset` back as `offset` for\nthe next page.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"run_attempts_v1_runs__ident__attempts_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"The most requests on a page.","default":100,"title":"Limit"},"description":"The most requests on a page."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"How many to skip: a page's `next_offset`. Leave it out for the first page.","default":0,"title":"Offset"},"description":"How many to skip: a page's `next_offset`. Leave it out for the first page."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptList"},"example":{"items":[{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","id":"attempt_9d3b7f1e5a2c40d8b6e1","run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","stage":"complaints","unit":"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f","status":"succeeded","body":{"request_artifact":"orgs/5d1f8b3e9a2c47e6b0d4f1a8c3e5b7d9f2a4c6e8b0d1f3a5c7e9b2d4f6a8c0e1/45484b87394c0f5144f017298573cf8495bf71b4fb9ad23b4739092d458d7833","response_artifact":"orgs/5d1f8b3e9a2c47e6b0d4f1a8c3e5b7d9f2a4c6e8b0d1f3a5c7e9b2d4f6a8c0e1/1c9411c5c8e28c4f1333362086940a488eec3f0703f8ee77f9491fa5a30bcd9f","model_id":"jev","requested_model":"jev-1.14.0","endpoint":"https://api.typesafe.ai","fixture":false,"generation":1,"http_status":200,"retry_after":null,"resolved_model":"jev-1.14.0","usage":null,"duration_ms":168,"error":null},"created":1790647209.8}],"next_offset":100}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/events":{"get":{"tags":["Runs"],"summary":"List a run's events","description":"A page of the run's event log, oldest first, after the event numbered `after`. Send `next_cursor`\nback as `after`, or as `cursor`, for the next page.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"run_events_v1_runs__ident__events_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Only the events after the one with this `sequence`: a page's `next_cursor`. Leave it out for the first page.","default":0,"title":"After"},"description":"Only the events after the one with this `sequence`: a page's `next_cursor`. Leave it out for the first page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The same as `after`, for programs that page with `cursor`.","title":"Cursor"},"description":"The same as `after`, for programs that page with `cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"The most events on a page.","default":100,"title":"Limit"},"description":"The most events on a page."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEventList"},"example":{"items":[{"sequence":212,"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","entity_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","kind":"run.queued","body":{"parent_run_id":null},"created":1790647204.2},{"sequence":215,"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","entity_id":"0b7d3f9a1c5e2b8d4f6a0c3e5b7d9f1a","kind":"node.published","body":{"stage":"source:reviews","status":"succeeded"},"created":1790647205.1}],"next_cursor":215}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/export":{"get":{"tags":["Downloads"],"summary":"Download a step's rows","description":"Download one step's rows as a JSON Lines or CSV file: the last step's unless `stage` names another.\nThe file streams as it's made. A CSV file has at most 200 of the input's columns; JSON Lines has them all.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"export_v1_runs__ident__export_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A step's `id`, from the run's definition. Leave it out for the last.","title":"Stage"},"description":"A step's `id`, from the run's definition. Leave it out for the last."},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ExportFormat","description":"`jsonl` (JSON Lines) or `csv`.","default":"jsonl"},"description":"`jsonl` (JSON Lines) or `csv`."},{"name":"members","in":"query","required":false,"schema":{"type":"boolean","description":"For a Trim big groups step: its decision about each member of each group.","default":false,"title":"Members"},"description":"For a Trim big groups step: its decision about each member of each group."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/x-ndjson":{"schema":{"type":"string"},"example":"{\"org\": \"org_2yP4kR9mTq7wLx3VbN8cZs1D\", \"id\": \"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f\", \"run_id\": \"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c\", \"stage\": \"complaints\", \"kind\": \"judgment\", \"status\": \"succeeded\", \"body\": {\"payload\": {\"input\": {\"id\": \"r-1001\", \"text\": \"Arrived broken, and support never replied.\"}, \"answers\": {\"complaint\": {\"kind\": \"binary\", \"probability_origin\": \"provider_native\", \"probability\": 0.94, \"close_call\": false}}}, \"parents\": [\"0b7d3f9a1c5e2b8d4f6a0c3e5b7d9f1a\"], \"attempt_id\": \"attempt_9d3b7f1e5a2c40d8b6e1\", \"model\": \"jev\", \"fixture\": false, \"error\": null}, \"ordinal\": 0}\n"},"text/csv":{"schema":{"type":"string"},"example":"record,status,reason,id,text,complaint,complaint probability,complaint close call\r\n4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f,succeeded,,r-1001,\"Arrived broken, and support never replied.\",yes,0.94,no\r\n7a1e5c9b3d0f2e6a8c4b1d7f9e3a5c0b,succeeded,,r-1002,\"Great value, would buy again.\",no,0.03,no\r\n"}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/export/training":{"get":{"tags":["Downloads"],"summary":"Download training examples","description":"Download every answer the run's models gave as a training example for another model: a JSON Lines\nfile with one `TrainingExample` per line.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"export_training_v1_runs__ident__export_training_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/x-ndjson":{"schema":{"type":"string"},"example":"{\"kind\":\"row\",\"id\":\"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f\",\"input\":{\"id\":\"r-1001\",\"text\":\"Arrived broken, and support never replied.\"},\"question\":\"complaint\",\"question_text\":\"Is this review a complaint?\",\"type\":\"noul\",\"answer\":0.94,\"details\":{\"kind\":\"binary\",\"probability_origin\":\"provider_native\",\"probability\":0.94,\"probabilities\":null,\"distribution_sum\":null,\"rounding_tolerance\":null,\"choice\":null,\"score\":null,\"calibrated_score\":null,\"legend\":null,\"confidence\":null,\"confidence_origin\":null,\"close_call\":false},\"how_asked\":\"Find complaints, one per request\",\"status\":\"confident\",\"split\":\"train\",\"ok_to_train\":true,\"model\":\"jev-1.14.0\",\"run\":\"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c\"}\n"}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/credits":{"get":{"tags":["Credits"],"summary":"Get your credits","description":"Your organization's credits, in US dollars: its balance, what runs still going have set aside, and\nwhat's available for a new run. A run can start only when the most it can cost fits in what's\navailable.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"balance_v1_credits_get","responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalance"},"example":{"balance_usd":9.9889,"reserved_usd":0.0631,"available_usd":9.9258}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["read"]}]}},"/v1/credits/history":{"get":{"tags":["Credits"],"summary":"List credit changes","description":"Every change to your organization's balance, newest first, 100 to a page: grants, each run's charge,\nand staff changes, each with who caused it. A page with more to come has `next_cursor`: send it back as\n`cursor` for the next page.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"history_v1_credits_history_get","security":[{"bearer":["read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A reply's `next_cursor`, for the next page. Leave it out for the first.","title":"Cursor"},"description":"A reply's `next_cursor`, for the next page. Leave it out for the first."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditHistory"},"example":{"items":[{"id":"credit_3f8a1c6e0b9d4a27c5e1","kind":"charge","amount_usd":-0.0111,"source":null,"run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","actor":"key_2a7f0c9e41b35d86e0f1","created_at":"2026-09-29T02:03:41Z"},{"id":"credit_9b2e5d7a1c4f8e30a6d2","kind":"grant","amount_usd":10.0,"source":"trial","run_id":null,"actor":"system","created_at":"2026-09-28T17:12:09Z"}]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/credits/purchases":{"post":{"tags":["App only","Credits"],"summary":"Buy credits","description":"Buy credits through this server's payment plugin, and get the organization's credits. Admins only,\nnever API keys. With `checkout_url`, the admin pays on that page, which sends them back to Billing in the\nrequest's workspace, and the credits are added once the payment service says it's paid; without, they're\nadded already. The same `Idempotency-Key` again adds nothing more, and with another amount is refused\n(409); with Stripe, a retry on the key gets the same session for Stripe's 24 hours. Stripe needs the key\n(422 without one), and 503 is Stripe not answering. 501 when the server takes no payments.","operationId":"purchase_v1_credits_purchases_post","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"A value you choose that makes a retry safe: a purchase sent again with the same key adds credits once, and returns the balance. Required for Stripe.","title":"Idempotency-Key"},"description":"A value you choose that makes a retry safe: a purchase sent again with the same key adds credits once, and returns the balance. Required for Stripe."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPurchase"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPurchaseResult"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"A conflict, such as an Idempotency-Key sent again with a different request, or a stale save.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/webhooks/stripe":{"post":{"summary":"Stripe webhook","description":"Stripe's signed message that a Checkout Session is paid, which adds its credits once: `applied` when\nthey're added now, and `ignored` for a repeat or a message that adds nothing. 400 when it isn't signed,\n503 when the session can't be read back from Stripe, which then sends the message again, and 501 when the\nserver takes no payments.","operationId":"stripe_payment_v1_webhooks_stripe_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"type":"string","default":"","title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/nodes/{ident}":{"get":{"tags":["Downloads"],"summary":"Get a row","description":"One of a run's rows, with its answers, and the model request that gave them as `attempt`.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"node_v1_nodes__ident__get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Node ID","description":"One of a run's rows, by its `id` in `GET /v1/runs/{ident}/outputs`."},"description":"One of a run's rows, by its `id` in `GET /v1/runs/{ident}/outputs`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowDetail"},"example":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","id":"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f","run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","stage":"complaints","kind":"judgment","status":"succeeded","body":{"payload":{"input":{"id":"r-1001","text":"Arrived broken, and support never replied."},"answers":{"complaint":{"kind":"binary","probability_origin":"provider_native","probability":0.94,"close_call":false}}},"parents":["0b7d3f9a1c5e2b8d4f6a0c3e5b7d9f1a"],"attempt_id":"attempt_9d3b7f1e5a2c40d8b6e1","model":"jev","fixture":false,"error":null},"ordinal":0,"attempt":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","id":"attempt_9d3b7f1e5a2c40d8b6e1","run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","stage":"complaints","unit":"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f","status":"succeeded","body":{"request_artifact":"orgs/5d1f8b3e9a2c47e6b0d4f1a8c3e5b7d9f2a4c6e8b0d1f3a5c7e9b2d4f6a8c0e1/45484b87394c0f5144f017298573cf8495bf71b4fb9ad23b4739092d458d7833","response_artifact":"orgs/5d1f8b3e9a2c47e6b0d4f1a8c3e5b7d9f2a4c6e8b0d1f3a5c7e9b2d4f6a8c0e1/1c9411c5c8e28c4f1333362086940a488eec3f0703f8ee77f9491fa5a30bcd9f","model_id":"jev","requested_model":"jev-1.14.0","endpoint":"https://api.typesafe.ai","fixture":false,"generation":1,"http_status":200,"retry_after":null,"resolved_model":"jev-1.14.0","usage":null,"duration_ms":168,"error":null},"created":1790647209.8}}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/artifacts":{"get":{"tags":["Downloads"],"summary":"Read a stored file","description":"A small file the run stored, such as a model request's prompt or reply, as text.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"artifact_v1_artifacts_get","security":[{"bearer":["read"]}],"parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"Where the file is stored, as a row or model request names it.","title":"Key"},"description":"Where the file is stored, as a row or model request names it."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"},"example":"{\"model\": \"jev-1.14.0\", \"questions\": {\"complaint\": {\"type\": \"noul\", \"instructions\": \"Is this review a complaint?\"}}, \"state\": {\"id\": \"r-1001\", \"text\": \"Arrived broken, and support never replied.\"}}"}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/checks":{"post":{"tags":["Checks"],"summary":"Mark an answer","description":"Mark one of the run's answers right or wrong, and say what the right answer is. A new mark of an answer\nreplaces its earlier one.\n\nAPI keys need the `write` permission: Full access.","operationId":"create_check_v1_runs__ident__checks_post","security":[{"bearer":["write"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"},"examples":{"wrong":{"summary":"A wrong answer, and the right one","value":{"node_id":"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f","question":"complaint","verdict":"wrong","expected":"no","note":"Praise, not a complaint."}},"right":{"summary":"A right answer","value":{"node_id":"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f","question":"complaint","verdict":"right"}}}}}},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Check"},"example":{"id":"check_2c8e4a0f6b1d93e57a4c","run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","node_id":"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f","question":"complaint","verdict":"wrong","expected":"no","note":"Praise, not a complaint.","created":1790650117.4,"user_id":null,"created_at":"2026-09-29T02:48:37Z"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"get":{"tags":["Checks"],"summary":"List a run's checks","description":"The run's checks, with how often the checked answers were right.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"list_checks_v1_runs__ident__checks_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckList"},"example":{"items":[{"id":"check_2c8e4a0f6b1d93e57a4c","run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","node_id":"4c9e2a7f1b3d5e8a0c6f9b2d4e7a1c3f","question":"complaint","verdict":"wrong","expected":"no","note":"Praise, not a complaint.","created":1790650117.4,"user_id":null,"created_at":"2026-09-29T02:48:37Z"}],"summary":{"checked":1,"right":0,"by_question":{"complaint":{"checked":1,"right":0}}}}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/checks/{check_id}":{"delete":{"tags":["Checks"],"summary":"Delete a check","description":"Take back a check.\n\nAPI keys need the `write` permission: Full access.","operationId":"delete_check_v1_runs__ident__checks__check_id__delete","security":[{"bearer":["write"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},{"name":"check_id","in":"path","required":true,"schema":{"type":"string","title":"Check ID","description":"The check's `id`."},"description":"The check's `id`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"204":{"description":"Successful Response"},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/runs/{ident}/calibrations":{"get":{"tags":["Checks"],"summary":"Calibrate score questions from checks","description":"For each score question the run's checks mark, how far its answers were from the levels people know,\nand, from 10 known answers, the correction to save in the question so later runs add a corrected score\nbeside each answer.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"list_calibrations_v1_runs__ident__calibrations_get","security":[{"bearer":["read"]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."}],"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrationList"},"example":{"items":[{"stage":"review","question":"stars","known":48,"lean":-0.4113,"miss":0.7302,"calibration":{"slope":1.0,"offset":0.4187,"levels":5,"known":48,"run_id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"uncorrected":null,"calibrated_lean":0.0,"calibrated_miss":0.6516},{"stage":"review","question":"value","known":12,"lean":0.0833,"miss":0.4167,"calibration":null,"uncorrected":"no_lean","calibrated_lean":null,"calibrated_miss":null}]}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/templates":{"get":{"tags":["Models and estimates"],"summary":"List starting points","description":"The ready-made starting points a plan can begin from.\n\nAPI keys need the `read` permission: Read only, Run workflows or Full access.","operationId":"templates_v1_templates_get","responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TemplateSummary"},"type":"array","title":"Response Templates V1 Templates Get"},"example":[{"id":"flag-issue","title":"Flag {rows} about a problem","description":"A yes or no for every {row}.","needs":{"group":false,"subject":true}}]}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["read"]}]}},"/v1/plans":{"post":{"tags":["Models and estimates"],"summary":"Draft a plan","description":"Draft a workflow from a goal or a starting point, or revise a draft. It never starts a run.\n\nAPI keys need the `write` permission: Full access.","operationId":"plan_v1_plans_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequest"},"examples":{"goal":{"summary":"From a goal","value":{"datasets":["snap_91c2d7e04a6b4f18a3e5"],"goal":"Find the complaints in our reviews"}},"revision":{"summary":"A change, with the conversation so far","value":{"datasets":["snap_91c2d7e04a6b4f18a3e5"],"previous":{"name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","kind":"evaluate","input":"source:reviews","model":"jev","questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint?"}}}]},"goal":"Only complaints about a product, not about delivery","history":[{"from":"you","text":"Find the complaints in our reviews"},{"from":"planner","text":"I drafted a workflow with one step that asks whether each review is a complaint."}]}}}}},"required":true},"responses":{"401":{"description":"Not signed in: no API key was sent, or it isn't valid or was revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The API key's preset doesn't allow this, or its workspace was archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResult"},"example":{"definition":{"schema_version":"jevreduce.local.v1","name":"Review triage","sources":{"reviews":"snap_91c2d7e04a6b4f18a3e5"},"stages":[{"id":"complaints","name":"Find complaints","input":"source:reviews","kind":"evaluate","model":"jev","state_path":[],"questions":{"complaint":{"type":"noul","instructions":"Is this review a complaint?","criteria":null}}}],"labels":{"row":"review","rows":"reviews","group":null,"groups":null}},"base_version":null,"labels":{"row":"review","rows":"reviews","group":null,"groups":null},"steps":[{"stage":"complaints","title":"Find complaints","detail":"Is this review a complaint"}],"question":null,"changes":["Drafted a plan from your goal."],"notes":["The planner read reviews.csv: its columns and all 1,200 rows."],"compile":{"ok":true,"errors":[]},"planner":"agent","model":"claude-opus-5-5","validation":{"fingerprint":"","status":"preflight","issues":[{"code":"model_trial_required","severity":"info","message":"Model answers and operations depending on them still require a worker trial.","stage":null,"source":null,"path":[],"count":0,"rows":[]}],"stages":[{"stage":"complaints","rows_in":100,"rows_out":100,"unmatched":0,"missing_keys":0,"multiple_matches":0,"excluded":0}],"source_rows":{"reviews":100},"source_more":{},"source_fields":{},"snapshots":{},"run_id":null,"output":[],"fields":[],"checked_at":0.0,"model_steps_executed":false,"scope":"Bounded sample; full-data completeness and later schema changes are not verified."}}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"default":{"description":"Another problem, such as a workspace header that isn't the API key's (400), a body that's too big (413) or an error on our side (500 or 503). Its `code` says which.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["write"]}]}},"/v1/telemetry/report":{"post":{"tags":["App only","Telemetry"],"summary":"Report","operationId":"report_v1_telemetry_report_post","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportMetrics"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsAccepted"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/telemetry/events":{"get":{"tags":["App only","Telemetry"],"summary":"Events","operationId":"events_v1_telemetry_events_get","security":[{"bearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":100000,"minimum":0,"default":0,"title":"Offset"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Entity Id"}},{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Trace Id"}},{"name":"operation","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Operation"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Tags"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricPage"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/telemetry/summary":{"get":{"tags":["App only","Telemetry"],"summary":"Summary","operationId":"summary_v1_telemetry_summary_get","security":[{"bearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Entity Id"}},{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Trace Id"}},{"name":"operation","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Operation"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Tags"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricSummary"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/telemetry/entities":{"get":{"tags":["App only","Telemetry"],"summary":"Entities","operationId":"entities_v1_telemetry_entities_get","security":[{"bearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":100000,"minimum":0,"default":0,"title":"Offset"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Entity Id"}},{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Trace Id"}},{"name":"operation","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Operation"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Tags"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricEntityPage"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/telemetry/tags/{tag_key}/rollup":{"get":{"tags":["App only","Telemetry"],"summary":"Tags","operationId":"tags_v1_telemetry_tags__tag_key__rollup_get","security":[{"bearer":[]}],"parameters":[{"name":"tag_key","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_.-]*$","title":"Tag Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":100000,"minimum":0,"default":0,"title":"Offset"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Entity Id"}},{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Trace Id"}},{"name":"operation","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Operation"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Tags"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricTagPage"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/telemetry/policy":{"get":{"tags":["App only","Telemetry"],"summary":"Policy","operationId":"policy_v1_telemetry_policy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryPolicy"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v1/telemetry/delete":{"post":{"tags":["App only","Telemetry"],"summary":"Purge","operationId":"purge_v1_telemetry_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTelemetry"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryDeleted"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v1/telemetry/resume":{"post":{"tags":["App only","Telemetry"],"summary":"Resume","operationId":"resume_v1_telemetry_resume_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryPolicy"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v1/telemetry/metrics":{"get":{"tags":["App only","Telemetry"],"summary":"Catalog","operationId":"catalog_v1_telemetry_metrics_get","security":[{"bearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Entity Id"}},{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Trace Id"}},{"name":"operation","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Operation"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Tags"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MetricDescriptor"},"title":"Response Catalog V1 Telemetry Metrics Get"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/telemetry/series":{"get":{"tags":["App only","Telemetry"],"summary":"Series","operationId":"series_v1_telemetry_series_get","security":[{"bearer":[]}],"parameters":[{"name":"measure","in":"query","required":false,"schema":{"type":"string","default":"value","title":"Measure"}},{"name":"aggregation","in":"query","required":false,"schema":{"type":"string","default":"avg","title":"Aggregation"}},{"name":"bucket_seconds","in":"query","required":false,"schema":{"type":"integer","maximum":86400,"minimum":10,"default":60,"title":"Bucket Seconds"}},{"name":"group_by","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/TagKey"},{"type":"null"}],"title":"Group By"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Entity Id"}},{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Trace Id"}},{"name":"operation","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}],"title":"Operation"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Tags"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricSeries"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/connections/apps":{"get":{"summary":"Apps","operationId":"apps_v1_connections_apps_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppList"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/connections/connect":{"post":{"summary":"Connect","operationId":"connect_v1_connections_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSession"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/connections/intents/{ident}":{"get":{"summary":"Intent","operationId":"intent_v1_connections_intents__ident__get","security":[{"bearer":[]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Ident"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectIntent"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/connections/intents/{ident}/cancel":{"post":{"summary":"Cancel Intent","operationId":"cancel_intent_v1_connections_intents__ident__cancel_post","security":[{"bearer":[]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Ident"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectIntent"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/connections":{"get":{"summary":"Connections","operationId":"connections_v1_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionList"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/connections/{ident}":{"get":{"summary":"Connection","operationId":"connection_v1_connections__ident__get","security":[{"bearer":[]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Ident"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]},"patch":{"summary":"Rename Connection","operationId":"rename_connection_v1_connections__ident__patch","security":[{"bearer":[]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Ident"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]},"delete":{"summary":"Disconnect","operationId":"disconnect_v1_connections__ident__delete","security":[{"bearer":[]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Ident"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/connections/nango/webhook":{"post":{"summary":"Nango Webhook","operationId":"nango_webhook_v1_connections_nango_webhook_post","parameters":[{"name":"x-nango-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Nango-Signature"}},{"name":"x-nango-hmac-sha256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Nango-Hmac-Sha256"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookReceipt"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/imports/draft":{"post":{"summary":"Draft Import","operationId":"draft_import_v1_imports_draft_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportDraftRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportDraft"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/imports":{"post":{"summary":"Start Import","operationId":"start_import_v1_imports_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportStart"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportStarted"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/imports/{import_id}":{"get":{"summary":"Import Progress","operationId":"import_progress_v1_imports__import_id__get","security":[{"bearer":[]}],"parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportProgress"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/imports/{import_id}/refresh":{"post":{"summary":"Refresh Import","operationId":"refresh_import_v1_imports__import_id__refresh_post","security":[{"bearer":[]}],"parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","title":"Import Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportStarted"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/agent-sessions":{"get":{"summary":"Agent Summaries","operationId":"agent_summaries_v1_agent_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentSummary"},"type":"array","title":"Response Agent Summaries V1 Agent Sessions Get"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]},"post":{"summary":"Start Agent","operationId":"start_agent_v1_agent_sessions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStart"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStarted"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/agent-sessions/{session_id}":{"get":{"summary":"Agent Session","operationId":"agent_session_v1_agent_sessions__session_id__get","security":[{"bearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSession"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/agent-sessions/{session_id}/actions":{"post":{"summary":"Act","operationId":"act_v1_agent_sessions__session_id__actions_post","security":[{"bearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Choice"},{"$ref":"#/components/schemas/Feedback"},{"$ref":"#/components/schemas/Accept"},{"$ref":"#/components/schemas/RunAll"},{"$ref":"#/components/schemas/Stop"}],"discriminator":{"propertyName":"kind","mapping":{"answer":"#/components/schemas/Choice","feedback":"#/components/schemas/Feedback","accept":"#/components/schemas/Accept","run":"#/components/schemas/RunAll","stop":"#/components/schemas/Stop"}},"title":"Action"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSession"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/agent-sessions/{session_id}/run":{"get":{"summary":"Agent Run","operationId":"agent_run_v1_agent_sessions__session_id__run_get","security":[{"bearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullRead"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/agent-sessions/{session_id}/definition":{"get":{"summary":"Agent Definition","operationId":"agent_definition_v1_agent_sessions__session_id__definition_get","security":[{"bearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Definition"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/agent-callbacks/{org}/{session_id}":{"get":{"summary":"Agent Brief","operationId":"agent_brief_v1_agent_callbacks__org___session_id__get","parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string","title":"Org"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brief"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/agent-callbacks/{org}/{session_id}/probe":{"post":{"summary":"Agent Probe","operationId":"agent_probe_v1_agent_callbacks__org___session_id__probe_post","parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string","title":"Org"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Probe"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sampled"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/agent-callbacks/{org}/{session_id}/sources":{"post":{"summary":"Agent Add Read","operationId":"agent_add_read_v1_agent_callbacks__org___session_id__sources_post","parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string","title":"Org"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRead"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brief"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/agent-callbacks/{org}/{session_id}/validate":{"post":{"summary":"Agent Validate","operationId":"agent_validate_v1_agent_callbacks__org___session_id__validate_post","parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string","title":"Org"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"retry","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Retry"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Done"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandidateValidation"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/agent-callbacks/{org}/{session_id}/say":{"post":{"summary":"Agent Say","operationId":"agent_say_v1_agent_callbacks__org___session_id__say_post","parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string","title":"Org"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Progress"},{"$ref":"#/components/schemas/Proposal"},{"$ref":"#/components/schemas/AgentQuestion"},{"$ref":"#/components/schemas/Done"},{"$ref":"#/components/schemas/Stuck"}],"discriminator":{"propertyName":"kind","mapping":{"progress":"#/components/schemas/Progress","preview":"#/components/schemas/Proposal","question":"#/components/schemas/AgentQuestion","done":"#/components/schemas/Done","stuck":"#/components/schemas/Stuck"}},"title":"Message"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Heard"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/agent-callbacks/{org}/{session_id}/upload":{"post":{"summary":"Agent Upload","operationId":"agent_upload_v1_agent_callbacks__org___session_id__upload_post","parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string","title":"Org"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dump"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadTicket"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/notifications/email":{"get":{"summary":"Preferences","operationId":"preferences_v1_notifications_email_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferences"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]},"put":{"summary":"Save Preferences","operationId":"save_preferences_v1_notifications_email_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferencesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferences"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/webhooks/clerk/email":{"post":{"summary":"Clerk Email","operationId":"clerk_email_v1_webhooks_clerk_email_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/notifications/email/analytics":{"get":{"summary":"Email Analytics","operationId":"email_analytics_v1_notifications_email_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnalytics"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/webhooks/resend":{"post":{"summary":"Resend Event","operationId":"resend_event_v1_webhooks_resend_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/notifications":{"get":{"summary":"Inbox","operationId":"inbox_v1_notifications_get","security":[{"bearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":100000,"minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxPage"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/notifications/stream":{"get":{"summary":"Stream","operationId":"stream_v1_notifications_stream_get","responses":{"200":{"description":"Successful Response","content":{"text/event-stream":{}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/notifications/{notification_id}/read":{"post":{"summary":"Mark Read","operationId":"mark_read_v1_notifications__notification_id__read_post","security":[{"bearer":[]}],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","title":"Notification Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/api-keys":{"get":{"summary":"Api Keys","description":"The workspace's keys, newest first, revoked ones included.","operationId":"api_keys_v1_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKey"},"type":"array","title":"Response Api Keys V1 Api Keys Get"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]},"post":{"summary":"Make Key","description":"Make a key. Its `secret` is in this reply only, and is never shown again.","operationId":"make_key_v1_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKey"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/api-keys/{key_id}":{"delete":{"summary":"Revoke Key","description":"Revoke a key. It stops working at once, and stays listed as revoked.","operationId":"revoke_key_v1_api_keys__key_id__delete","security":[{"bearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/webhook-endpoints":{"get":{"summary":"Webhook Endpoints","description":"The workspace's addresses, newest first, each with how its newest message went.","operationId":"webhook_endpoints_v1_webhook_endpoints_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebhookEndpoint"},"type":"array","title":"Response Webhook Endpoints V1 Webhook Endpoints Get"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]},"post":{"summary":"Make Webhook Endpoint","description":"Add an address. Its signing `secret` is in this reply only, and is never shown again.","operationId":"make_webhook_endpoint_v1_webhook_endpoints_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedWebhookEndpoint"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/webhook-endpoints/{endpoint_id}":{"patch":{"summary":"Change Webhook Endpoint","description":"Change an address, the outcomes it's sent, or turn it on or off. Turning it on clears\n`disabled_reason`.","operationId":"change_webhook_endpoint_v1_webhook_endpoints__endpoint_id__patch","security":[{"bearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]},"delete":{"summary":"Remove Webhook Endpoint","description":"Remove an address, and its delivery log with it.","operationId":"remove_webhook_endpoint_v1_webhook_endpoints__endpoint_id__delete","security":[{"bearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/webhook-endpoints/{endpoint_id}/test":{"post":{"summary":"Send Test Webhook","description":"Queue a `webhook.test` message to the address, whether it's on or off. It's tried once, with no\nretries, and another can't be queued until it has been.","operationId":"send_test_webhook_v1_webhook_endpoints__endpoint_id__test_post","security":[{"bearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/webhook-endpoints/{endpoint_id}/deliveries":{"get":{"summary":"Webhook Deliveries","description":"The address's newest 100 messages from the last 30 days by default, newest first, each with how its\ntries went. A message still being tried is kept however old it is.","operationId":"webhook_deliveries_v1_webhook_endpoints__endpoint_id__deliveries_get","security":[{"bearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"},"title":"Response Webhook Deliveries V1 Webhook Endpoints  Endpoint Id  Deliveries Get"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/destinations":{"get":{"summary":"Destinations","description":"The workspace's buckets, newest first, each with how its newest delivery went.","operationId":"destinations_v1_destinations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Destination"},"type":"array","title":"Response Destinations V1 Destinations Get"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]},"post":{"summary":"Make Destination","description":"Add a bucket. Each full run that ends `succeeded` or `completed_with_errors` saves its last step's rows\nthere. The secret access key is kept encrypted and never returned.","operationId":"make_destination_v1_destinations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewDestination"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Destination"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/destinations/{destination_id}":{"patch":{"summary":"Change Destination","description":"Change a bucket's settings, turn it on or off, or send a new access key, its ID and secret together.","operationId":"change_destination_v1_destinations__destination_id__patch","security":[{"bearer":[]}],"parameters":[{"name":"destination_id","in":"path","required":true,"schema":{"type":"string","title":"Destination Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Destination"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]},"delete":{"summary":"Remove Destination","description":"Remove a bucket. Files already in it stay there.","operationId":"remove_destination_v1_destinations__destination_id__delete","security":[{"bearer":[]}],"parameters":[{"name":"destination_id","in":"path","required":true,"schema":{"type":"string","title":"Destination Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/destinations/{destination_id}/test":{"post":{"summary":"Test Destination","description":"Write a small file to the bucket, on or off, and remove it again. A failed connection is `ok: false`\nwith a plain sentence saying what's wrong, not an error status.","operationId":"test_destination_v1_destinations__destination_id__test_post","security":[{"bearer":[]}],"parameters":[{"name":"destination_id","in":"path","required":true,"schema":{"type":"string","title":"Destination Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationTest"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/workspaces":{"get":{"tags":["App only","Workspaces"],"summary":"List workspaces","description":"The organization's workspaces: its Default first, then the rest oldest first, archived ones included.","operationId":"workspaces_v1_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Workspace"},"type":"array","title":"Response Workspaces V1 Workspaces Get"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}]},"post":{"tags":["App only","Workspaces"],"summary":"Make a workspace","description":"Make a workspace. An organization may have 20 that aren't archived besides its Default; one more is\nrefused (409).","operationId":"make_workspace_v1_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v1/workspaces/{workspace_id}":{"patch":{"tags":["App only","Workspaces"],"summary":"Rename a workspace","description":"Rename a workspace. The Default workspace keeps its name (422).","operationId":"rename_workspace_v1_workspaces__workspace_id__patch","security":[{"bearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/workspaces/{workspace_id}/archive":{"post":{"tags":["App only","Workspaces"],"summary":"Archive a workspace","description":"Archive a workspace for good: nobody, and none of its keys, can use it after, and its data is kept. It's\nrefused while the workspace has runs going (409), and for the Default workspace (422). Archiving it again\nchanges nothing.","operationId":"archive_workspace_v1_workspaces__workspace_id__archive_post","security":[{"bearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/schedules":{"get":{"summary":"Schedules","description":"The workspace's schedules, newest first.","operationId":"schedules_v1_schedules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Schedule"},"type":"array","title":"Response Schedules V1 Schedules Get"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]},"post":{"summary":"Make Schedule","description":"Schedule a workflow at its newest version, run as you. 404 for a workflow not in the workspace; 422\nfor one with no steps, a limit above the server's, or an input that reads someone else's connected app\naccount; 409 once the workspace has 25 schedules.","operationId":"make_schedule_v1_schedules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSchedule"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":[]}],"tags":["App only"]}},"/v1/schedules/{schedule_id}":{"patch":{"summary":"Change Schedule","description":"Change a schedule. Pausing changes only that, and a run going carries on. Anything else runs it as you,\nfrom no failures: resuming alone keeps the version it runs, and any other change moves it to the\nworkflow's newest. 422 when an input reads someone else's account, and 501 for anything but a pause while\nschedules are switched off.","operationId":"change_schedule_v1_schedules__schedule_id__patch","security":[{"bearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]},"delete":{"summary":"Delete Schedule","description":"Delete a schedule. It leaves the list at once, and a run going carries on.","operationId":"delete_schedule_v1_schedules__schedule_id__delete","security":[{"bearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/datasets/{ident}/lineage":{"get":{"summary":"Dataset Lineage","description":"What the dataset's newest 200 versions came from, and the newest 200 things made from them.","operationId":"dataset_lineage_v1_datasets__ident__lineage_get","security":[{"bearer":[]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Dataset ID","description":"The dataset's ID, such as `ds_4b1e9c07a2d84f6e9b30`."},"description":"The dataset's ID, such as `ds_4b1e9c07a2d84f6e9b30`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trace"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/runs/{ident}/lineage":{"get":{"summary":"Run Lineage","description":"What the run came from, and the newest 200 things made from it.","operationId":"run_lineage_v1_runs__ident__lineage_get","security":[{"bearer":[]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Run ID","description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."},"description":"The run's ID, such as `run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trace"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}},"/v1/nodes/{ident}/lineage":{"get":{"summary":"Node Lineage","description":"What the row came from, its run and the versions its source rows were read from, and the newest 200\nthings made from its run.","operationId":"node_lineage_v1_nodes__ident__lineage_get","security":[{"bearer":[]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Node ID","description":"One of a run's rows, by its `id` in `GET /v1/runs/{ident}/outputs`."},"description":"One of a run's rows, by its `id` in `GET /v1/runs/{ident}/outputs`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trace"}}}},"422":{"description":"The request isn't valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Not found, or not in this workspace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"tags":["App only"]}}},"webhooks":{"run.succeeded":{"post":{"summary":"A run succeeded","description":"A full run finished with no failed rows.","operationId":"run_succeeded","parameters":[{"description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled.","required":true,"schema":{"type":"string","title":"Webhook-Id","description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled."},"name":"webhook-id","in":"header"},{"description":"When this try was sent, in seconds since 1970.","required":true,"schema":{"type":"integer","title":"Webhook-Timestamp","description":"When this try was sent, in seconds since 1970."},"name":"webhook-timestamp","in":"header"},{"description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks).","required":true,"schema":{"type":"string","title":"Webhook-Signature","description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks)."},"name":"webhook-signature","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunSucceededMessage"},"example":{"type":"run.succeeded","timestamp":"2026-09-29T02:03:41Z","data":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"succeeded","requests":1203,"created":1790647204.2,"rows":{"read":1200,"succeeded":1200,"failed":0,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","results_csv":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/export?format=csv","app":"https://app.jevreduce.com/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"deliveries":[{"destination_id":"dest_5e0b7c2a19d34f86a1b2","status":"pending","location":null}],"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":"2026-09-29T02:03:41Z","max_requests":1500,"cost_usd":0.0111,"reserved_usd":0.0,"error":null}}}},"required":true},"responses":{"200":{"description":"Any 2xx within 15 seconds: the message arrived."},"410":{"description":"Gone: the address is turned off until an admin turns it on again."},"default":{"description":"Anything else, or no answer within 15 seconds: the message is tried again."}}}},"run.completed_with_errors":{"post":{"summary":"A run finished with errors","description":"A full run finished, but some rows failed. The rest have results.","operationId":"run_completed_with_errors","parameters":[{"description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled.","required":true,"schema":{"type":"string","title":"Webhook-Id","description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled."},"name":"webhook-id","in":"header"},{"description":"When this try was sent, in seconds since 1970.","required":true,"schema":{"type":"integer","title":"Webhook-Timestamp","description":"When this try was sent, in seconds since 1970."},"name":"webhook-timestamp","in":"header"},{"description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks).","required":true,"schema":{"type":"string","title":"Webhook-Signature","description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks)."},"name":"webhook-signature","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunCompletedWithErrorsMessage"},"example":{"type":"run.completed_with_errors","timestamp":"2026-09-29T02:03:41Z","data":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"completed_with_errors","requests":1203,"created":1790647204.2,"rows":{"read":1200,"succeeded":1188,"failed":12,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","results_csv":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/export?format=csv","app":"https://app.jevreduce.com/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"deliveries":[{"destination_id":"dest_5e0b7c2a19d34f86a1b2","status":"pending","location":null}],"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":"2026-09-29T02:03:41Z","max_requests":1500,"cost_usd":0.0111,"reserved_usd":0.0,"error":"12 rows in Find complaints have no answer, because their requests failed or couldn't be sent, and each keeps the reason. A replay asks Jev 1.14 again about every row, which takes about 1,200 requests, since runs don't share answers."}}}},"required":true},"responses":{"200":{"description":"Any 2xx within 15 seconds: the message arrived."},"410":{"description":"Gone: the address is turned off until an admin turns it on again."},"default":{"description":"Anything else, or no answer within 15 seconds: the message is tried again."}}}},"run.failed":{"post":{"summary":"A run failed","description":"A full run stopped because of a problem, which its `error` says.","operationId":"run_failed","parameters":[{"description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled.","required":true,"schema":{"type":"string","title":"Webhook-Id","description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled."},"name":"webhook-id","in":"header"},{"description":"When this try was sent, in seconds since 1970.","required":true,"schema":{"type":"integer","title":"Webhook-Timestamp","description":"When this try was sent, in seconds since 1970."},"name":"webhook-timestamp","in":"header"},{"description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks).","required":true,"schema":{"type":"string","title":"Webhook-Signature","description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks)."},"name":"webhook-signature","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunFailedMessage"},"example":{"type":"run.failed","timestamp":"2026-09-29T02:01:18Z","data":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"failed","requests":412,"created":1790647204.2,"rows":{"read":1200,"succeeded":405,"failed":0,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","results_csv":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/export?format=csv","app":"https://app.jevreduce.com/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"deliveries":[],"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":"2026-09-29T02:01:18Z","max_requests":1500,"cost_usd":0.0038,"reserved_usd":0.0,"error":"The run stopped because of a problem on our side. Replay the run to try again."}}}},"required":true},"responses":{"200":{"description":"Any 2xx within 15 seconds: the message arrived."},"410":{"description":"Gone: the address is turned off until an admin turns it on again."},"default":{"description":"Anything else, or no answer within 15 seconds: the message is tried again."}}}},"run.cancelled":{"post":{"summary":"A run was cancelled","description":"A full run stopped because someone cancelled it.","operationId":"run_cancelled","parameters":[{"description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled.","required":true,"schema":{"type":"string","title":"Webhook-Id","description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled."},"name":"webhook-id","in":"header"},{"description":"When this try was sent, in seconds since 1970.","required":true,"schema":{"type":"integer","title":"Webhook-Timestamp","description":"When this try was sent, in seconds since 1970."},"name":"webhook-timestamp","in":"header"},{"description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks).","required":true,"schema":{"type":"string","title":"Webhook-Signature","description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks)."},"name":"webhook-signature","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunCancelledMessage"},"example":{"type":"run.cancelled","timestamp":"2026-09-29T02:01:18Z","data":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"cancelled","requests":412,"created":1790647204.2,"rows":{"read":1200,"succeeded":405,"failed":0,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","results_csv":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/export?format=csv","app":"https://app.jevreduce.com/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"deliveries":[],"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":"2026-09-29T02:01:18Z","max_requests":1500,"cost_usd":0.0038,"reserved_usd":0.0,"error":null}}}},"required":true},"responses":{"200":{"description":"Any 2xx within 15 seconds: the message arrived."},"410":{"description":"Gone: the address is turned off until an admin turns it on again."},"default":{"description":"Anything else, or no answer within 15 seconds: the message is tried again."}}}},"run.delivered":{"post":{"summary":"A run's results reached a bucket","description":"A run's results were saved in one of the workspace's buckets.","operationId":"run_delivered","parameters":[{"description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled.","required":true,"schema":{"type":"string","title":"Webhook-Id","description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled."},"name":"webhook-id","in":"header"},{"description":"When this try was sent, in seconds since 1970.","required":true,"schema":{"type":"integer","title":"Webhook-Timestamp","description":"When this try was sent, in seconds since 1970."},"name":"webhook-timestamp","in":"header"},{"description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks).","required":true,"schema":{"type":"string","title":"Webhook-Signature","description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks)."},"name":"webhook-signature","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunDeliveredMessage"},"example":{"type":"run.delivered","timestamp":"2026-09-29T02:03:44Z","data":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"succeeded","requests":1203,"created":1790647204.2,"rows":{"read":1200,"succeeded":1200,"failed":0,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","results_csv":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/export?format=csv","app":"https://app.jevreduce.com/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"deliveries":[{"destination_id":"dest_5e0b7c2a19d34f86a1b2","status":"delivered","location":"s3://acme-data/jevreduce/workflow_7c3a0e5d91f24b8c6d10/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/results.csv"}],"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":"2026-09-29T02:03:41Z","max_requests":1500,"cost_usd":0.0111,"reserved_usd":0.0,"error":null,"delivery":{"destination_id":"dest_5e0b7c2a19d34f86a1b2","status":"delivered","location":"s3://acme-data/jevreduce/workflow_7c3a0e5d91f24b8c6d10/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/results.csv","error":null}}}}},"required":true},"responses":{"200":{"description":"Any 2xx within 15 seconds: the message arrived."},"410":{"description":"Gone: the address is turned off until an admin turns it on again."},"default":{"description":"Anything else, or no answer within 15 seconds: the message is tried again."}}}},"run.delivery_failed":{"post":{"summary":"A run's results couldn't reach a bucket","description":"A run's results couldn't be saved in one of the workspace's buckets: every try failed, or the bucket was turned off. `delivery.error` says why.","operationId":"run_delivery_failed","parameters":[{"description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled.","required":true,"schema":{"type":"string","title":"Webhook-Id","description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled."},"name":"webhook-id","in":"header"},{"description":"When this try was sent, in seconds since 1970.","required":true,"schema":{"type":"integer","title":"Webhook-Timestamp","description":"When this try was sent, in seconds since 1970."},"name":"webhook-timestamp","in":"header"},{"description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks).","required":true,"schema":{"type":"string","title":"Webhook-Signature","description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks)."},"name":"webhook-signature","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunDeliveryFailedMessage"},"example":{"type":"run.delivery_failed","timestamp":"2026-09-30T05:34:02Z","data":{"org":"org_2yP4kR9mTq7wLx3VbN8cZs1D","workspace_id":"wrkspc_dd403860bc42b0dbb493","id":"run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","status":"succeeded","requests":1203,"created":1790647204.2,"rows":{"read":1200,"succeeded":1200,"failed":0,"excluded":0},"links":{"self":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c","results_csv":"https://api.jevreduce.com/v1/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c/export?format=csv","app":"https://app.jevreduce.com/runs/run_8d2f4a1c0b9e7d6f5a3c2e1b0a9f8d7c"},"deliveries":[{"destination_id":"dest_5e0b7c2a19d34f86a1b2","status":"failed","location":null}],"trial":false,"sample":null,"workflow_id":"workflow_7c3a0e5d91f24b8c6d10","labels":null,"workflow_version":4,"started_by":{"kind":"api_key","id":"key_2a7f0c9e41b35d86e0f1","name":"Nightly import"},"created_at":"2026-09-29T02:00:04Z","finished_at":"2026-09-29T02:03:41Z","max_requests":1500,"cost_usd":0.0111,"reserved_usd":0.0,"error":null,"delivery":{"destination_id":"dest_5e0b7c2a19d34f86a1b2","status":"failed","location":null,"error":"The access key isn't allowed to write files in this bucket. Check its permissions."}}}}},"required":true},"responses":{"200":{"description":"Any 2xx within 15 seconds: the message arrived."},"410":{"description":"Gone: the address is turned off until an admin turns it on again."},"default":{"description":"Anything else, or no answer within 15 seconds: the message is tried again."}}}},"webhook.test":{"post":{"summary":"A test message","description":"Sent by **Send test** on an address in the app, to check it. It's tried once, with no retries.","operationId":"webhook_test","parameters":[{"description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled.","required":true,"schema":{"type":"string","title":"Webhook-Id","description":"The message's ID, such as `evt_2f9c4e1a7b0d83c56e9f1a2b3c4d5e6f`. It's the same on every try, so skip a message whose ID you've handled."},"name":"webhook-id","in":"header"},{"description":"When this try was sent, in seconds since 1970.","required":true,"schema":{"type":"integer","title":"Webhook-Timestamp","description":"When this try was sent, in seconds since 1970."},"name":"webhook-timestamp","in":"header"},{"description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks).","required":true,"schema":{"type":"string","title":"Webhook-Signature","description":"`v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed by the address's signing secret (Standard Webhooks)."},"name":"webhook-signature","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestMessage"},"example":{"type":"webhook.test","timestamp":"2026-09-29T08:00:00Z","data":{"message":"This is a test message from Jevreduce."}}}},"required":true},"responses":{"200":{"description":"Any 2xx within 15 seconds: the message arrived."},"410":{"description":"Gone: the address is turned off until an admin turns it on again."},"default":{"description":"Anything else, or no answer within 15 seconds: the test failed. It isn't tried again."}}}}},"components":{"schemas":{"Accept":{"properties":{"kind":{"type":"string","const":"accept","title":"Kind","default":"accept"},"at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"At"}},"additionalProperties":false,"type":"object","title":"Accept","description":"The result looks right: its columns are frozen, and a table the agent uploaded is read into the library."},"AddRead":{"properties":{"alias":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","title":"Alias"},"from_alias":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","title":"From Alias"}},"additionalProperties":false,"type":"object","required":["alias","from_alias"],"title":"AddRead","description":"Another read of an already authorized app account; cannot name a new connection."},"AgentQuestion":{"properties":{"kind":{"type":"string","const":"question","title":"Kind","default":"question"},"text":{"type":"string","maxLength":1000,"minLength":1,"title":"Text"},"options":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":6,"minItems":2,"title":"Options"},"at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"At"}},"additionalProperties":false,"type":"object","required":["text","options"],"title":"AgentQuestion","description":"A decision only the person can make, as options to pick from."},"AgentSession":{"properties":{"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/AgentStatus"},"sources":{"items":{"oneOf":[{"$ref":"#/components/schemas/FileSource"},{"$ref":"#/components/schemas/AppAccount"}],"discriminator":{"propertyName":"kind","mapping":{"app":"#/components/schemas/AppAccount","file":"#/components/schemas/FileSource"}}},"type":"array","title":"Sources"},"instructions":{"type":"string","maxLength":2000,"minLength":1,"title":"Instructions"},"attachments":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array","title":"Attachments"},"events":{"items":{"oneOf":[{"$ref":"#/components/schemas/Progress"},{"$ref":"#/components/schemas/Preview"},{"$ref":"#/components/schemas/AgentQuestion"},{"$ref":"#/components/schemas/Done"},{"$ref":"#/components/schemas/Stuck"}],"discriminator":{"propertyName":"kind","mapping":{"done":"#/components/schemas/Done","preview":"#/components/schemas/Preview","progress":"#/components/schemas/Progress","question":"#/components/schemas/AgentQuestion","stuck":"#/components/schemas/Stuck"}}},"type":"array","title":"Events"},"actions":{"items":{"oneOf":[{"$ref":"#/components/schemas/Choice"},{"$ref":"#/components/schemas/Feedback"},{"$ref":"#/components/schemas/Accept"},{"$ref":"#/components/schemas/RunAll"},{"$ref":"#/components/schemas/Stop"}],"discriminator":{"propertyName":"kind","mapping":{"accept":"#/components/schemas/Accept","answer":"#/components/schemas/Choice","feedback":"#/components/schemas/Feedback","run":"#/components/schemas/RunAll","stop":"#/components/schemas/Stop"}}},"type":"array","title":"Actions"},"result":{"anyOf":[{"$ref":"#/components/schemas/Done"},{"type":"null"}]},"imports":{"anyOf":[{"$ref":"#/components/schemas/Imports"},{"type":"null"}]},"dumps":{"items":{"type":"string"},"type":"array","title":"Dumps"},"columns":{"patternProperties":{"^[a-z][a-z0-9_]{0,39}$":{"items":{"type":"string"},"type":"array"}},"type":"object","title":"Columns"},"problem":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Problem"},"created":{"type":"number","title":"Created"},"deadline":{"type":"number","title":"Deadline"},"revision":{"type":"integer","title":"Revision","default":0},"validation":{"anyOf":[{"$ref":"#/components/schemas/CandidateValidation"},{"type":"null"}]},"validation_candidate":{"anyOf":[{"$ref":"#/components/schemas/Done"},{"type":"null"}]},"validation_attempts":{"type":"integer","title":"Validation Attempts","default":0},"validation_history":{"items":{"$ref":"#/components/schemas/CandidateValidation"},"type":"array","title":"Validation History"},"agent_finished":{"type":"boolean","title":"Agent Finished","default":false},"read_saved":{"type":"boolean","title":"Read Saved","default":false},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent","description":"The agent the session is locked to; none until that agent has started."}},"additionalProperties":false,"type":"object","required":["id","status","sources","instructions","created","deadline"],"title":"AgentSession","description":"A session as this server keeps and shows it: its sources, what's happened so far, and where it stands.\n\nEvery change is a new session made by one of the methods below. Nothing here holds the agent's own\nsession; the store keeps its handle in a column of its own and no route shows it. `agent` is read from\nthat handle as the session is read, and is never kept in the body."},"AgentStart":{"properties":{"sources":{"items":{"oneOf":[{"$ref":"#/components/schemas/FileSource"},{"$ref":"#/components/schemas/AppAccount"}],"discriminator":{"propertyName":"kind","mapping":{"app":"#/components/schemas/AppAccount","file":"#/components/schemas/FileSource"}}},"type":"array","maxItems":6,"minItems":1,"title":"Sources"},"instructions":{"type":"string","maxLength":2000,"minLength":1,"title":"Instructions"},"attachments":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array","maxItems":10,"title":"Attachments"},"agent":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Agent","description":"The agent to work on the session, one of those `GET /health` lists in `import_agents`; the server's default when left out. The session stays with it until it ends."}},"additionalProperties":false,"type":"object","required":["sources","instructions"],"title":"AgentStart","description":"`POST /v1/agent-sessions`: the sources to shape, any mix of files and accounts, and what's wanted."},"AgentStarted":{"properties":{"session_id":{"type":"string","title":"Session Id"},"status":{"$ref":"#/components/schemas/AgentStatus"}},"additionalProperties":false,"type":"object","required":["session_id","status"],"title":"AgentStarted","description":"`POST /v1/agent-sessions`' reply."},"AgentStatus":{"type":"string","enum":["working","reviewing","asking","done","stuck","accepted","stopped","failed"],"title":"AgentStatus","description":"Where an import agent session stands: the agent working, waiting on the person (a preview to review,\na question to answer, a result to accept), stuck, or over (accepted, stopped, or failed)."},"AgentSummary":{"properties":{"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/AgentStatus"},"sources":{"items":{"oneOf":[{"$ref":"#/components/schemas/FileSource"},{"$ref":"#/components/schemas/AppAccount"}],"discriminator":{"propertyName":"kind","mapping":{"app":"#/components/schemas/AppAccount","file":"#/components/schemas/FileSource"}}},"type":"array","title":"Sources"},"instructions":{"type":"string","maxLength":2000,"minLength":1,"title":"Instructions"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"created":{"type":"number","title":"Created"},"full_read":{"anyOf":[{"type":"string","enum":["reading","saved"]},{"type":"null"}],"title":"Full Read"}},"additionalProperties":false,"type":"object","required":["id","status","sources","instructions","created"],"title":"AgentSummary","description":"One line of `GET /v1/agent-sessions`: a session without its events, for a list of them."},"Answer":{"properties":{"kind":{"$ref":"#/components/schemas/JudgmentKind"},"probability_origin":{"type":"string","title":"Probability Origin"},"probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Probability"},"probabilities":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Probabilities"},"distribution_sum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distribution Sum"},"rounding_tolerance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rounding Tolerance"},"choice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"calibrated_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calibrated Score"},"legend":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Legend"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"confidence_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Origin"},"close_call":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Close Call"}},"additionalProperties":false,"type":"object","required":["kind","probability_origin"],"title":"Answer","description":"One normalized answer, as stored in a node's `answers`. The keys are `JudgmentField`'s."},"ApiKey":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"preset":{"$ref":"#/components/schemas/KeyPreset"},"permissions":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array","title":"Permissions"},"prefix":{"type":"string","title":"Prefix"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"}},"additionalProperties":false,"type":"object","required":["id","workspace_id","name","preset","permissions","prefix","created_by","created_at","last_used_at","revoked_at"],"title":"ApiKey","description":"An API key as people see it: never its secret, only its first characters."},"ApiKeyRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"preset":{"$ref":"#/components/schemas/KeyPreset"}},"additionalProperties":false,"type":"object","required":["name","preset"],"title":"ApiKeyRequest","description":"`POST /v1/api-keys`: make a key with a name and a preset."},"App":{"properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,99}$","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"auth_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Mode"},"docs_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Url"},"configured":{"type":"boolean","title":"Configured","default":false},"setup_required":{"type":"boolean","title":"Setup Required","default":false}},"additionalProperties":false,"type":"object","required":["name","display_name"],"title":"App","description":"An app somebody here may connect, from Nango's templates, filtered by this server's lists."},"AppAccount":{"properties":{"kind":{"type":"string","const":"app","title":"Kind","default":"app"},"alias":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","title":"Alias"},"connection_id":{"type":"string","maxLength":100,"minLength":1,"title":"Connection Id"}},"additionalProperties":false,"type":"object","required":["alias","connection_id"],"title":"AppAccount","description":"One of the person's connected accounts, by this server's ID for it."},"AppList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/App"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"AppList"},"AppSource":{"properties":{"kind":{"type":"string","const":"app","title":"Kind","default":"app"},"connection_id":{"type":"string","maxLength":100,"minLength":1,"title":"Connection Id"},"spec":{"$ref":"#/components/schemas/ImportSpec"},"snapshot":{"type":"string","maxLength":100,"minLength":1,"title":"Snapshot"}},"additionalProperties":false,"type":"object","required":["connection_id","spec","snapshot"],"title":"AppSource","description":"A workflow source read from a connected app: the account, what to read from it, and the snapshot the\nlast read made. A run reads the snapshot; refreshing the source reads the app again into a new one."},"Attachment":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"url":{"type":"string","maxLength":2000,"pattern":"^https://","title":"Url"},"content_type":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Content Type"}},"additionalProperties":false,"type":"object","required":["name","url"],"title":"Attachment","description":"A file the person hands the agent: a sample, a screenshot, a page of docs. Where it can be read from,\nover HTTPS; this server never stores its bytes."},"Attempt":{"properties":{"org":{"type":"string","title":"Org","description":"Internal: the key its workspace's data is kept under: the organization's ID for its Default workspace, or the workspace's ID for any other."},"id":{"type":"string","title":"Id","description":"The request's ID."},"run_id":{"type":"string","title":"Run Id","description":"Its run's ID."},"stage":{"type":"string","title":"Stage","description":"The step that sent it, by its `id`."},"unit":{"type":"string","title":"Unit","description":"What it asked about: a row's ID, or a packed request's key."},"status":{"$ref":"#/components/schemas/AttemptStatus","description":"`dispatching` while it's out, then `succeeded` or `failed`; `unknown` when its outcome was lost, or `superseded` when another request's answer was kept instead."},"body":{"additionalProperties":true,"type":"object","title":"Body","description":"Internal detail, whose shape can change, such as where its prompt and reply are stored."},"created":{"type":"number","title":"Created","description":"When it was sent, in seconds since 1970."}},"additionalProperties":false,"type":"object","required":["org","id","run_id","stage","unit","status","body","created"],"title":"Attempt","description":"A request a run sent to a model."},"AttemptList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Attempt"},"type":"array","title":"Items","description":"The requests, oldest first."},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset","description":"Where the next page starts: send it back as `offset`. Null on the last page."}},"additionalProperties":false,"type":"object","required":["items","next_offset"],"title":"AttemptList","description":"A page of the requests a run sent to models."},"AttemptStatus":{"type":"string","enum":["dispatching","succeeded","failed","unknown","superseded"],"title":"AttemptStatus"},"AuthMode":{"type":"string","enum":["local","clerk"],"title":"AuthMode"},"Billing":{"properties":{"runs":{"$ref":"#/components/schemas/BillingMode","default":"off"},"agent_planner":{"$ref":"#/components/schemas/BillingMode","default":"off"},"agent_data_prep":{"$ref":"#/components/schemas/BillingMode","default":"off"}},"additionalProperties":false,"type":"object","title":"Billing","description":"How each kind of work is paid for: workflow runs, the planner, and the data prep agent."},"BillingMode":{"type":"string","enum":["credits","off"],"title":"BillingMode","description":"How a kind of work is paid for: from the organization's credits, or not at all."},"Body_upload_v1_uploads_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A CSV, JSON, JSON Lines or text file."},"name":{"type":"string","title":"Name","description":"The dataset's name, such as `Customer reviews`.","examples":["Customer reviews"]},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"What the file is, in a sentence, for the planner. A new version keeps the dataset's when it's left out or empty; clear it with `PATCH /v1/datasets/{dataset_id}`.","examples":["Reviews from the online shop, one per row."]},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id","description":"A dataset to add the file to as its newest version.","examples":["ds_4b1e9c07a2d84f6e9b30"]}},"type":"object","required":["file","name"],"title":"Body_upload_v1_uploads_post"},"Brief":{"properties":{"session_id":{"type":"string","title":"Session Id"},"status":{"$ref":"#/components/schemas/AgentStatus"},"instructions":{"type":"string","maxLength":2000,"minLength":1,"title":"Instructions"},"sources":{"items":{"$ref":"#/components/schemas/SourceFacts"},"type":"array","title":"Sources"},"attachments":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array","title":"Attachments"},"actions":{"items":{"oneOf":[{"$ref":"#/components/schemas/Choice"},{"$ref":"#/components/schemas/Feedback"},{"$ref":"#/components/schemas/Accept"},{"$ref":"#/components/schemas/RunAll"},{"$ref":"#/components/schemas/Stop"}],"discriminator":{"propertyName":"kind","mapping":{"accept":"#/components/schemas/Accept","answer":"#/components/schemas/Choice","feedback":"#/components/schemas/Feedback","run":"#/components/schemas/RunAll","stop":"#/components/schemas/Stop"}}},"type":"array","title":"Actions"},"validation":{"anyOf":[{"$ref":"#/components/schemas/CandidateValidation"},{"type":"null"}]},"validation_attempts":{"type":"integer","title":"Validation Attempts","default":0},"validation_attempts_limit":{"type":"integer","title":"Validation Attempts Limit","default":4}},"additionalProperties":false,"type":"object","required":["session_id","status","instructions","sources","attachments","actions"],"title":"Brief","description":"`GET /v1/agent-callbacks/{id}`: what the agent works from. Re-readable at any time."},"Calibration":{"properties":{"slope":{"type":"number","exclusiveMinimum":0.0,"title":"Slope","description":"How much the correction stretches the scores: 1 only moves them."},"offset":{"type":"number","title":"Offset","description":"How far the correction moves the scores, in levels of the scale."},"levels":{"type":"integer","minimum":2.0,"title":"Levels","description":"How many levels the scale it was fitted on has."},"known":{"type":"integer","minimum":1.0,"title":"Known","description":"How many known answers it was fitted from."},"run_id":{"type":"string","minLength":1,"title":"Run Id","description":"The run whose checks those known answers were."}},"additionalProperties":false,"type":"object","required":["slope","offset","levels","known","run_id"],"title":"Calibration","description":"A score question's correction: each answer's score becomes offset + slope × score, kept on the scale.\n\nIt's kept in definitions, which are read again whenever a run or a workflow is, so its rules are only\nwhat any correction keeps; how one is fitted, such as from how many known answers, may change."},"CalibrationList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ScoreCalibration"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"CalibrationList","description":"How each score question a run's checks mark could be calibrated from them."},"CallerKind":{"type":"string","enum":["person","api_key"],"title":"CallerKind","description":"Who sent a request: a person signed in to the app, or a program with an API key."},"CandidateChecks":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/RequiredField"},"type":"array","maxItems":100,"title":"Fields"},"unique_key":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Unique Key"},"date_window":{"anyOf":[{"$ref":"#/components/schemas/DateWindow"},{"type":"null"}]},"minimum_match_rate":{"additionalProperties":{"type":"number","maximum":1.0,"minimum":0.0},"type":"object","maxProperties":20,"title":"Minimum Match Rate"}},"additionalProperties":false,"type":"object","title":"CandidateChecks"},"CandidateValidation":{"properties":{"fingerprint":{"type":"string","title":"Fingerprint","default":""},"status":{"type":"string","enum":["blocked","preflight","running","ready"],"title":"Status","default":"preflight"},"issues":{"items":{"$ref":"#/components/schemas/ValidationIssue"},"type":"array","title":"Issues"},"stages":{"items":{"$ref":"#/components/schemas/StageEvidence"},"type":"array","title":"Stages"},"source_rows":{"additionalProperties":{"type":"integer"},"type":"object","title":"Source Rows"},"source_more":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Source More"},"source_fields":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Source Fields"},"snapshots":{"additionalProperties":{"type":"string"},"type":"object","title":"Snapshots"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"output":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Output"},"fields":{"items":{"type":"string"},"type":"array","title":"Fields"},"checked_at":{"type":"number","title":"Checked At","default":0},"model_steps_executed":{"type":"boolean","title":"Model Steps Executed","default":false},"scope":{"type":"string","title":"Scope","default":"Bounded sample; full-data completeness and later schema changes are not verified."}},"additionalProperties":false,"type":"object","title":"CandidateValidation"},"CatalogModel":{"properties":{"id":{"type":"string","title":"Id","description":"The model's ID, as a step's `model` names it."},"name":{"type":"string","title":"Name","description":"Its name, such as `Jev 1.14`."},"provider":{"type":"string","title":"Provider","description":"Who serves it, such as `typesafe`."},"wire_model":{"type":"string","title":"Wire Model","description":"The model the provider is asked for, such as `jev-1.14.0`."},"endpoint":{"type":"string","title":"Endpoint","description":"Where it's asked; empty for a practice model."},"max_options":{"type":"integer","title":"Max Options","description":"The most options a question may have."},"max_questions":{"type":"integer","title":"Max Questions","description":"The most questions one request may ask."},"max_state_tokens":{"type":"integer","title":"Max State Tokens","description":"The most tokens a request's state and its longest question may have."},"max_total_tokens":{"type":"integer","title":"Max Total Tokens","description":"The most tokens a request's state and all its questions may have."},"max_question_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Question Tokens","description":"The most tokens one question may have apart from the state, for a model that reads each question apart; null when it has no such limit."},"bytes_per_token":{"type":"number","title":"Bytes Per Token","description":"How many bytes of a request make a token, for sizing requests."},"request_overhead_tokens":{"type":"integer","title":"Request Overhead Tokens","description":"The tokens the model adds to every request."},"request_headroom":{"type":"number","title":"Request Headroom","description":"The share of each token limit a request may fill."},"option_bytes_per_token":{"type":"number","title":"Option Bytes Per Token","description":"How many bytes of a question's options make a token."},"option_tokens":{"type":"number","title":"Option Tokens","description":"The tokens the model adds for each option."},"member_bytes_per_token":{"type":"number","title":"Member Bytes Per Token","description":"How many bytes of a group's members make a token."},"member_tokens":{"type":"number","title":"Member Tokens","description":"The tokens the model adds for each member of a group."},"confidence_origin":{"type":"string","title":"Confidence Origin","description":"Where its answers' confidence comes from."},"probability_origin":{"type":"string","title":"Probability Origin","description":"Where its answers' probabilities come from."},"requests_per_minute":{"type":"integer","title":"Requests Per Minute","description":"The most requests it takes a minute."},"tokens_per_second":{"type":"integer","title":"Tokens Per Second","description":"The most tokens it takes a second."},"quota_scope":{"type":"string","title":"Quota Scope","description":"The quota its limits count against, such as `typesafe-account`."},"probability_decimal_places":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Probability Decimal Places","description":"The decimal places it rounds probabilities to; null when it doesn't round them."},"price_usd_per_million_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Usd Per Million Tokens","description":"What it costs you, in US dollars per million tokens; null while it has no price."},"max_input_tokens":{"type":"integer","title":"Max Input Tokens","description":"The same as `max_state_tokens`, for older programs."},"configured":{"type":"boolean","title":"Configured","description":"Whether this server can ask it: a practice model, or one whose keys are set."},"fixture":{"type":"boolean","title":"Fixture","description":"Whether it's a practice model, which gives made-up answers for free."},"endpoint_identity_pinned":{"type":"boolean","title":"Endpoint Identity Pinned","description":"Whether its address always serves this exact model; false for a hosted provider's, which serves whichever version it names."},"weights_version_pinned":{"type":"boolean","title":"Weights Version Pinned","description":"Whether its weights can never change, as a practice model's."}},"additionalProperties":false,"type":"object","required":["id","name","provider","wire_model","endpoint","max_options","max_questions","max_state_tokens","max_total_tokens","max_question_tokens","bytes_per_token","request_overhead_tokens","request_headroom","option_bytes_per_token","option_tokens","member_bytes_per_token","member_tokens","confidence_origin","probability_origin","requests_per_minute","tokens_per_second","quota_scope","probability_decimal_places","price_usd_per_million_tokens","max_input_tokens","configured","fixture","endpoint_identity_pinned","weights_version_pinned"],"title":"CatalogModel","description":"A model a step can ask: its limits, how requests to it are sized, and its price."},"Check":{"properties":{"id":{"type":"string","title":"Id","description":"The check's ID."},"run_id":{"type":"string","title":"Run Id","description":"Its run's ID."},"node_id":{"type":"string","title":"Node Id","description":"The row whose answer it marks, by its ID."},"question":{"type":"string","title":"Question","description":"The answer's question, by its name in the step."},"verdict":{"$ref":"#/components/schemas/Verdict","description":"Whether the answer is `right` or `wrong`."},"expected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected","description":"The right answer, as the mark named it; null when it named none."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note about the mark; null for none."},"created":{"type":"number","title":"Created","description":"When it was made, in seconds since 1970, as `created_at` says."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"The person who made it, by user ID; null for an API key, and in local mode."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was made.","readOnly":true}},"additionalProperties":false,"type":"object","required":["id","run_id","node_id","question","verdict","expected","note","created","user_id","created_at"],"title":"Check","description":"A stored check."},"CheckList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Check"},"type":"array","title":"Items"},"summary":{"$ref":"#/components/schemas/CheckSummary"}},"additionalProperties":false,"type":"object","required":["items","summary"],"title":"CheckList","description":"A run's checks, oldest first, with how often the checked answers were right."},"CheckRequest":{"properties":{"node_id":{"type":"string","title":"Node Id","description":"The row whose answer it marks, by its ID."},"question":{"type":"string","title":"Question","description":"The answer's question, by its name in the step."},"verdict":{"$ref":"#/components/schemas/Verdict","description":"Whether the answer is `right` or `wrong`."},"expected":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Expected","description":"The right answer, in the form the answer's own label takes, such as `no` or an option's name. A right mark can name only the answer's own label, and a wrong mark only another."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note about the mark, in the person's words."}},"additionalProperties":false,"type":"object","required":["node_id","question","verdict"],"title":"CheckRequest","description":"A mark on one of a run's answers: right or wrong, and what the right answer is."},"CheckSummary":{"properties":{"checked":{"type":"integer","title":"Checked"},"right":{"type":"integer","title":"Right"},"by_question":{"additionalProperties":{"$ref":"#/components/schemas/CheckTally"},"type":"object","title":"By Question"}},"additionalProperties":false,"type":"object","required":["checked","right","by_question"],"title":"CheckSummary","description":"The run's tally, overall and for each question."},"CheckTally":{"properties":{"checked":{"type":"integer","title":"Checked"},"right":{"type":"integer","title":"Right"}},"additionalProperties":false,"type":"object","required":["checked","right"],"title":"CheckTally","description":"How many answers were checked, and how many of those were right."},"Choice":{"properties":{"kind":{"type":"string","const":"answer","title":"Kind","default":"answer"},"option":{"type":"string","maxLength":200,"minLength":1,"title":"Option"},"at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"At"}},"additionalProperties":false,"type":"object","required":["option"],"title":"Choice"},"Column":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[^.\\s][^.]*$","title":"Name"},"path":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":8,"minItems":1,"title":"Path"},"op":{"$ref":"#/components/schemas/Op","default":"copy"},"sep":{"type":"string","maxLength":10,"title":"Sep","default":", "}},"additionalProperties":false,"type":"object","required":["name","path"],"title":"Column"},"Comparison":{"type":"string","enum":["eq","ne","present","absent","contains"],"title":"Comparison"},"CompileFeatures":{"properties":{"packing":{"type":"boolean","title":"Packing"},"sort":{"type":"boolean","title":"Sort"}},"additionalProperties":false,"type":"object","required":["packing","sort"],"title":"CompileFeatures","description":"The definition features this server can run."},"CompileResult":{"properties":{"compiler_version":{"type":"string","title":"Compiler Version"},"definition":{"$ref":"#/components/schemas/Definition"},"order":{"items":{"type":"string"},"type":"array","title":"Order"},"features":{"$ref":"#/components/schemas/CompileFeatures"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"additionalProperties":false,"type":"object","required":["compiler_version","definition","order","features","warnings"],"title":"CompileResult","description":"A definition that passed every compile rule, with its frozen stage order."},"CompileStatus":{"properties":{"ok":{"type":"boolean","title":"Ok"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"additionalProperties":false,"type":"object","required":["ok","errors"],"title":"CompileStatus","description":"Whether a plan's definition passed compile, and why not."},"ConnectIntent":{"properties":{"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/ConnectIntentStatus"},"app":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,99}$","title":"App"},"app_name":{"type":"string","title":"App Name"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"expires":{"type":"number","title":"Expires"},"created":{"type":"number","title":"Created"}},"additionalProperties":false,"type":"object","required":["id","status","app","app_name","name","expires","created"],"title":"ConnectIntent"},"ConnectIntentStatus":{"type":"string","enum":["pending","completed","cancelled","expired","failed"],"title":"ConnectIntentStatus","description":"A connect intent's life: opened for Nango's Connect UI, then finished one way or another."},"ConnectRequest":{"properties":{"app":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,99}$","title":"App"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"additionalProperties":false,"type":"object","required":["app","name"],"title":"ConnectRequest"},"ConnectSession":{"properties":{"intent_id":{"type":"string","title":"Intent Id"},"token":{"type":"string","title":"Token"},"connect_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connect Link"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","required":["intent_id","token"],"title":"ConnectSession","description":"What the app needs to open Nango's Connect UI: a short-lived session, and the intent to poll."},"Connection":{"properties":{"id":{"type":"string","title":"Id"},"app":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,99}$","title":"App"},"app_name":{"type":"string","title":"App Name"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"status":{"$ref":"#/components/schemas/ConnectionStatus"},"created":{"type":"number","title":"Created"}},"additionalProperties":false,"type":"object","required":["id","app","app_name","name","status","created"],"title":"Connection","description":"A connected account, as its owner sees it: never the key, and never Nango's ID for it."},"ConnectionList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Connection"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"ConnectionList"},"ConnectionStatus":{"type":"string","enum":["connected","revoked"],"title":"ConnectionStatus","description":"A connected app's account: usable, or no longer, because its owner disconnected it or Nango lost it."},"ConnectionUpdate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ConnectionUpdate"},"Conversation":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PlannerMessage"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"Conversation","description":"A saved workflow's conversation with the Workflow Planner: its kept lines, oldest first."},"ConversationWrite":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/PlannerMessageWrite"},"type":"array","maxItems":20,"minItems":1,"title":"Messages"}},"additionalProperties":false,"type":"object","required":["messages"],"title":"ConversationWrite","description":"Lines to add to the end of a workflow's planner conversation, in the order they were said."},"CreatedApiKey":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"preset":{"$ref":"#/components/schemas/KeyPreset"},"permissions":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array","title":"Permissions"},"prefix":{"type":"string","title":"Prefix"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"secret":{"type":"string","title":"Secret"}},"additionalProperties":false,"type":"object","required":["id","workspace_id","name","preset","permissions","prefix","created_by","created_at","last_used_at","revoked_at","secret"],"title":"CreatedApiKey","description":"A key just made, with its secret, which this reply is the only one to show."},"CreatedWebhookEndpoint":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"events":{"items":{"$ref":"#/components/schemas/WebhookEvent"},"type":"array","title":"Events"},"enabled":{"type":"boolean","title":"Enabled"},"disabled_reason":{"anyOf":[{"$ref":"#/components/schemas/DisabledReason"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_delivery":{"anyOf":[{"$ref":"#/components/schemas/LastDelivery"},{"type":"null"}]},"secret":{"type":"string","title":"Secret"}},"additionalProperties":false,"type":"object","required":["id","url","description","events","enabled","disabled_reason","created_at","last_delivery","secret"],"title":"CreatedWebhookEndpoint","description":"An address just added, with its signing secret, which this reply is the only one to show."},"CreditBalance":{"properties":{"balance_usd":{"type":"number","title":"Balance Usd","description":"Every grant, less every charge, plus or minus staff changes."},"reserved_usd":{"type":"number","title":"Reserved Usd","description":"What runs still going have set aside."},"available_usd":{"type":"number","title":"Available Usd","description":"Balance less reserved: what a new run's reservation must fit in."}},"additionalProperties":false,"type":"object","required":["balance_usd","reserved_usd","available_usd"],"title":"CreditBalance","description":"The organization's credits, in US dollars. One credit is one dollar."},"CreditHistory":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CreditTransaction"},"type":"array","title":"Items","description":"The changes, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Where the next page starts: send it back as `cursor`. Only when there's more to come."}},"additionalProperties":false,"type":"object","required":["items"],"title":"CreditHistory","description":"A page of the changes to the organization's credits, newest first."},"CreditKind":{"type":"string","enum":["grant","charge","adjustment"],"title":"CreditKind","description":"What a row of an organization's credit history is: credits added, a run's charge, or a staff change."},"CreditPurchase":{"properties":{"amount_usd":{"type":"number","multipleOf":0.01,"maximum":5000.0,"minimum":10.0,"title":"Amount Usd","description":"The credits to buy, in US dollars, from 10 to 5,000, in whole cents."}},"additionalProperties":false,"type":"object","required":["amount_usd"],"title":"CreditPurchase","description":"`POST /v1/credits/purchases`."},"CreditPurchaseResult":{"properties":{"balance_usd":{"type":"number","title":"Balance Usd","description":"Every grant, less every charge, plus or minus staff changes."},"reserved_usd":{"type":"number","title":"Reserved Usd","description":"What runs still going have set aside."},"available_usd":{"type":"number","title":"Available Usd","description":"Balance less reserved: what a new run's reservation must fit in."},"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url","description":"The payment service's page the admin pays on, after which the credits are added; null when they're added already."}},"additionalProperties":false,"type":"object","required":["balance_usd","reserved_usd","available_usd","checkout_url"],"title":"CreditPurchaseResult","description":"`POST /v1/credits/purchases`: the organization's credits, and where the admin pays when it's still to pay."},"CreditTransaction":{"properties":{"id":{"type":"string","title":"Id","description":"The row's ID."},"kind":{"$ref":"#/components/schemas/CreditKind","description":"`grant` for credits added, `charge` for a run's cost, or `adjustment` for a staff change."},"amount_usd":{"type":"number","title":"Amount Usd","description":"What it changed the balance by: negative for a charge."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Where a grant came from: `trial`, `staff`, or the payment plugin, such as `sandbox` or `stripe`; else null."},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id","description":"The run a charge is for; null for the other kinds."},"actor":{"type":"string","title":"Actor","description":"Who caused it: the person's user ID or the API key's ID, `system` for a trial, or `staff` for a change we made."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was made."}},"additionalProperties":false,"type":"object","required":["id","kind","amount_usd","source","run_id","actor","created_at"],"title":"CreditTransaction","description":"One change to an organization's balance."},"Daily":{"properties":{"every":{"type":"string","enum":["day","weekday"],"title":"Every"},"hour":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Hour"},"minute":{"type":"integer","maximum":59.0,"minimum":0.0,"title":"Minute"}},"additionalProperties":false,"type":"object","required":["every","hour","minute"],"title":"Daily","description":"Every day, or every weekday (Monday to Friday), at a time."},"Dataset":{"properties":{"id":{"type":"string","title":"Id","description":"The dataset's ID."},"name":{"type":"string","title":"Name","description":"Its name."},"context":{"type":"string","title":"Context","description":"What its file is, in a sentence, for the planner."},"filename":{"type":"string","title":"Filename","description":"Its newest version's file name."},"snapshots":{"items":{"type":"string"},"type":"array","title":"Snapshots","description":"Its file's versions, oldest first, by snapshot ID."},"latest_snapshot":{"type":"string","title":"Latest Snapshot","description":"Its newest version's snapshot ID."},"record_count":{"type":"integer","title":"Record Count","description":"The rows in its newest version."},"version":{"type":"integer","title":"Version","description":"Its newest version's number, from 1."},"allowed_for_training":{"type":"boolean","title":"Allowed For Training","description":"Whether its answers may train another model.","default":false}},"additionalProperties":false,"type":"object","required":["id","name","context","filename","snapshots","latest_snapshot","record_count","version"],"title":"Dataset","description":"A dataset: its versions, its latest snapshot, and whether its answers may train another model."},"DatasetList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Dataset"},"type":"array","title":"Items","description":"The newest 1,000 datasets, oldest first."}},"additionalProperties":false,"type":"object","required":["items"],"title":"DatasetList","description":"The workspace's datasets."},"DatasetUpdate":{"properties":{"allowed_for_training":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowed For Training","description":"Whether its answers may train another model."},"context":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Context","description":"What its file is, in a sentence, for the planner. An empty string clears it."}},"additionalProperties":false,"type":"object","title":"DatasetUpdate","description":"Changes to a dataset: what's left out stays as it is, and what's sent can't be null."},"DateWindow":{"properties":{"path":{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1,"title":"Path"},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"additionalProperties":false,"type":"object","required":["path","start","end"],"title":"DateWindow"},"Definition":{"properties":{"schema_version":{"type":"string","const":"jevreduce.local.v1","title":"Schema Version","default":"jevreduce.local.v1"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"sources":{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/AppSource"}]},"type":"object","minProperties":1,"title":"Sources"},"stages":{"items":{"oneOf":[{"$ref":"#/components/schemas/Evaluate"},{"$ref":"#/components/schemas/Filter"},{"$ref":"#/components/schemas/Group"},{"$ref":"#/components/schemas/Join"},{"$ref":"#/components/schemas/Sort"},{"$ref":"#/components/schemas/Match"},{"$ref":"#/components/schemas/Reshape"},{"$ref":"#/components/schemas/Tally"}],"discriminator":{"propertyName":"kind","mapping":{"evaluate":"#/components/schemas/Evaluate","filter":"#/components/schemas/Filter","group":"#/components/schemas/Group","join":"#/components/schemas/Join","match":"#/components/schemas/Match","reshape":"#/components/schemas/Reshape","sort":"#/components/schemas/Sort","tally":"#/components/schemas/Tally"}}},"type":"array","maxItems":20,"minItems":1,"title":"Stages"},"labels":{"anyOf":[{"$ref":"#/components/schemas/Labels"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["name","sources","stages"],"title":"Definition"},"DeleteTelemetry":{"properties":{"confirm_org_id":{"$ref":"#/components/schemas/Identifier"}},"additionalProperties":false,"type":"object","required":["confirm_org_id"],"title":"DeleteTelemetry"},"DeliveredRun":{"properties":{"org":{"type":"string","title":"Org","description":"The organization's ID."},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The ID of the workspace it's in."},"id":{"type":"string","title":"Id","description":"The run's ID."},"status":{"$ref":"#/components/schemas/RunStatus","description":"`queued`, `running` or `cancelling` while it's going; then `succeeded`, `completed_with_errors`, `failed` or `cancelled`."},"requests":{"type":"integer","title":"Requests","description":"The requests it has sent to models so far."},"created":{"type":"number","title":"Created","description":"When it was started, in seconds since 1970, as `created_at` says."},"rows":{"anyOf":[{"$ref":"#/components/schemas/RunRows"},{"type":"null"}],"description":"What has happened to its rows so far; null in lists of runs."},"links":{"anyOf":[{"$ref":"#/components/schemas/RunLinks"},{"type":"null"}],"description":"Where it is, in this API and in the app."},"deliveries":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunDelivery"},"type":"array"},{"type":"null"}],"title":"Deliveries","description":"Its results' deliveries to buckets ([] when there are none); null in lists of runs."},"trial":{"type":"boolean","title":"Trial","description":"Whether this is a try run on a sample of the data."},"sample":{"anyOf":[{"$ref":"#/components/schemas/Sample"},{"type":"null"}],"description":"The sample a try run used; null for a full run."},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"The saved workflow this run belongs to; null when it belongs to none."},"labels":{"anyOf":[{"$ref":"#/components/schemas/Labels"},{"type":"null"}],"description":"The dataset's own nouns, saved beside the run's definition."},"workflow_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Version","description":"The saved workflow's version it ran, when it was started from the workflow by its ID."},"started_by":{"anyOf":[{"$ref":"#/components/schemas/RunStarter"},{"type":"null"}],"description":"Who started it; null when that isn't known, such as a run from before runs kept it."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was started."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When it reached its final status; null while it's going, and for runs from before runs kept it."},"max_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Requests","description":"The most requests it may send to models; null for a run whose body doesn't keep it."},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd","description":"Its replies' cost so far at its frozen prices; null when a model it asks has no price."},"reserved_usd":{"type":"number","title":"Reserved Usd","description":"What it set aside from its organization's credits when it started; 0 when runs weren't charged."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"What went wrong, in plain sentences: what stopped it, when it failed, or which rows have no answer\nand why, and what a rerun offers, when it finished with errors. Null otherwise."},"delivery":{"$ref":"#/components/schemas/DeliveryReport","description":"The delivery to one bucket that this message is about."}},"additionalProperties":false,"type":"object","required":["org","workspace_id","id","status","requests","created","rows","links","deliveries","trial","sample","workflow_id","labels","workflow_version","started_by","created_at","finished_at","max_requests","cost_usd","reserved_usd","error","delivery"],"title":"DeliveredRun","description":"The run, as in a message about how it ended, and how the delivery the message is about went."},"DeliveryReport":{"properties":{"destination_id":{"type":"string","title":"Destination Id","description":"The bucket's ID."},"status":{"$ref":"#/components/schemas/DeliveryStatus","description":"`pending` while it's being tried, then `delivered` or `failed`."},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"The file, as `s3://bucket/key`, once it's delivered."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why the file wasn't delivered, in a plain sentence; null once it's delivered."}},"additionalProperties":false,"type":"object","required":["destination_id","status","location","error"],"title":"DeliveryReport","description":"What a `run.delivered` or `run.delivery_failed` message says of the delivery it's about."},"DeliveryStatus":{"type":"string","enum":["pending","delivered","failed"],"title":"DeliveryStatus","description":"Where a delivery, a message to a webhook address or a run's file to a bucket, is: waiting for its next\ntry, delivered, or given up on."},"Destination":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"$ref":"#/components/schemas/DestinationKind","default":"s3"},"bucket":{"type":"string","title":"Bucket"},"region":{"type":"string","title":"Region"},"endpoint_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint Url"},"prefix":{"type":"string","title":"Prefix"},"format":{"$ref":"#/components/schemas/ExportFormat"},"workflows":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Workflows"},"access_key_id":{"type":"string","title":"Access Key Id"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_delivery":{"anyOf":[{"$ref":"#/components/schemas/DestinationLastDelivery"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","kind","bucket","region","endpoint_url","prefix","format","workflows","access_key_id","enabled","created_at","last_delivery"],"title":"Destination","description":"A bucket as people see it: never its secret access key."},"DestinationChange":{"properties":{"bucket":{"type":"string","maxLength":63,"minLength":3,"title":"Bucket"},"region":{"type":"string","maxLength":64,"minLength":1,"title":"Region"},"endpoint_url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Endpoint Url"},"prefix":{"type":"string","maxLength":512,"title":"Prefix"},"format":{"$ref":"#/components/schemas/ExportFormat"},"workflows":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Workflows"},"enabled":{"type":"boolean","title":"Enabled"},"access_key_id":{"type":"string","maxLength":128,"minLength":1,"title":"Access Key Id"},"secret_access_key":{"type":"string","maxLength":256,"minLength":1,"format":"password","title":"Secret Access Key","writeOnly":true}},"additionalProperties":false,"type":"object","title":"DestinationChange","description":"`PATCH /v1/destinations/{destination_id}`: only what changes, since what's left out is kept. Only\n`endpoint_url` (back to AWS S3) and `workflows` (back to every workflow) can be null. A new access key is\nsent as its ID and secret together."},"DestinationKind":{"type":"string","enum":["s3"],"title":"DestinationKind","description":"The kinds of storage a run's results can be delivered to (ADR 0013): today only S3 and the stores\nthat speak its API, such as DigitalOcean Spaces and Cloudflare R2."},"DestinationLastDelivery":{"properties":{"status":{"$ref":"#/components/schemas/DeliveryStatus"},"at":{"type":"string","format":"date-time","title":"At"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"additionalProperties":false,"type":"object","required":["status","at","location","error"],"title":"DestinationLastDelivery","description":"How a bucket's newest delivery went."},"DestinationTest":{"properties":{"ok":{"type":"boolean","title":"Ok"},"detail":{"type":"string","title":"Detail"}},"additionalProperties":false,"type":"object","required":["ok","detail"],"title":"DestinationTest","description":"What Test connection found: `ok`, or a plain sentence saying what's wrong, which isn't an error."},"DisabledReason":{"type":"string","enum":["gone"],"title":"DisabledReason","description":"Why an address was turned off other than by hand."},"Done":{"properties":{"kind":{"type":"string","const":"done","title":"Kind","default":"done"},"summary":{"type":"string","maxLength":1000,"minLength":1,"title":"Summary"},"specs":{"patternProperties":{"^[a-z][a-z0-9_]{0,39}$":{"$ref":"#/components/schemas/ImportSpec"}},"type":"object","maxProperties":6,"title":"Specs"},"stages":{"items":{"oneOf":[{"$ref":"#/components/schemas/Evaluate"},{"$ref":"#/components/schemas/Filter"},{"$ref":"#/components/schemas/Group"},{"$ref":"#/components/schemas/Join"},{"$ref":"#/components/schemas/Sort"},{"$ref":"#/components/schemas/Match"},{"$ref":"#/components/schemas/Reshape"},{"$ref":"#/components/schemas/Tally"}],"discriminator":{"propertyName":"kind","mapping":{"evaluate":"#/components/schemas/Evaluate","filter":"#/components/schemas/Filter","group":"#/components/schemas/Group","join":"#/components/schemas/Join","match":"#/components/schemas/Match","reshape":"#/components/schemas/Reshape","sort":"#/components/schemas/Sort","tally":"#/components/schemas/Tally"}}},"type":"array","maxItems":20,"title":"Stages"},"output":{"anyOf":[{"$ref":"#/components/schemas/Output"},{"type":"null"}]},"checks":{"$ref":"#/components/schemas/CandidateChecks"},"at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"At"}},"additionalProperties":false,"type":"object","required":["summary"],"title":"Done","description":"The agent's result: a spec for every app source, the steps that shape and combine the sources after\nthey're read, and a summary in plain words. Accepting it reads the apps and builds the workflow."},"Dump":{"properties":{"filename":{"type":"string","maxLength":200,"minLength":1,"title":"Filename"},"size":{"type":"integer","exclusiveMinimum":0.0,"title":"Size"},"content_type":{"type":"string","title":"Content Type"}},"additionalProperties":false,"type":"object","required":["filename","size","content_type"],"title":"Dump","description":"`POST /v1/agent-callbacks/{id}/upload`: a table the agent made, to be sent as a file. The reply is an\nupload ticket: where to PUT the bytes, and the `upload_id` to name in `done.output`."},"EmailAnalytics":{"properties":{"days":{"type":"integer","title":"Days"},"messages":{"type":"integer","title":"Messages"},"accepted":{"type":"integer","title":"Accepted"},"events":{"additionalProperties":{"type":"integer"},"type":"object","title":"Events"},"tracking_configured":{"type":"boolean","title":"Tracking Configured"}},"type":"object","required":["days","messages","accepted","events","tracking_configured"],"title":"EmailAnalytics"},"EmailPreferences":{"properties":{"completed":{"type":"boolean","title":"Completed"},"failed":{"type":"boolean","title":"Failed"},"available":{"type":"boolean","title":"Available"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"additionalProperties":false,"type":"object","required":["completed","failed","available","email"],"title":"EmailPreferences"},"EmailPreferencesUpdate":{"properties":{"completed":{"type":"boolean","title":"Completed"},"failed":{"type":"boolean","title":"Failed"}},"additionalProperties":false,"type":"object","required":["completed","failed"],"title":"EmailPreferencesUpdate"},"ErrorBody":{"properties":{"type":{"type":"string","title":"Type","description":"A link to this kind of error on the docs' errors page."},"title":{"type":"string","title":"Title","description":"The kind of error, in a few words."},"status":{"type":"integer","title":"Status","description":"The reply's HTTP status."},"detail":{"type":"string","title":"Detail","description":"One plain sentence saying what happened and what to do."},"code":{"type":"string","title":"Code","description":"The kind of error, for programs to act on, such as `not_found`."},"error":{"type":"string","title":"Error","description":"The same sentence as `detail`."},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"The request's ID, also sent as `X-Trace-ID`. Send it to us if you need help."},"needed_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Needed Usd","description":"For `insufficient_credits`: the most the run can cost, in US dollars."},"available_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Available Usd","description":"For `insufficient_credits`: the credits available, in US dollars."}},"additionalProperties":false,"type":"object","required":["type","title","status","detail","code","error"],"title":"ErrorBody","description":"Every error's body: an RFC 9457 problem, whose `detail` is one plain sentence saying what happened and\nwhat to do. `error` repeats the sentence, which the app reads."},"Estimate":{"properties":{"stages":{"items":{"$ref":"#/components/schemas/StageEstimate"},"type":"array","title":"Stages"},"total":{"$ref":"#/components/schemas/EstimateTotal"},"exact":{"type":"boolean","title":"Exact"},"notes":{"items":{"type":"string"},"type":"array","title":"Notes"}},"additionalProperties":false,"type":"object","required":["stages","total","exact","notes"],"title":"Estimate","description":"Every step's estimate and the total. `exact` is false while sizes are estimated from the file."},"EstimateRequest":{"properties":{"definition":{"$ref":"#/components/schemas/Definition"},"sample":{"anyOf":[{"$ref":"#/components/schemas/Sample"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["definition"],"title":"EstimateRequest","description":"A definition to estimate, and the sample when it's for a try run."},"EstimateTotal":{"properties":{"requests":{"type":"integer","title":"Requests","description":"The requests it would send to models."},"tokens":{"type":"integer","title":"Tokens","description":"The tokens its models would read and write: its requests' and their answers'."},"seconds":{"type":"number","title":"Seconds","description":"About how long it would take, in seconds, its steps one after another."},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd","description":"What it would cost, in US dollars; null when a model it asks has no price."},"highest_request_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Highest Request Usd","description":"The most one of its requests can cost, in US dollars: its dearest model's largest request. Null when a model it asks has no price."}},"additionalProperties":false,"type":"object","required":["requests","tokens","seconds","cost_usd","highest_request_usd"],"title":"EstimateTotal","description":"The whole run's estimated requests, tokens, time and cost."},"Evaluate":{"properties":{"id":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]{0,63}$","title":"Id"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"input":{"type":"string","title":"Input"},"kind":{"type":"string","const":"evaluate","title":"Kind"},"model":{"type":"string","title":"Model"},"state_path":{"items":{"type":"string"},"type":"array","title":"State Path"},"questions":{"additionalProperties":{"$ref":"#/components/schemas/Question"},"type":"object","maxProperties":128,"minProperties":1,"title":"Questions"},"rows_per_request":{"type":"integer","maximum":64.0,"minimum":1.0,"title":"Rows Per Request","default":1}},"additionalProperties":false,"type":"object","required":["id","name","input","model","questions","kind"],"title":"Evaluate","description":"Asks a model questions about each row or group; see https://docs.jevreduce.com/definitions#evaluate."},"ExampleKind":{"type":"string","enum":["row","group","sort","check"],"title":"ExampleKind","description":"What a training example was asked about."},"ExampleSplit":{"type":"string","enum":["train","test"],"title":"ExampleSplit","description":"Whether a training example is for training or kept back for testing."},"ExampleStatus":{"type":"string","enum":["confident","unsure","disagrees","missing"],"title":"ExampleStatus","description":"How far to trust a training example's answer as a label."},"ExportFormat":{"type":"string","enum":["jsonl","csv"],"title":"ExportFormat","description":"The formats a step downloads in: the export route's `format`, and the file a bucket is sent."},"Features":{"properties":{"try_runs":{"type":"boolean","title":"Try Runs"},"progress":{"type":"boolean","title":"Progress"},"estimates":{"type":"boolean","title":"Estimates"},"checks":{"type":"boolean","title":"Checks"},"planner":{"$ref":"#/components/schemas/PlannerMode"},"exports":{"type":"boolean","title":"Exports"},"training_export":{"type":"boolean","title":"Training Export"},"packing":{"type":"boolean","title":"Packing"},"sort":{"type":"boolean","title":"Sort"},"direct_upload":{"type":"boolean","title":"Direct Upload"},"connected_apps":{"type":"boolean","title":"Connected Apps"},"import_agent":{"type":"boolean","title":"Import Agent"},"api_keys":{"type":"boolean","title":"Api Keys"},"webhooks":{"type":"boolean","title":"Webhooks"},"destinations":{"type":"boolean","title":"Destinations"},"answer_totals":{"type":"boolean","title":"Answer Totals"},"slicing":{"type":"boolean","title":"Slicing"},"schedules":{"type":"boolean","title":"Schedules"},"lineage":{"type":"boolean","title":"Lineage"}},"additionalProperties":false,"type":"object","required":["try_runs","progress","estimates","checks","planner","exports","training_export","packing","sort","direct_upload","connected_apps","import_agent","api_keys","webhooks","destinations","answer_totals","slicing","schedules","lineage"],"title":"Features","description":"The switches `/health` reports. Slicing and the switches tied to settings can be off; the rest are on."},"Feedback":{"properties":{"kind":{"type":"string","const":"feedback","title":"Kind","default":"feedback"},"text":{"type":"string","maxLength":2000,"minLength":1,"title":"Text"},"attachments":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array","maxItems":10,"title":"Attachments"},"at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"At"}},"additionalProperties":false,"type":"object","required":["text"],"title":"Feedback"},"FileSource":{"properties":{"kind":{"type":"string","const":"file","title":"Kind","default":"file"},"alias":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","title":"Alias"},"snapshot":{"type":"string","maxLength":100,"minLength":1,"title":"Snapshot"}},"additionalProperties":false,"type":"object","required":["alias","snapshot"],"title":"FileSource","description":"An uploaded or Library file, by its immutable snapshot."},"Filter":{"properties":{"id":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]{0,63}$","title":"Id"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"input":{"type":"string","title":"Input"},"kind":{"type":"string","const":"filter","title":"Kind"},"field":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Field"},"comparison":{"type":"string","enum":["gte","lte","eq"],"title":"Comparison","default":"gte"},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"}],"title":"Value"}},"additionalProperties":false,"type":"object","required":["id","name","input","field","value","kind"],"title":"Filter","description":"Keeps the rows where a field passes a test; see https://docs.jevreduce.com/definitions#filter."},"FullRead":{"properties":{"session_id":{"type":"string","title":"Session Id"},"tables":{"items":{"$ref":"#/components/schemas/Table"},"type":"array","title":"Tables"},"over":{"type":"boolean","title":"Over"},"repairing":{"type":"boolean","title":"Repairing","default":false}},"additionalProperties":false,"type":"object","required":["session_id","tables","over"],"title":"FullRead","description":"`GET /v1/agent-sessions/{id}/run`: how far the full read of an accepted result has got, table by\ntable; `over` once every table is ready or failed."},"GraphRow":{"properties":{"org":{"type":"string","title":"Org","description":"Internal: the key its workspace's data is kept under: the organization's ID for its Default workspace, or the workspace's ID for any other."},"id":{"type":"string","title":"Id","description":"The row's ID."},"run_id":{"type":"string","title":"Run Id","description":"Its run's ID."},"stage":{"type":"string","title":"Stage","description":"The step that wrote it, by its `id`, or `source:` and an input's name for a row read from a file."},"kind":{"type":"string","title":"Kind","description":"What kind of row it is, such as `source` for a row read from a file, or `judgment` for an Ask step's."},"status":{"$ref":"#/components/schemas/NodeStatus","description":"`succeeded`, or why it has no result: `failed`, `unknown`, `review`, `excluded` or `skipped`."},"ordinal":{"type":"integer","title":"Ordinal","description":"Its place among its step's rows, from 0."},"parents":{"items":{"type":"string"},"type":"array","title":"Parents","description":"The IDs of the rows it came from."},"label":{"type":"string","title":"Label","description":"A short name for the row from its data, such as its `name`, `title` or `id`, at most 32 characters."}},"additionalProperties":false,"type":"object","required":["org","id","run_id","stage","kind","status","ordinal","parents","label"],"title":"GraphRow","description":"One of a run's rows, as its graph draws it."},"Group":{"properties":{"id":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]{0,63}$","title":"Id"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"input":{"type":"string","title":"Input"},"kind":{"type":"string","const":"group","title":"Kind"},"key":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Key"}},"additionalProperties":false,"type":"object","required":["id","name","input","key","kind"],"title":"Group","description":"Puts the rows that share a value together; see https://docs.jevreduce.com/definitions#group."},"Health":{"properties":{"status":{"type":"string","const":"ok","title":"Status"},"profile":{"$ref":"#/components/schemas/Profile"},"auth":{"$ref":"#/components/schemas/AuthMode"},"max_records":{"type":"integer","title":"Max Records"},"max_upload_bytes":{"type":"integer","title":"Max Upload Bytes"},"model_concurrency":{"type":"integer","title":"Model Concurrency"},"partition_size":{"type":"integer","title":"Partition Size"},"features":{"$ref":"#/components/schemas/Features"},"limits":{"$ref":"#/components/schemas/Limits"},"billing":{"$ref":"#/components/schemas/Billing","default":{"runs":"off","agent_planner":"off","agent_data_prep":"off"}},"payments":{"$ref":"#/components/schemas/Payments","default":{"test":false}},"planner_models":{"items":{"type":"string"},"type":"array","title":"Planner Models"},"import_agents":{"items":{"type":"string"},"type":"array","title":"Import Agents"}},"additionalProperties":false,"type":"object","required":["status","profile","auth","max_records","max_upload_bytes","model_concurrency","partition_size","features","limits"],"title":"Health","description":"`GET /health`."},"Heard":{"properties":{"status":{"$ref":"#/components/schemas/AgentStatus"},"validation":{"anyOf":[{"$ref":"#/components/schemas/CandidateValidation"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["status"],"title":"Heard","description":"`POST /v1/agent-callbacks/{id}/say`'s reply: the session's status after the message."},"Hourly":{"properties":{"every":{"type":"string","const":"hour","title":"Every"},"minute":{"type":"integer","maximum":59.0,"minimum":0.0,"title":"Minute"}},"additionalProperties":false,"type":"object","required":["every","minute"],"title":"Hourly","description":"Every hour, at a minute past."},"Identifier":{"type":"string","maxLength":160,"minLength":1,"pattern":"^[a-zA-Z0-9_.:/-]+$"},"ImportDraft":{"properties":{"spec":{"anyOf":[{"$ref":"#/components/schemas/ImportSpec"},{"type":"null"}]},"probe":{"anyOf":[{"$ref":"#/components/schemas/ImportProbe"},{"type":"null"}]},"problem":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Problem"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"attempts":{"type":"integer","title":"Attempts"}},"additionalProperties":false,"type":"object","required":["spec","probe","attempts"],"title":"ImportDraft","description":"The planner's draft, checked against the app's first page; or why there is none."},"ImportDraftRequest":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"instructions":{"type":"string","maxLength":2000,"minLength":1,"title":"Instructions"}},"additionalProperties":false,"type":"object","required":["connection_id","instructions"],"title":"ImportDraftRequest","description":"`POST /v1/imports/draft`: which of the caller's accounts to read, and what to read, in their words."},"ImportProbe":{"properties":{"records":{"type":"integer","title":"Records"},"fields":{"items":{"type":"string"},"type":"array","title":"Fields"},"sample":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sample"},"more":{"type":"boolean","title":"More"}},"additionalProperties":false,"type":"object","required":["records","fields","sample","more"],"title":"ImportProbe","description":"What the first page held, read the way the import will: how many records, their fields, and a few."},"ImportProgress":{"properties":{"import_id":{"type":"string","title":"Import Id"},"status":{"$ref":"#/components/schemas/ImportStatus"},"records":{"type":"integer","title":"Records"},"pages":{"type":"integer","title":"Pages"},"dataset":{"anyOf":[{"$ref":"#/components/schemas/Dataset"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"additionalProperties":false,"type":"object","required":["import_id","status","records","pages","dataset","error"],"title":"ImportProgress","description":"`GET /v1/imports/{id}`."},"ImportSpec":{"properties":{"path":{"type":"string","pattern":"^/[A-Za-z0-9._~%!$&'()*+,;=:@/-]{0,499}$","title":"Path"},"method":{"type":"string","enum":["GET","POST"],"title":"Method","default":"GET"},"params":{"additionalProperties":{"type":"string","maxLength":500},"propertyNames":{"maxLength":100,"minLength":1},"type":"object","title":"Params"},"body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body"},"records_path":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":8,"title":"Records Path"},"paging":{"$ref":"#/components/schemas/PagingRule"},"transform":{"anyOf":[{"$ref":"#/components/schemas/Transform"},{"type":"null"}]},"notes":{"items":{"type":"string","maxLength":300},"type":"array","maxItems":8,"title":"Notes"}},"additionalProperties":false,"type":"object","required":["path"],"title":"ImportSpec","description":"What to read from a connected app: one endpoint, its query and body, where its records are, its pages."},"ImportStart":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"context":{"type":"string","title":"Context","default":""},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"},"spec":{"$ref":"#/components/schemas/ImportSpec"},"fields":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":64,"minItems":1},{"type":"null"}],"title":"Fields"}},"additionalProperties":false,"type":"object","required":["connection_id","name","spec"],"title":"ImportStart","description":"`POST /v1/imports`: read an account into a dataset, new or as a new version, with a checked spec."},"ImportStarted":{"properties":{"import_id":{"type":"string","title":"Import Id"},"status":{"type":"string","const":"queued","title":"Status"}},"additionalProperties":false,"type":"object","required":["import_id","status"],"title":"ImportStarted"},"ImportStatus":{"type":"string","enum":["queued","importing","ready","failed"],"title":"ImportStatus","description":"How far an import from a connected app has got: queued for a worker, reading, then ready or failed."},"Imports":{"properties":{"import_ids":{"patternProperties":{"^[a-z][a-z0-9_]{0,39}$":{"type":"string"}},"type":"object","title":"Import Ids"},"upload_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Id"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"}},"additionalProperties":false,"type":"object","title":"Imports","description":"What running the result started: an import per app source, by alias; and the upload of a table the\nagent made, once accepting has put it in the library's way."},"InboxItem":{"properties":{"id":{"type":"string","title":"Id"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"title":{"type":"string","title":"Title"},"href":{"type":"string","title":"Href"},"severity":{"type":"string","enum":["success","error"],"title":"Severity"},"created":{"type":"number","title":"Created"},"read_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Read At"}},"type":"object","required":["id","run_id","title","href","severity","created","read_at"],"title":"InboxItem"},"InboxPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InboxItem"},"type":"array","title":"Items"},"unread":{"type":"integer","title":"Unread"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","unread","total"],"title":"InboxPage"},"Join":{"properties":{"id":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]{0,63}$","title":"Id"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"input":{"type":"string","title":"Input"},"kind":{"type":"string","const":"join","title":"Kind"},"right":{"type":"string","title":"Right"},"left_key":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Left Key"},"right_key":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Right Key"}},"additionalProperties":false,"type":"object","required":["id","name","input","right","left_key","right_key","kind"],"title":"Join","description":"Adds the rows of another input that share a key; see https://docs.jevreduce.com/definitions#join."},"JsonValue":{},"JudgmentKind":{"type":"string","enum":["binary","categorical","ordinal"],"title":"JudgmentKind"},"Keep":{"properties":{"path":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":8,"minItems":1,"title":"Path"},"comparison":{"$ref":"#/components/schemas/Comparison","default":"present"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Value"}},"additionalProperties":false,"type":"object","required":["path"],"title":"Keep","description":"Which rows a transform keeps: those whose value at `path` passes the comparison."},"KeyPreset":{"type":"string","enum":["read_only","run_workflows","full_access"],"title":"KeyPreset","description":"The access an API key is made with, each a set of permissions (ADR 0013)."},"Labels":{"properties":{"row":{"type":"string","title":"Row","default":"row"},"rows":{"type":"string","title":"Rows","default":"rows"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"groups":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Groups"},"origin":{"anyOf":[{"type":"string","const":"user"},{"type":"null"}],"title":"Origin"}},"additionalProperties":false,"type":"object","title":"Labels","description":"The dataset's own nouns for a row and a group, such as \"complaint\" and \"vehicle\"."},"LastDelivery":{"properties":{"status":{"$ref":"#/components/schemas/DeliveryStatus"},"at":{"type":"string","format":"date-time","title":"At"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"}},"additionalProperties":false,"type":"object","required":["status","at","status_code"],"title":"LastDelivery","description":"How an address's newest message went."},"LastTick":{"properties":{"at":{"type":"string","format":"date-time","title":"At"},"outcome":{"$ref":"#/components/schemas/TickOutcome"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"additionalProperties":false,"type":"object","required":["at","outcome"],"title":"LastTick","description":"A schedule's last tick: when it came, what it came to, and why when it started no run."},"LibraryEntry":{"properties":{"id":{"type":"string","title":"Id","description":"The entry's ID."},"name":{"type":"string","title":"Name","description":"Its name."},"document":{"additionalProperties":true,"type":"object","title":"Document","description":"The question, or the query's or workflow's definition."},"version":{"type":"integer","title":"Version","description":"Its version, from 1: send it as `expected_version` to save the next."},"meta":{"anyOf":[{"$ref":"#/components/schemas/ProjectMeta"},{"type":"null"}],"description":"A workflow's details: what it was asked to do, the datasets it was built from, and how it was first made. Null for a question or query, and for a workflow saved without them."}},"additionalProperties":true,"type":"object","required":["id","name","document","version"],"title":"LibraryEntry","description":"A saved question, query or workflow, at its newest version."},"LibraryEntryList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LibraryEntry"},"type":"array","title":"Items","description":"The newest 1,000 entries, oldest first."}},"additionalProperties":false,"type":"object","required":["items"],"title":"LibraryEntryList","description":"Saved questions, queries or workflows, all of one kind."},"LibraryWrite":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"document":{"additionalProperties":true,"type":"object","title":"Document"},"expected_version":{"type":"integer","minimum":0.0,"title":"Expected Version","description":"The entry's version you read, or 0 for a new entry. A save sending any other is refused with 409, so two saves don't overwrite each other.","default":0},"meta":{"anyOf":[{"$ref":"#/components/schemas/ProjectMeta"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["name","document"],"title":"LibraryWrite"},"Limits":{"properties":{"max_records":{"type":"integer","title":"Max Records"},"max_upload_bytes":{"type":"integer","title":"Max Upload Bytes"},"max_run_requests":{"type":"integer","title":"Max Run Requests"}},"additionalProperties":false,"type":"object","required":["max_records","max_upload_bytes","max_run_requests"],"title":"Limits","description":"The biggest upload and run this server accepts."},"ListedRow":{"properties":{"org":{"type":"string","title":"Org","description":"Internal: the key its workspace's data is kept under: the organization's ID for its Default workspace, or the workspace's ID for any other."},"id":{"type":"string","title":"Id","description":"The row's ID."},"run_id":{"type":"string","title":"Run Id","description":"Its run's ID."},"stage":{"type":"string","title":"Stage","description":"The step that wrote it, by its `id`, or `source:` and an input's name for a row read from a file."},"kind":{"type":"string","title":"Kind","description":"What kind of row it is, such as `source` for a row read from a file, or `judgment` for an Ask step's."},"status":{"$ref":"#/components/schemas/NodeStatus","description":"`succeeded`, or why it has no result: `failed`, `unknown`, `review`, `excluded` or `skipped`."},"ordinal":{"type":"integer","title":"Ordinal","description":"Its place among its step's rows, from 0."},"body":{"additionalProperties":true,"type":"object","title":"Body","description":"The row as stored, whose shape can change: what the step read and its answers as `payload`, the rows it came from as `parents`, and the model request that answered as `attempt_id`."},"label":{"type":"string","title":"Label","description":"A short name for the row from its data, such as its `name`, `title` or `id`, at most 32 characters."}},"additionalProperties":false,"type":"object","required":["org","id","run_id","stage","kind","status","ordinal","body","label"],"title":"ListedRow","description":"One of a run's rows, as a page of them lists it."},"Match":{"properties":{"id":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]{0,63}$","title":"Id"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"input":{"type":"string","title":"Input"},"kind":{"type":"string","const":"match","title":"Kind"},"model":{"type":"string","title":"Model"},"fields":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","maxItems":16,"minItems":1,"title":"Fields"},"right":{"type":"string","title":"Right"},"right_key":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Right Key"},"right_fields":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","maxItems":16,"minItems":1,"title":"Right Fields"},"instructions":{"type":"string","maxLength":4000,"minLength":1,"title":"Instructions","default":"Match the same real-world entity, allowing spelling differences and abbreviations. Do not treat related entities or similar names as the same entity without evidence."},"min_probability":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Probability","default":0.85},"min_margin":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Margin","default":0.15}},"additionalProperties":false,"type":"object","required":["id","name","input","model","fields","right","right_key","right_fields","kind"],"title":"Match","description":"Matches each row to an entry in another input; see https://docs.jevreduce.com/definitions#match."},"MetricDescriptor":{"properties":{"operation":{"type":"string","title":"Operation"},"table":{"type":"string","title":"Table"},"metric_type":{"type":"string","title":"Metric Type"},"unit":{"type":"string","title":"Unit"},"samples":{"type":"integer","title":"Samples"},"tag_keys":{"items":{"type":"string"},"type":"array","title":"Tag Keys"}},"additionalProperties":false,"type":"object","required":["operation","table","metric_type","unit","samples","tag_keys"],"title":"MetricDescriptor"},"MetricEntity":{"properties":{"kind":{"$ref":"#/components/schemas/Identifier"},"id":{"$ref":"#/components/schemas/Identifier"}},"additionalProperties":false,"type":"object","required":["kind","id"],"title":"MetricEntity"},"MetricEntityPage":{"properties":{"entities":{"items":{"$ref":"#/components/schemas/MetricEntityRollup"},"type":"array","title":"Entities"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"additionalProperties":false,"type":"object","required":["entities"],"title":"MetricEntityPage"},"MetricEntityRollup":{"properties":{"kind":{"$ref":"#/components/schemas/Identifier"},"id":{"$ref":"#/components/schemas/Identifier"},"event_count":{"type":"integer","title":"Event Count"},"failures":{"type":"integer","title":"Failures"}},"additionalProperties":false,"type":"object","required":["kind","id","event_count","failures"],"title":"MetricEntityRollup"},"MetricEvent":{"properties":{"schema_version":{"type":"string","const":"jr.metric.v1","title":"Schema Version","default":"jr.metric.v1"},"id":{"$ref":"#/components/schemas/Identifier"},"org_id":{"$ref":"#/components/schemas/Identifier"},"trace_id":{"$ref":"#/components/schemas/Identifier"},"parent_id":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}]},"operation":{"$ref":"#/components/schemas/Identifier"},"status":{"type":"string","enum":["succeeded","failed","cancelled","running"],"title":"Status"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"measures":{"$ref":"#/components/schemas/MetricMeasures"},"entities":{"items":{"$ref":"#/components/schemas/MetricEntity"},"type":"array","title":"Entities"},"tags":{"$ref":"#/components/schemas/MetricTags"}},"additionalProperties":false,"type":"object","required":["id","org_id","trace_id","operation","status","started_at","finished_at","measures"],"title":"MetricEvent"},"MetricMeasures":{"properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"unit":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}]},"metric_type":{"anyOf":[{"type":"string","enum":["counter","gauge","duration"]},{"type":"null"}],"title":"Metric Type"},"duration_ms":{"type":"number","minimum":0.0,"title":"Duration Ms","default":0},"provider_ms":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Provider Ms"},"queue_ms":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Queue Ms"},"size_bytes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Size Bytes"},"record_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Record Count"},"attempt":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Attempt"},"input_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Output Tokens"},"quoted_nano_usd":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Quoted Nano Usd"},"http_status":{"anyOf":[{"type":"integer","maximum":599.0,"minimum":100.0},{"type":"null"}],"title":"Http Status"}},"additionalProperties":false,"type":"object","title":"MetricMeasures"},"MetricPage":{"properties":{"events":{"items":{"$ref":"#/components/schemas/MetricEvent"},"type":"array","title":"Events"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"additionalProperties":false,"type":"object","required":["events"],"title":"MetricPage"},"MetricPoint":{"properties":{"timestamp":{"type":"integer","title":"Timestamp"},"group":{"anyOf":[{"$ref":"#/components/schemas/TagValue"},{"type":"null"}]},"value":{"type":"number","title":"Value"},"samples":{"type":"integer","title":"Samples"}},"additionalProperties":false,"type":"object","required":["timestamp","group","value","samples"],"title":"MetricPoint"},"MetricRollup":{"properties":{"operation":{"type":"string","title":"Operation"},"count":{"type":"integer","title":"Count"},"failures":{"type":"integer","title":"Failures"},"average_ms":{"type":"number","title":"Average Ms"},"maximum_ms":{"type":"number","title":"Maximum Ms"},"value_sum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Sum"},"value_average":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Average"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"metric_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metric Type"}},"additionalProperties":false,"type":"object","required":["operation","count","failures","average_ms","maximum_ms"],"title":"MetricRollup"},"MetricSeries":{"properties":{"metric":{"type":"string","title":"Metric"},"measure":{"type":"string","title":"Measure"},"aggregation":{"type":"string","title":"Aggregation"},"bucket_seconds":{"type":"integer","title":"Bucket Seconds"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group By"},"points":{"items":{"$ref":"#/components/schemas/MetricPoint"},"type":"array","title":"Points"}},"additionalProperties":false,"type":"object","required":["metric","measure","aggregation","bucket_seconds","group_by","points"],"title":"MetricSeries"},"MetricSummary":{"properties":{"org_id":{"$ref":"#/components/schemas/Identifier"},"since":{"type":"string","format":"date-time","title":"Since"},"until":{"type":"string","format":"date-time","title":"Until"},"event_count":{"type":"integer","title":"Event Count"},"failures":{"type":"integer","title":"Failures"},"p50_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Ms"},"p95_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Ms"},"operations":{"items":{"$ref":"#/components/schemas/MetricRollup"},"type":"array","title":"Operations"}},"additionalProperties":false,"type":"object","required":["org_id","since","until","event_count","failures","p50_ms","p95_ms","operations"],"title":"MetricSummary"},"MetricTagPage":{"properties":{"key":{"$ref":"#/components/schemas/TagKey"},"groups":{"items":{"$ref":"#/components/schemas/MetricTagRollup"},"type":"array","title":"Groups"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"additionalProperties":false,"type":"object","required":["key","groups"],"title":"MetricTagPage"},"MetricTagRollup":{"properties":{"value":{"$ref":"#/components/schemas/TagValue"},"event_count":{"type":"integer","title":"Event Count"},"failures":{"type":"integer","title":"Failures"},"average_ms":{"type":"number","title":"Average Ms"}},"additionalProperties":false,"type":"object","required":["value","event_count","failures","average_ms"],"title":"MetricTagRollup"},"MetricTags":{"additionalProperties":{"$ref":"#/components/schemas/TagValue"},"propertyNames":{"$ref":"#/components/schemas/TagKey"},"type":"object","maxProperties":128},"MetricsAccepted":{"properties":{"org_id":{"$ref":"#/components/schemas/Identifier"},"event_ids":{"items":{"$ref":"#/components/schemas/Identifier"},"type":"array","title":"Event Ids"},"status":{"type":"string","const":"queued","title":"Status","default":"queued"}},"additionalProperties":false,"type":"object","required":["org_id","event_ids"],"title":"MetricsAccepted"},"ModelList":{"properties":{"models":{"items":{"$ref":"#/components/schemas/CatalogModel"},"type":"array","title":"Models","description":"Every model this server offers."}},"additionalProperties":false,"type":"object","required":["models"],"title":"ModelList","description":"The models this server offers."},"NewDestination":{"properties":{"bucket":{"type":"string","maxLength":63,"minLength":3,"title":"Bucket"},"region":{"type":"string","maxLength":64,"minLength":1,"title":"Region"},"endpoint_url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Endpoint Url"},"prefix":{"type":"string","maxLength":512,"title":"Prefix","default":""},"format":{"$ref":"#/components/schemas/ExportFormat"},"workflows":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Workflows"},"access_key_id":{"type":"string","maxLength":128,"minLength":1,"title":"Access Key Id"},"secret_access_key":{"type":"string","maxLength":256,"minLength":1,"format":"password","title":"Secret Access Key","writeOnly":true}},"additionalProperties":false,"type":"object","required":["bucket","region","format","access_key_id","secret_access_key"],"title":"NewDestination","description":"`POST /v1/destinations`: a bucket, where in it the files go, as what, for which workflows, and the\naccess key that writes them. `endpoint_url` is for a store other than AWS S3; `workflows` null or left out\nmeans every workflow."},"NewSchedule":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id","description":"The saved workflow to run, at its newest version."},"timetable":{"oneOf":[{"$ref":"#/components/schemas/Hourly"},{"$ref":"#/components/schemas/Daily"},{"$ref":"#/components/schemas/Weekly"}],"title":"Timetable","discriminator":{"propertyName":"every","mapping":{"day":"#/components/schemas/Daily","hour":"#/components/schemas/Hourly","week":"#/components/schemas/Weekly","weekday":"#/components/schemas/Daily"}}},"time_zone":{"type":"string","maxLength":64,"title":"Time Zone","description":"The IANA time zone the timetable's times are in, such as Europe/London."},"max_requests":{"type":"integer","maximum":1000000.0,"minimum":1.0,"title":"Max Requests","description":"The most requests each run may send to models."}},"additionalProperties":false,"type":"object","required":["workflow_id","timetable","time_zone","max_requests"],"title":"NewSchedule","description":"`POST /v1/schedules`: run a saved workflow on a timetable."},"NodeStatus":{"type":"string","enum":["succeeded","failed","unknown","review","excluded","skipped"],"title":"NodeStatus"},"Op":{"type":"string","enum":["copy","text","number","boolean","count","date","join"],"title":"Op","description":"What a column does with the value at its path."},"Output":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"columns":{"items":{"type":"string"},"type":"array","maxItems":64,"minItems":1,"title":"Columns"},"rows":{"type":"integer","minimum":0.0,"title":"Rows"}},"additionalProperties":false,"type":"object","required":["upload_id","columns","rows"],"title":"Output","description":"A table the agent made itself and uploaded through `POST {callback}/upload`: which upload, and the\ncolumns and row count it has, so the person sees the shape before the file is read into the library."},"Paging":{"type":"string","enum":["none","cursor","page","offset"],"title":"Paging","description":"How an import asks a connected app for the page after the first."},"PagingRule":{"properties":{"kind":{"$ref":"#/components/schemas/Paging","default":"none"},"place":{"type":"string","enum":["query","body"],"title":"Place","default":"query"},"param":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Param"},"cursor_path":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":8,"title":"Cursor Path"},"start":{"type":"integer","minimum":0.0,"title":"Start","default":0},"size_param":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Size Param"},"size":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Size"}},"additionalProperties":false,"type":"object","title":"PagingRule","description":"How to ask for the next page, and when to stop asking.\n\nEvery kind stops at an empty page and at the import's page limit; a cursor also stops when the reply\nnames no next page, or names the one just read; a numbered or offset page shorter than the size asked\nfor is the last."},"Payments":{"properties":{"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"test":{"type":"boolean","title":"Test","default":false}},"additionalProperties":false,"type":"object","title":"Payments","description":"The payment plugin admins buy credits through, none when there's none, and whether it moves no money."},"Permission":{"type":"string","enum":["read","run","write"],"title":"Permission","description":"What a caller may do: read, start and stop runs, or change what's saved (ADR 0013)."},"PlanColumns":{"properties":{"text":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Text"},"group":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Group"},"no_group":{"type":"boolean","title":"No Group","default":false}},"additionalProperties":false,"type":"object","title":"PlanColumns","description":"Paths to the text Jev reads and to the field to group by; None lets the planner guess."},"PlanFeedback":{"properties":{"node_id":{"type":"string","title":"Node Id"},"question":{"type":"string","title":"Question"},"verdict":{"$ref":"#/components/schemas/Verdict"},"expected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected"}},"additionalProperties":false,"type":"object","required":["node_id","question","verdict"],"title":"PlanFeedback","description":"A right-or-wrong mark for the planner to learn from."},"PlanQuestion":{"properties":{"text":{"type":"string","title":"Text"},"options":{"items":{"type":"string"},"type":"array","title":"Options"}},"additionalProperties":false,"type":"object","required":["text","options"],"title":"PlanQuestion","description":"The one question the planner asks when it needs to know more."},"PlanRequest":{"properties":{"datasets":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Datasets"},"base_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Base Version"},"goal":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}],"title":"Goal"},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template"},"columns":{"anyOf":[{"$ref":"#/components/schemas/PlanColumns"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Subject"},"previous":{"anyOf":[{"$ref":"#/components/schemas/Definition"},{"type":"null"}]},"answer":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}],"title":"Answer"},"feedback":{"items":{"$ref":"#/components/schemas/PlanFeedback"},"type":"array","maxItems":200,"title":"Feedback"},"labels":{"anyOf":[{"$ref":"#/components/schemas/Labels"},{"type":"null"}]},"model":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Model"},"history":{"items":{"$ref":"#/components/schemas/PlanTurn"},"type":"array","maxItems":12,"title":"History"}},"additionalProperties":false,"type":"object","required":["datasets"],"title":"PlanRequest","description":"What to plan: a `goal` or a starting point (`template`) for a new plan, or an earlier plan as\n`previous` with a new `goal`, an `answer` or `feedback` to revise it. An `answer` without `previous`\nanswers a question the planner asked before any plan existed."},"PlanResult":{"properties":{"definition":{"anyOf":[{"$ref":"#/components/schemas/Definition"},{"type":"null"}]},"base_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Base Version"},"labels":{"$ref":"#/components/schemas/Labels"},"steps":{"items":{"$ref":"#/components/schemas/PlanStep"},"type":"array","title":"Steps"},"question":{"anyOf":[{"$ref":"#/components/schemas/PlanQuestion"},{"type":"null"}]},"changes":{"items":{"type":"string"},"type":"array","title":"Changes"},"notes":{"items":{"type":"string"},"type":"array","title":"Notes"},"compile":{"$ref":"#/components/schemas/CompileStatus"},"planner":{"$ref":"#/components/schemas/PlannerKind"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"validation":{"anyOf":[{"$ref":"#/components/schemas/CandidateValidation"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["definition","base_version","labels","steps","question","changes","notes","compile","planner","model"],"title":"PlanResult","description":"A definition that passed compile, or one question for the user, or errors."},"PlanStep":{"properties":{"stage":{"type":"string","title":"Stage"},"title":{"type":"string","title":"Title"},"detail":{"type":"string","title":"Detail"}},"additionalProperties":false,"type":"object","required":["stage","title","detail"],"title":"PlanStep","description":"One plain step of a plan, as the plan shows it."},"PlanTurn":{"properties":{"from":{"$ref":"#/components/schemas/Speaker"},"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"}},"additionalProperties":false,"type":"object","required":["from","text"],"title":"PlanTurn","description":"One earlier line of the conversation a request comes from: who said it, and what."},"PlannerKind":{"type":"string","enum":["template","agent","practice"],"title":"PlannerKind","description":"Which path wrote a plan."},"PlannerMessage":{"properties":{"seq":{"type":"integer","title":"Seq"},"from":{"$ref":"#/components/schemas/Speaker"},"text":{"type":"string","title":"Text"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"changes":{"items":{"type":"string"},"type":"array","title":"Changes"},"created":{"type":"number","title":"Created"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was kept.","readOnly":true}},"additionalProperties":false,"type":"object","required":["seq","from","text","model","changes","created","created_at"],"title":"PlannerMessage","description":"One kept line, numbered from 0 in the order it was added to its workflow's conversation."},"PlannerMessageWrite":{"properties":{"from":{"$ref":"#/components/schemas/Speaker"},"text":{"type":"string","maxLength":8000,"minLength":1,"title":"Text"},"model":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Model"},"changes":{"items":{"type":"string","maxLength":500},"type":"array","maxItems":40,"title":"Changes"}},"additionalProperties":false,"type":"object","required":["from","text"],"title":"PlannerMessageWrite","description":"One line to keep: who said it and what, and for the planner's, the writing model and what it changed."},"PlannerMode":{"type":"string","enum":["agent","practice","off"],"title":"PlannerMode","description":"Which planner `/health` reports: a writing model, the starting points only, or none."},"Preview":{"properties":{"kind":{"type":"string","const":"preview","title":"Kind","default":"preview"},"alias":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","title":"Alias"},"fields":{"items":{"type":"string"},"type":"array","maxItems":64,"title":"Fields"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":50,"title":"Rows"},"spec":{"anyOf":[{"$ref":"#/components/schemas/ImportSpec"},{"type":"null"}]},"transform":{"anyOf":[{"$ref":"#/components/schemas/Transform"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}],"title":"Note"},"problem":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}],"title":"Problem"},"at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"At"}},"additionalProperties":false,"type":"object","required":["alias","fields","rows"],"title":"Preview","description":"Rows this server made from a bounded sample the proposal's way; what the person sees as a table."},"Probe":{"properties":{"alias":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","title":"Alias"},"spec":{"anyOf":[{"$ref":"#/components/schemas/ImportSpec"},{"type":"null"}]},"transform":{"anyOf":[{"$ref":"#/components/schemas/Transform"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["alias"],"title":"Probe","description":"`POST /v1/agent-callbacks/{id}/probe`: read a bounded sample of one source, a spec's way for an app."},"Profile":{"type":"string","enum":["local","managed"],"title":"Profile"},"Progress":{"properties":{"kind":{"type":"string","const":"progress","title":"Kind","default":"progress"},"text":{"type":"string","maxLength":1000,"minLength":1,"title":"Text"},"at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"At"}},"additionalProperties":false,"type":"object","required":["text"],"title":"Progress","description":"What the agent is checking or trying now, in a sentence or two."},"ProjectMeta":{"properties":{"goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal"},"datasets":{"items":{"type":"string"},"type":"array","title":"Datasets"},"created_from":{"$ref":"#/components/schemas/ProjectOrigin","default":"blank"}},"additionalProperties":false,"type":"object","title":"ProjectMeta","description":"A project's details, saved beside its workflow so the document stays a bare definition."},"ProjectOrigin":{"type":"string","enum":["template","planner","blank","agent"],"title":"ProjectOrigin","description":"How a project's workflow was first made."},"Proposal":{"properties":{"kind":{"type":"string","const":"preview","title":"Kind","default":"preview"},"alias":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","title":"Alias"},"spec":{"anyOf":[{"$ref":"#/components/schemas/ImportSpec"},{"type":"null"}]},"transform":{"anyOf":[{"$ref":"#/components/schemas/Transform"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}],"title":"Note"}},"additionalProperties":false,"type":"object","required":["alias"],"title":"Proposal","description":"A shape the agent proposes for one source: for an app, what to read and how to shape each record;\nfor a file, how to shape each row. This server reads a bounded sample the proposal's way and shows the\nrows it made as a `preview`."},"PublicRun":{"properties":{"org":{"type":"string","title":"Org","description":"The organization's ID."},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The ID of the workspace it's in."},"id":{"type":"string","title":"Id","description":"The run's ID."},"status":{"$ref":"#/components/schemas/RunStatus","description":"`queued`, `running` or `cancelling` while it's going; then `succeeded`, `completed_with_errors`, `failed` or `cancelled`."},"requests":{"type":"integer","title":"Requests","description":"The requests it has sent to models so far."},"created":{"type":"number","title":"Created","description":"When it was started, in seconds since 1970, as `created_at` says."},"rows":{"anyOf":[{"$ref":"#/components/schemas/RunRows"},{"type":"null"}],"description":"What has happened to its rows so far; null in lists of runs."},"links":{"anyOf":[{"$ref":"#/components/schemas/RunLinks"},{"type":"null"}],"description":"Where it is, in this API and in the app."},"deliveries":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunDelivery"},"type":"array"},{"type":"null"}],"title":"Deliveries","description":"Its results' deliveries to buckets ([] when there are none); null in lists of runs."},"trial":{"type":"boolean","title":"Trial","description":"Whether this is a try run on a sample of the data."},"sample":{"anyOf":[{"$ref":"#/components/schemas/Sample"},{"type":"null"}],"description":"The sample a try run used; null for a full run."},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"The saved workflow this run belongs to; null when it belongs to none."},"labels":{"anyOf":[{"$ref":"#/components/schemas/Labels"},{"type":"null"}],"description":"The dataset's own nouns, saved beside the run's definition."},"workflow_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Version","description":"The saved workflow's version it ran, when it was started from the workflow by its ID."},"started_by":{"anyOf":[{"$ref":"#/components/schemas/RunStarter"},{"type":"null"}],"description":"Who started it; null when that isn't known, such as a run from before runs kept it."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was started."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When it reached its final status; null while it's going, and for runs from before runs kept it."},"max_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Requests","description":"The most requests it may send to models; null for a run whose body doesn't keep it."},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd","description":"Its replies' cost so far at its frozen prices; null when a model it asks has no price."},"reserved_usd":{"type":"number","title":"Reserved Usd","description":"What it set aside from its organization's credits when it started; 0 when runs weren't charged."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"What went wrong, in plain sentences: what stopped it, when it failed, or which rows have no answer\nand why, and what a rerun offers, when it finished with errors. Null otherwise."}},"additionalProperties":false,"type":"object","required":["org","workspace_id","id","status","requests","created","rows","links","deliveries","trial","sample","workflow_id","labels","workflow_version","started_by","created_at","finished_at","max_requests","cost_usd","reserved_usd","error"],"title":"PublicRun","description":"The run, as `GET /v1/runs/{ident}` returns it, with its rows counted, but without its `body`, `dispatched` and `trace_*` fields."},"Question":{"properties":{"type":{"type":"string","enum":["noul","choice","score"],"title":"Type"},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Instructions"},"criteria":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Criteria"},"calibration":{"anyOf":[{"$ref":"#/components/schemas/Calibration"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["type","instructions"],"title":"Question"},"QuestionTotals":{"properties":{"question":{"type":"string","title":"Question","description":"The question's name in the step, as its answers are keyed."},"answered":{"type":"integer","title":"Answered","description":"How many of the step's rows have an answer to it."},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts","description":"How many answers read as each label: yes and no, each option, or each level of a scale, every one listed even at 0, in the question's own order."},"shares":{"additionalProperties":{"type":"number"},"type":"object","title":"Shares","description":"Each label's count as a share of those answered, to 4 places."},"most_common":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Most Common","description":"The label with the biggest count, the first in the question's order on a tie; null when no row has an answer."},"average":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average","description":"A scale's scores averaged, 0 being its first level; null for other questions."},"calibrated_average":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calibrated Average","description":"A corrected scale's corrected scores averaged (ADR 0014); null when it has no correction."},"close_calls":{"type":"integer","title":"Close Calls","description":"How many of the answers are close calls, where Jev wasn't sure."}},"additionalProperties":false,"type":"object","required":["question","answered","counts","shares","most_common","close_calls"],"title":"QuestionTotals","description":"One question's answers added up over every row an Ask step has answered (ADR 0016)."},"QuestionType":{"type":"string","enum":["noul","choice","score"],"title":"QuestionType","description":"Typed question primitives (TypeSafe question kinds)."},"Replay":{"properties":{"models":{"additionalProperties":{"type":"string"},"type":"object","title":"Models","description":"Other models for some of its model steps, by the step's `id`. Choosing them needs `write`."},"max_requests":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":1.0},{"type":"null"}],"title":"Max Requests","description":"The most requests the rerun may send to models. Required for API keys; the run's own when a person leaves it out."}},"additionalProperties":false,"type":"object","title":"Replay","description":"A rerun of what a run ran, on the same files, optionally with other models."},"ReportMetric":{"properties":{"name":{"type":"string","pattern":"^custom\\.[a-zA-Z][a-zA-Z0-9_.-]{0,100}$","title":"Name"},"value":{"type":"number","title":"Value"},"metric_type":{"type":"string","enum":["counter","gauge","duration"],"title":"Metric Type","default":"counter"},"unit":{"$ref":"#/components/schemas/Identifier","default":"count"},"tags":{"additionalProperties":{"$ref":"#/components/schemas/TagValue"},"propertyNames":{"$ref":"#/components/schemas/TagKey"},"type":"object","maxProperties":64,"title":"Tags"},"entities":{"items":{"$ref":"#/components/schemas/MetricEntity"},"type":"array","maxItems":50,"title":"Entities"},"trace_id":{"anyOf":[{"$ref":"#/components/schemas/Identifier"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["name","value"],"title":"ReportMetric"},"ReportMetrics":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/ReportMetric"},"type":"array","maxItems":100,"minItems":1,"title":"Metrics"}},"additionalProperties":false,"type":"object","required":["metrics"],"title":"ReportMetrics"},"RequiredField":{"properties":{"path":{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1,"title":"Path"},"type":{"anyOf":[{"type":"string","enum":["string","number","boolean","object","array"]},{"type":"null"}],"title":"Type"},"nullable":{"type":"boolean","title":"Nullable","default":false}},"additionalProperties":false,"type":"object","required":["path"],"title":"RequiredField"},"Reshape":{"properties":{"id":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]{0,63}$","title":"Id"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"input":{"type":"string","title":"Input"},"kind":{"type":"string","const":"reshape","title":"Kind"},"transform":{"$ref":"#/components/schemas/Transform"}},"additionalProperties":false,"type":"object","required":["id","name","input","transform","kind"],"title":"Reshape","description":"Shapes each row into the columns you name; see https://docs.jevreduce.com/definitions#reshape."},"RowDetail":{"properties":{"org":{"type":"string","title":"Org","description":"Internal: the key its workspace's data is kept under: the organization's ID for its Default workspace, or the workspace's ID for any other."},"id":{"type":"string","title":"Id","description":"The row's ID."},"run_id":{"type":"string","title":"Run Id","description":"Its run's ID."},"stage":{"type":"string","title":"Stage","description":"The step that wrote it, by its `id`, or `source:` and an input's name for a row read from a file."},"kind":{"type":"string","title":"Kind","description":"What kind of row it is, such as `source` for a row read from a file, or `judgment` for an Ask step's."},"status":{"$ref":"#/components/schemas/NodeStatus","description":"`succeeded`, or why it has no result: `failed`, `unknown`, `review`, `excluded` or `skipped`."},"ordinal":{"type":"integer","title":"Ordinal","description":"Its place among its step's rows, from 0."},"body":{"additionalProperties":true,"type":"object","title":"Body","description":"The row as stored, whose shape can change: what the step read and its answers as `payload`, the rows it came from as `parents`, and the model request that answered as `attempt_id`."},"attempt":{"anyOf":[{"$ref":"#/components/schemas/Attempt"},{"type":"null"}],"description":"The model request that gave its answers. Only for a row a model answered."}},"additionalProperties":false,"type":"object","required":["org","id","run_id","stage","kind","status","ordinal","body"],"title":"RowDetail","description":"One of a run's rows, with the model request that answered it."},"RowGraph":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/GraphRow"},"type":"array","title":"Nodes","description":"The run's first rows, up to `limit`, step by step."},"truncated":{"type":"boolean","title":"Truncated","description":"Whether the run has more rows than `limit`."},"limit":{"type":"integer","title":"Limit","description":"The most rows asked for."}},"additionalProperties":false,"type":"object","required":["nodes","truncated","limit"],"title":"RowGraph","description":"A run's first rows and the rows each came from, to draw them as a graph."},"RowList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ListedRow"},"type":"array","title":"Items","description":"The rows, step by step, each step's in order."},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset","description":"Where the next page starts: send it back as `offset`. Null on the last page."}},"additionalProperties":false,"type":"object","required":["items","next_offset"],"title":"RowList","description":"A page of a run's rows."},"Run":{"properties":{"org":{"type":"string","title":"Org","description":"The organization's ID."},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The ID of the workspace it's in."},"id":{"type":"string","title":"Id","description":"The run's ID."},"status":{"$ref":"#/components/schemas/RunStatus","description":"`queued`, `running` or `cancelling` while it's going; then `succeeded`, `completed_with_errors`, `failed` or `cancelled`."},"body":{"additionalProperties":true,"type":"object","title":"Body","description":"Internal detail for the app, whose shape can change. Programs should use the typed fields."},"dispatched":{"type":"boolean","title":"Dispatched","description":"For the app: whether a worker has been handed the run."},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id","description":"For Jevreduce's own tracing."},"trace_parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Parent Id","description":"For Jevreduce's own tracing."},"trace_started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Started At","description":"For Jevreduce's own tracing."},"requests":{"type":"integer","title":"Requests","description":"The requests it has sent to models so far."},"created":{"type":"number","title":"Created","description":"When it was started, in seconds since 1970, as `created_at` says."},"rows":{"anyOf":[{"$ref":"#/components/schemas/RunRows"},{"type":"null"}],"description":"What has happened to its rows so far; null in lists of runs."},"links":{"anyOf":[{"$ref":"#/components/schemas/RunLinks"},{"type":"null"}],"description":"Where it is, in this API and in the app."},"deliveries":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunDelivery"},"type":"array"},{"type":"null"}],"title":"Deliveries","description":"Its results' deliveries to buckets ([] when there are none); null in lists of runs."},"trial":{"type":"boolean","title":"Trial","description":"Whether this is a try run on a sample of the data.","readOnly":true},"sample":{"anyOf":[{"$ref":"#/components/schemas/Sample"},{"type":"null"}],"description":"The sample a try run used; null for a full run.","readOnly":true},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"The saved workflow this run belongs to; null when it belongs to none.","readOnly":true},"labels":{"anyOf":[{"$ref":"#/components/schemas/Labels"},{"type":"null"}],"description":"The dataset's own nouns, saved beside the run's definition.","readOnly":true},"workflow_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Version","description":"The saved workflow's version it ran, when it was started from the workflow by its ID.","readOnly":true},"started_by":{"anyOf":[{"$ref":"#/components/schemas/RunStarter"},{"type":"null"}],"description":"Who started it; null when that isn't known, such as a run from before runs kept it.","readOnly":true},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was started.","readOnly":true},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When it reached its final status; null while it's going, and for runs from before runs kept it.","readOnly":true},"max_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Requests","description":"The most requests it may send to models; null for a run whose body doesn't keep it.","readOnly":true},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd","description":"Its replies' cost so far at its frozen prices; null when a model it asks has no price.","readOnly":true},"reserved_usd":{"type":"number","title":"Reserved Usd","description":"What it set aside from its organization's credits when it started; 0 when runs weren't charged.","readOnly":true},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"What went wrong, in plain sentences: what stopped it, when it failed, or which rows have no answer\nand why, and what a rerun offers, when it finished with errors. Null otherwise.","readOnly":true}},"additionalProperties":false,"type":"object","required":["org","id","status","body","dispatched","requests","created","trial","sample","workflow_id","labels","workflow_version","started_by","created_at","finished_at","max_requests","cost_usd","reserved_usd","error"],"title":"Run","description":"A run as the API returns it: its stored row, plus details lifted from its body."},"RunAll":{"properties":{"kind":{"type":"string","const":"run","title":"Kind","default":"run"},"at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"At"}},"additionalProperties":false,"type":"object","title":"RunAll","description":"Read every app the accepted result names in full, each into its own table, with the frozen columns."},"RunCancelledMessage":{"properties":{"type":{"type":"string","const":"run.cancelled","title":"Type","description":"The event."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When it happened."},"data":{"$ref":"#/components/schemas/PublicRun","description":"The run."}},"additionalProperties":false,"type":"object","required":["type","timestamp","data"],"title":"RunCancelledMessage","description":"A message about how a full run ended."},"RunCompletedWithErrorsMessage":{"properties":{"type":{"type":"string","const":"run.completed_with_errors","title":"Type","description":"The event."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When it happened."},"data":{"$ref":"#/components/schemas/PublicRun","description":"The run."}},"additionalProperties":false,"type":"object","required":["type","timestamp","data"],"title":"RunCompletedWithErrorsMessage","description":"A message about how a full run ended."},"RunDeliveredMessage":{"properties":{"type":{"type":"string","const":"run.delivered","title":"Type","description":"The event."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When it happened."},"data":{"$ref":"#/components/schemas/DeliveredRun","description":"The run, and the delivery."}},"additionalProperties":false,"type":"object","required":["type","timestamp","data"],"title":"RunDeliveredMessage","description":"A message about how saving a run's results in one of the workspace's buckets went. Each bucket sends its own message, with its own `webhook-id`, and it can arrive before the run's own message."},"RunDelivery":{"properties":{"destination_id":{"type":"string","title":"Destination Id","description":"The bucket's ID."},"status":{"$ref":"#/components/schemas/DeliveryStatus","description":"`pending` while it's being tried, then `delivered` or `failed`."},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"The file, as `s3://bucket/key`, once it's delivered."}},"additionalProperties":false,"type":"object","required":["destination_id","status","location"],"title":"RunDelivery","description":"Where a run's results are on their way to one of its workspace's buckets (ADR 0013)."},"RunDeliveryFailedMessage":{"properties":{"type":{"type":"string","const":"run.delivery_failed","title":"Type","description":"The event."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When it happened."},"data":{"$ref":"#/components/schemas/DeliveredRun","description":"The run, and the delivery."}},"additionalProperties":false,"type":"object","required":["type","timestamp","data"],"title":"RunDeliveryFailedMessage","description":"A message about how saving a run's results in one of the workspace's buckets went. Each bucket sends its own message, with its own `webhook-id`, and it can arrive before the run's own message."},"RunEvent":{"properties":{"sequence":{"type":"integer","title":"Sequence","description":"Its number: a later event has a bigger one."},"org":{"type":"string","title":"Org","description":"Internal: the key its workspace's data is kept under: the organization's ID for its Default workspace, or the workspace's ID for any other."},"run_id":{"type":"string","title":"Run Id","description":"Its run's ID."},"entity_id":{"type":"string","title":"Entity Id","description":"What it's about, by ID: the run, or one of its rows."},"kind":{"type":"string","title":"Kind","description":"What happened, such as `run.queued` or `node.published`."},"body":{"additionalProperties":true,"type":"object","title":"Body","description":"Internal detail, whose shape can change."},"created":{"type":"number","title":"Created","description":"When it happened, in seconds since 1970."}},"additionalProperties":false,"type":"object","required":["sequence","org","run_id","entity_id","kind","body","created"],"title":"RunEvent","description":"One entry in a run's event log."},"RunEventList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunEvent"},"type":"array","title":"Items","description":"The events, oldest first."},"next_cursor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Cursor","description":"Where the next page starts: send it back as `after` or `cursor`. Null on the last page."}},"additionalProperties":false,"type":"object","required":["items","next_cursor"],"title":"RunEventList","description":"A page of a run's event log."},"RunFailedMessage":{"properties":{"type":{"type":"string","const":"run.failed","title":"Type","description":"The event."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When it happened."},"data":{"$ref":"#/components/schemas/PublicRun","description":"The run."}},"additionalProperties":false,"type":"object","required":["type","timestamp","data"],"title":"RunFailedMessage","description":"A message about how a full run ended."},"RunLinks":{"properties":{"self":{"type":"string","title":"Self","description":"The run in this API."},"results_csv":{"type":"string","title":"Results Csv","description":"The last step's rows as a CSV file."},"app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App","description":"The run's page in the app."}},"additionalProperties":false,"type":"object","required":["self","results_csv","app"],"title":"RunLinks","description":"Where a run is: in this API, and in the app."},"RunList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Run"},"type":"array","title":"Items","description":"The runs, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Where the next page starts: send it back as `cursor`. Only when there's more to come."}},"additionalProperties":false,"type":"object","required":["items"],"title":"RunList","description":"A page of runs, newest first."},"RunProgress":{"properties":{"id":{"type":"string","title":"Id","description":"The run's ID."},"status":{"$ref":"#/components/schemas/RunStatus","description":"`queued`, `running` or `cancelling` while it's going; then `succeeded`, `completed_with_errors`, `failed` or `cancelled`."},"phase":{"type":"string","title":"Phase","description":"What it's doing now, in a few words, such as `preparing`, the name of the step it's on, or `complete`."},"requests":{"type":"integer","title":"Requests","description":"The requests it has sent to models so far."},"max_requests":{"type":"integer","title":"Max Requests","description":"The most requests it may send to models."},"started":{"type":"number","title":"Started","description":"When it was started, in seconds since 1970."},"elapsed_s":{"type":"number","title":"Elapsed S","description":"How long it has been going, in seconds, or how long it took once it ended."},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd","description":"What its replies have cost so far, in US dollars, as the run's own `cost_usd`; null when a model it asks has no price."},"stages":{"items":{"$ref":"#/components/schemas/StageProgress"},"type":"array","title":"Stages","description":"Each step's progress, in the definition's order."}},"additionalProperties":false,"type":"object","required":["id","status","phase","requests","max_requests","started","elapsed_s","cost_usd","stages"],"title":"RunProgress","description":"How far a run has got: its status, requests, time and cost so far, and each step's rows by status."},"RunRows":{"properties":{"read":{"type":"integer","title":"Read","description":"The rows read from the run's files: all of each, or a try run's sample."},"succeeded":{"type":"integer","title":"Succeeded","description":"The last step's rows that succeeded: the results a download holds."},"failed":{"type":"integer","title":"Failed","description":"Rows that failed at a step, got no sure answer there, or need a review."},"excluded":{"type":"integer","title":"Excluded","description":"Rows a step left out on purpose, such as a filter's."}},"additionalProperties":false,"type":"object","required":["read","succeeded","failed","excluded"],"title":"RunRows","description":"What has happened to a run's rows so far, from its steps' rows counted by status. After a Group by\nstep, a step's rows are groups, so the counts from there on are of groups."},"RunStarter":{"properties":{"kind":{"$ref":"#/components/schemas/CallerKind","description":"`person` for someone in the app, or `api_key`."},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The API key's ID, or the person's user ID; null in local mode, where nobody signs in."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The API key's name, such as \"Nightly import\"; null for a person."}},"additionalProperties":false,"type":"object","required":["kind","id","name"],"title":"RunStarter","description":"Who started a run: a person in the app, or a program with an API key."},"RunStatus":{"type":"string","enum":["queued","running","succeeded","failed","cancelled","cancelling","completed_with_errors"],"title":"RunStatus"},"RunSucceededMessage":{"properties":{"type":{"type":"string","const":"run.succeeded","title":"Type","description":"The event."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When it happened."},"data":{"$ref":"#/components/schemas/PublicRun","description":"The run."}},"additionalProperties":false,"type":"object","required":["type","timestamp","data"],"title":"RunSucceededMessage","description":"A message about how a full run ended."},"Sample":{"properties":{"rows":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Rows","description":"How many of each file's rows to run on.","default":20},"seed":{"type":"integer","title":"Seed","description":"Picks the rows: the same seed picks the same rows.","default":7}},"additionalProperties":false,"type":"object","title":"Sample","description":"A try run's sample: `rows` source rows, picked at random but repeatably from `seed`."},"Sampled":{"properties":{"alias":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","title":"Alias"},"fields":{"items":{"type":"string"},"type":"array","title":"Fields"},"records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":50,"title":"Records"},"more":{"type":"boolean","title":"More"}},"additionalProperties":false,"type":"object","required":["alias","fields","records","more"],"title":"Sampled","description":"What a probe read: the fields and up to SAMPLE_RECORDS_MOST records, shaped when a transform was\ngiven, and whether the source has more."},"Schedule":{"properties":{"id":{"type":"string","title":"Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"workflow_version":{"type":"integer","title":"Workflow Version"},"timetable":{"oneOf":[{"$ref":"#/components/schemas/Hourly"},{"$ref":"#/components/schemas/Daily"},{"$ref":"#/components/schemas/Weekly"}],"title":"Timetable","discriminator":{"propertyName":"every","mapping":{"day":"#/components/schemas/Daily","hour":"#/components/schemas/Hourly","week":"#/components/schemas/Weekly","weekday":"#/components/schemas/Daily"}}},"time_zone":{"type":"string","title":"Time Zone"},"max_requests":{"type":"integer","title":"Max Requests"},"runs_as":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runs As"},"paused":{"type":"boolean","title":"Paused"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"failures":{"type":"integer","title":"Failures"},"run":{"anyOf":[{"$ref":"#/components/schemas/ScheduleRun"},{"type":"null"}]},"last":{"anyOf":[{"$ref":"#/components/schemas/LastTick"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","workflow_id","workflow_version","timetable","time_zone","max_requests","runs_as","paused","note","failures","run","last","created_at","updated_at"],"title":"Schedule","description":"A schedule as people see it."},"ScheduleChange":{"properties":{"timetable":{"oneOf":[{"$ref":"#/components/schemas/Hourly"},{"$ref":"#/components/schemas/Daily"},{"$ref":"#/components/schemas/Weekly"}],"title":"Timetable","discriminator":{"propertyName":"every","mapping":{"day":"#/components/schemas/Daily","hour":"#/components/schemas/Hourly","week":"#/components/schemas/Weekly","weekday":"#/components/schemas/Daily"}}},"time_zone":{"type":"string","maxLength":64,"title":"Time Zone"},"max_requests":{"type":"integer","maximum":1000000.0,"minimum":1.0,"title":"Max Requests"},"paused":{"type":"boolean","title":"Paused"}},"additionalProperties":false,"type":"object","title":"ScheduleChange","description":"`PATCH /v1/schedules/{schedule_id}`: only what changes, since what's left out is kept."},"ScheduleRun":{"properties":{"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/RunStatus"}},"additionalProperties":false,"type":"object","required":["id","status"],"title":"ScheduleRun","description":"The run a schedule started last, and its status now."},"ScoreCalibration":{"properties":{"stage":{"type":"string","title":"Stage","description":"The step that asks the question."},"question":{"type":"string","title":"Question","description":"The question's name in the step."},"known":{"type":"integer","title":"Known","description":"How many of its answers have a known level: marked right, or wrong with the right level named."},"lean":{"type":"number","title":"Lean","description":"Jev's answers less the known levels, on average: below 0 when Jev's answers are lower."},"miss":{"type":"number","title":"Miss","description":"How far Jev's answers are from the known levels, on average, either way."},"calibration":{"anyOf":[{"$ref":"#/components/schemas/Calibration"},{"type":"null"}],"description":"The correction for the question, to save in it; null when `uncorrected` says why there's none."},"uncorrected":{"anyOf":[{"$ref":"#/components/schemas/Uncorrected"},{"type":"null"}],"description":"Why there's no correction: `too_few`, fewer than 10 known answers; or `no_lean`, since no correction is closer to the known answers it wasn't fitted from than the answers left as they are, so these don't show a lean yet, and more may. Null when there's a correction."},"calibrated_lean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calibrated Lean","description":"The lean the correction leaves on the known answers."},"calibrated_miss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calibrated Miss","description":"The miss the correction leaves on the known answers."}},"additionalProperties":false,"type":"object","required":["stage","question","known","lean","miss","calibration","uncorrected","calibrated_lean","calibrated_miss"],"title":"ScoreCalibration","description":"One score question's known answers in a run, how far Jev's answers were from them, and the correction\nthey give."},"Snapshot":{"properties":{"id":{"type":"string","title":"Id","description":"The snapshot's ID."},"dataset_id":{"type":"string","title":"Dataset Id","description":"Its dataset's ID."},"version":{"type":"integer","title":"Version","description":"Its version's number in its dataset, from 1."},"name":{"type":"string","title":"Name","description":"Its dataset's name when it was uploaded."},"filename":{"type":"string","title":"Filename","description":"Its file's name."},"context":{"type":"string","title":"Context","description":"What its file is, in a sentence, for the planner."},"record_count":{"type":"integer","title":"Record Count","description":"Its rows."},"schema":{"additionalProperties":true,"type":"object","title":"Schema","description":"Its columns: each field's `path` and `types`, and whether the list is `complete`."},"raw_artifact":{"type":"string","title":"Raw Artifact","description":"Internal: where the file is stored."},"records_artifact":{"type":"string","title":"Records Artifact","description":"Internal: where its rows are stored."},"adapter":{"type":"string","title":"Adapter","description":"Internal: what read the file."},"status":{"$ref":"#/components/schemas/SnapshotStatus","description":"`published` once its rows can be read."},"field_sizes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Field Sizes","description":"Internal: each field's average size, for estimates; null until it's measured."},"group_counts":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Group Counts","description":"Internal: the groups each likely key makes, for estimates; null until they're counted."},"notes":{"items":{"type":"string"},"type":"array","title":"Notes","description":"Plain sentences about the file, such as columns it doesn't list."},"sample":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sample","description":"Its first 20 rows, each with its data as `payload`, its `record_id`, and its `location` in the file."}},"additionalProperties":true,"type":"object","required":["id","dataset_id","version","name","filename","context","record_count","schema","raw_artifact","records_artifact","adapter","status","sample"],"title":"Snapshot","description":"One version of a dataset's file, its facts, and its first rows."},"SnapshotStatus":{"type":"string","enum":["published"],"title":"SnapshotStatus"},"Sort":{"properties":{"id":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]{0,63}$","title":"Id"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"input":{"type":"string","title":"Input"},"kind":{"type":"string","const":"sort","title":"Kind"},"model":{"type":"string","title":"Model"},"text_path":{"items":{"type":"string"},"type":"array","title":"Text Path"},"task":{"type":"string","title":"Task","default":"What is this mainly about?"},"topics":{"additionalProperties":{"type":"string"},"type":"object","maxProperties":24,"minProperties":2,"title":"Topics"},"routine":{"type":"string","title":"Routine","default":"routine"},"priority":{"items":{"type":"string"},"type":"array","title":"Priority"},"check":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check"},"check_threshold":{"type":"number","maximum":0.95,"minimum":0.5,"title":"Check Threshold","default":0.7},"keep_rows":{"type":"integer","maximum":128.0,"minimum":1.0,"title":"Keep Rows","default":40},"batch_size":{"type":"integer","maximum":128.0,"minimum":1.0,"title":"Batch Size","default":50},"audit_rows":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Audit Rows","default":0},"whole_if_fits":{"type":"boolean","title":"Whole If Fits","default":true}},"additionalProperties":false,"type":"object","required":["id","name","input","model","topics","kind"],"title":"Sort","description":"Trims each big group to the members worth reading; see https://docs.jevreduce.com/definitions#sort."},"SourceFacts":{"properties":{"alias":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","title":"Alias"},"kind":{"type":"string","enum":["file","app"],"title":"Kind"},"name":{"type":"string","title":"Name"},"app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"docs_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Url"},"paging_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paging Hint"},"fields":{"items":{"type":"string"},"type":"array","title":"Fields"},"records":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Records"}},"additionalProperties":false,"type":"object","required":["alias","kind","name"],"title":"SourceFacts","description":"What the agent may know about a source: an app's public API and docs, or a file's fields and size."},"Speaker":{"type":"string","enum":["you","planner"],"title":"Speaker","description":"Who said a line of a conversation in the app's Workflow Planner: the person, or the planner."},"StageEstimate":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"kind":{"$ref":"#/components/schemas/StageKind"},"rows_in":{"type":"integer","title":"Rows In"},"rows_out":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Out"},"answers":{"type":"integer","title":"Answers"},"requests":{"type":"integer","title":"Requests"},"tokens":{"type":"integer","title":"Tokens"},"seconds":{"type":"number","title":"Seconds"},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd"},"sliced_groups":{"type":"integer","title":"Sliced Groups","description":"How many groups too big for one request the step reads in slices; 0 for any other step.","default":0}},"additionalProperties":false,"type":"object","required":["id","name","kind","rows_in","rows_out","answers","requests","tokens","seconds","cost_usd"],"title":"StageEstimate","description":"One step's estimated rows, answers, requests, tokens, time and cost."},"StageEvidence":{"properties":{"stage":{"type":"string","title":"Stage"},"rows_in":{"type":"integer","title":"Rows In"},"rows_out":{"type":"integer","title":"Rows Out"},"unmatched":{"type":"integer","title":"Unmatched","default":0},"missing_keys":{"type":"integer","title":"Missing Keys","default":0},"multiple_matches":{"type":"integer","title":"Multiple Matches","default":0},"excluded":{"type":"integer","title":"Excluded","default":0}},"additionalProperties":false,"type":"object","required":["stage","rows_in","rows_out"],"title":"StageEvidence"},"StageKind":{"type":"string","enum":["evaluate","filter","group","join","match","reshape","sort","tally"],"title":"StageKind","description":"Workflow stage operators; also used as node kinds for operator outputs."},"StageProgress":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"kind":{"$ref":"#/components/schemas/StageKind"},"expected":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected"},"done":{"type":"integer","title":"Done"},"counts":{"$ref":"#/components/schemas/StatusCounts"}},"additionalProperties":false,"type":"object","required":["id","name","kind","expected","done","counts"],"title":"StageProgress","description":"One step's progress: the rows it expects and how many are done, by status."},"StartRun":{"properties":{"definition":{"$ref":"#/components/schemas/Definition","description":"What to run: its files and its steps."},"max_requests":{"type":"integer","maximum":1000000.0,"minimum":1.0,"title":"Max Requests","description":"The most requests the run may send to models, which caps what it can spend. Required for API keys; 1,000 when a person leaves it out.","default":1000},"sample":{"anyOf":[{"$ref":"#/components/schemas/Sample"},{"type":"null"}],"description":"Makes it a try run on a sample of each file's rows."},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"The saved workflow the run belongs to. An API key must name one of its workspace's."}},"additionalProperties":false,"type":"object","required":["definition"],"title":"StartRun","description":"A run of a definition sent in the request rather than saved."},"StartWorkflowRun":{"properties":{"version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Version","description":"The saved version to run. Leave it out for the newest."},"max_requests":{"type":"integer","maximum":1000000.0,"minimum":1.0,"title":"Max Requests","description":"The most requests the run may send to models, which caps what it can spend. Required for API keys; 1,000 when a person leaves it out.","default":1000},"sources":{"additionalProperties":{"type":"string"},"type":"object","title":"Sources","description":"Inputs to read other files, by the input's name in the workflow: `\"latest\"` for the newest version of its dataset, or a snapshot ID. An input that reads a connected app takes only `\"latest\"`: the app's newest read, without reading the app again. Leave an input out to read the file it was saved with."},"sample":{"anyOf":[{"$ref":"#/components/schemas/Sample"},{"type":"null"}],"description":"Makes it a try run on a sample of each file's rows."}},"additionalProperties":false,"type":"object","title":"StartWorkflowRun","description":"A run of a saved workflow, on the files it was saved with unless `sources` names others."},"StatusCounts":{"properties":{"succeeded":{"type":"integer","title":"Succeeded","description":"Rows the step finished with a result."},"failed":{"type":"integer","title":"Failed","description":"Rows with no answer because their model request failed or couldn't be sent; each keeps the reason."},"unknown":{"type":"integer","title":"Unknown","description":"Rows with no answer because their request's outcome was lost, such as when a worker stopped while it was out. They aren't sent again, in case the model answered and that paid twice."},"review":{"type":"integer","title":"Review","description":"Rows the step couldn't decide on, which need a person to look, such as a row a Keep only step can't test because its field is missing or can't be compared."},"excluded":{"type":"integer","title":"Excluded","description":"Rows the step left out on purpose, such as those a Keep only step drops."},"skipped":{"type":"integer","title":"Skipped","description":"Rows the step didn't work on because they, or a row they need, failed or were left out at an earlier step."}},"additionalProperties":false,"type":"object","required":["succeeded","failed","unknown","review","excluded","skipped"],"title":"StatusCounts","description":"How many of a step's rows ended in each node status."},"StepAnswers":{"properties":{"stage":{"type":"string","title":"Stage","description":"The step's `id`."},"rows":{"type":"integer","title":"Rows","description":"The step's rows that have answers: those that succeeded."},"close_call_rows":{"type":"integer","title":"Close Call Rows","description":"How many of those rows have at least one close call."},"questions":{"items":{"$ref":"#/components/schemas/QuestionTotals"},"type":"array","title":"Questions","description":"Each question's totals, in the step's order."}},"additionalProperties":false,"type":"object","required":["stage","rows","close_call_rows","questions"],"title":"StepAnswers","description":"An Ask step's answers added up over every row it has answered so far."},"Stop":{"properties":{"kind":{"type":"string","const":"stop","title":"Kind","default":"stop"},"at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"At"}},"additionalProperties":false,"type":"object","title":"Stop"},"Stuck":{"properties":{"kind":{"type":"string","const":"stuck","title":"Kind","default":"stuck"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"},"needs":{"type":"string","maxLength":1000,"minLength":1,"title":"Needs"},"at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"At"}},"additionalProperties":false,"type":"object","required":["reason","needs"],"title":"Stuck","description":"Why the agent can't go on, and what would let it."},"Table":{"properties":{"alias":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},{"type":"null"}],"title":"Alias"},"status":{"type":"string","enum":["reading","ready","failed"],"title":"Status"},"records":{"type":"integer","title":"Records"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"dataset":{"anyOf":[{"$ref":"#/components/schemas/Dataset"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"additionalProperties":false,"type":"object","required":["alias","status","records","columns"],"title":"Table","description":"One table the full read makes: an app source's, by its alias, or the agent's own when `alias` is null;\nthe library dataset it lands in once it's ready, with the columns frozen at acceptance."},"TagKey":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-zA-Z][a-zA-Z0-9_.-]*$"},"TagValue":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"integer"},{"type":"number"}]},"Tally":{"properties":{"id":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]{0,63}$","title":"Id"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"input":{"type":"string","title":"Input"},"kind":{"type":"string","const":"tally","title":"Kind"},"answers":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","maxItems":128,"minItems":1,"title":"Answers"}},"additionalProperties":false,"type":"object","required":["id","name","input","answers","kind"],"title":"Tally","description":"Adds up the answers of each group's rows; see https://docs.jevreduce.com/definitions#tally."},"TelemetryDeleted":{"properties":{"org_id":{"$ref":"#/components/schemas/Identifier"},"deleted_events":{"type":"integer","title":"Deleted Events"},"deleted_associations":{"type":"integer","title":"Deleted Associations"},"deleted_queued_events":{"type":"integer","title":"Deleted Queued Events","default":0},"recording_enabled":{"type":"boolean","title":"Recording Enabled","default":false}},"additionalProperties":false,"type":"object","required":["org_id","deleted_events","deleted_associations"],"title":"TelemetryDeleted"},"TelemetryPolicy":{"properties":{"org_id":{"$ref":"#/components/schemas/Identifier"},"enabled":{"type":"boolean","title":"Enabled"},"pending_events":{"type":"integer","title":"Pending Events","default":0},"deleted_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted Before"}},"additionalProperties":false,"type":"object","required":["org_id","enabled"],"title":"TelemetryPolicy"},"TemplateNeeds":{"properties":{"group":{"type":"boolean","title":"Group"},"subject":{"type":"boolean","title":"Subject"}},"additionalProperties":false,"type":"object","required":["group","subject"],"title":"TemplateNeeds","description":"What a starting point needs to be offered."},"TemplateSummary":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"needs":{"$ref":"#/components/schemas/TemplateNeeds"}},"additionalProperties":false,"type":"object","required":["id","title","description","needs"],"title":"TemplateSummary","description":"One starting point. `{row}`, `{rows}`, `{group}` and `{groups}` stand for the dataset's labels."},"Thing":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"$ref":"#/components/schemas/ThingKind"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"created":{"type":"string","format":"date-time","title":"Created"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"}},"additionalProperties":false,"type":"object","required":["id","kind","name","version","created"],"title":"Thing","description":"Something a trace shows, as its own row names it."},"ThingKind":{"type":"string","enum":["upload","import","version","workflow_version","run","session","bucket","webhook","download","dataset","row"],"title":"ThingKind","description":"What a lineage link names at either end (ADR 0023), in the one order every link writer holds its sources\nin. A trace also starts from a dataset, shown as its versions, or a row."},"TickOutcome":{"type":"string","enum":["started","skipped","failed"],"title":"TickOutcome","description":"What a schedule's last tick came to: it started a run, skipped while the last was going, or failed."},"Trace":{"properties":{"thing":{"$ref":"#/components/schemas/Thing"},"up":{"items":{"$ref":"#/components/schemas/Thing"},"type":"array","title":"Up"},"down":{"items":{"$ref":"#/components/schemas/Thing"},"type":"array","title":"Down"},"down_count":{"type":"integer","title":"Down Count"},"links":{"items":{"$ref":"#/components/schemas/TraceLink"},"type":"array","title":"Links"}},"additionalProperties":false,"type":"object","required":["thing","up","down","down_count","links"],"title":"Trace","description":"What a dataset, a run or a row came from, and what was made from it."},"TraceLink":{"properties":{"source":{"type":"string","title":"Source"},"target":{"type":"string","title":"Target"},"detail":{"additionalProperties":true,"type":"object","title":"Detail"}},"additionalProperties":false,"type":"object","required":["source","target","detail"],"title":"TraceLink","description":"A link between two of a trace's things: `target` was made from `source`, with what the link keeps."},"TrainingExample":{"properties":{"kind":{"$ref":"#/components/schemas/ExampleKind"},"id":{"type":"string","title":"Id"},"input":{"$ref":"#/components/schemas/JsonValue"},"question":{"type":"string","title":"Question"},"question_text":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Question Text"},"type":{"$ref":"#/components/schemas/QuestionType"},"answer":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Answer"},"details":{"anyOf":[{"$ref":"#/components/schemas/Answer"},{"type":"null"}]},"how_asked":{"type":"string","title":"How Asked"},"status":{"$ref":"#/components/schemas/ExampleStatus"},"split":{"$ref":"#/components/schemas/ExampleSplit"},"ok_to_train":{"type":"boolean","title":"Ok To Train"},"model":{"type":"string","title":"Model"},"run":{"type":"string","title":"Run"}},"additionalProperties":false,"type":"object","required":["kind","id","input","question","question_text","type","answer","details","how_asked","status","split","ok_to_train","model","run"],"title":"TrainingExample","description":"One line of the training export: an answer saved as an example for training another model."},"Transform":{"properties":{"columns":{"items":{"$ref":"#/components/schemas/Column"},"type":"array","maxItems":64,"minItems":1,"title":"Columns"},"explode":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":8,"title":"Explode"},"keep":{"anyOf":[{"$ref":"#/components/schemas/Keep"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["columns"],"title":"Transform"},"Uncorrected":{"type":"string","enum":["too_few","no_lean"],"title":"Uncorrected","description":"Why a score question's known answers give no correction."},"UploadCompleted":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"status":{"type":"string","const":"ingesting","title":"Status"}},"additionalProperties":false,"type":"object","required":["upload_id","status"],"title":"UploadCompleted","description":"A direct upload whose bytes are sent: a worker is reading the file."},"UploadProgress":{"properties":{"upload_id":{"type":"string","title":"Upload Id","description":"The upload's ID."},"status":{"$ref":"#/components/schemas/UploadStatus","description":"`waiting` for its bytes, `ingesting` while its rows are read, then `ready` or `failed`."},"records":{"type":"integer","title":"Records","description":"The rows read so far: all of them once it's `ready`."},"dataset":{"anyOf":[{"$ref":"#/components/schemas/Dataset"},{"type":"null"}],"description":"The dataset the file became, or became the newest version of; null until it's `ready`."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why reading the file failed, in a plain sentence; null otherwise."}},"additionalProperties":false,"type":"object","required":["upload_id","status","records","dataset","error"],"title":"UploadProgress","description":"How far a direct upload has got, and its dataset once it's ready."},"UploadStart":{"properties":{"filename":{"type":"string","title":"Filename","description":"The file's name, whose ending says how it's read: `.csv`, `.json`, `.jsonl`, `.ndjson`, `.txt` or `.md`."},"size":{"type":"integer","title":"Size","description":"The file's size in bytes. The bytes sent must be exactly this many."},"content_type":{"type":"string","title":"Content Type","description":"The file's media type, such as `text/csv`."},"name":{"type":"string","title":"Name","description":"The dataset's name, such as `Customer reviews`."},"context":{"type":"string","title":"Context","description":"What the file is, in a sentence, for the planner. It can be empty."},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id","description":"A dataset to add the file to as its newest version. Leave it out for a new dataset."}},"additionalProperties":false,"type":"object","required":["filename","size","content_type","name","context"],"title":"UploadStart","description":"The file a direct upload will send, described before its bytes are sent."},"UploadStatus":{"type":"string","enum":["waiting","ingesting","ready","failed"],"title":"UploadStatus","description":"How far a direct upload has got."},"UploadTicket":{"properties":{"upload_id":{"type":"string","title":"Upload Id","description":"The upload's ID, to finish it and ask how far it has got."},"method":{"type":"string","const":"PUT","title":"Method","description":"The HTTP method to send the bytes with."},"url":{"type":"string","title":"Url","description":"Where to send the file's bytes, in one request."},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"The headers to send with the bytes, as they are."},"expires_at":{"type":"number","title":"Expires At","description":"When `url` stops taking the file's bytes, in Unix seconds."}},"additionalProperties":false,"type":"object","required":["upload_id","method","url","headers","expires_at"],"title":"UploadTicket","description":"Where and how the browser sends the file's bytes."},"ValidationIssue":{"properties":{"code":{"type":"string","title":"Code","description":"The kind of problem, such as `missing_field` or `unmatched_rows`."},"severity":{"type":"string","enum":["error","warning","info"],"title":"Severity","description":"`error` when it blocks the plan; `warning` or `info` when it's worth knowing.","default":"error"},"message":{"type":"string","title":"Message","description":"What it found, in a plain sentence."},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage","description":"The step it's about, by its `id`; null for none."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"The input it's about, by its name; null for none."},"path":{"items":{"type":"string"},"type":"array","title":"Path","description":"The field it's about, as a path; empty for none."},"count":{"type":"integer","title":"Count","description":"How many of the sampled rows it's about.","default":0},"rows":{"items":{"type":"integer"},"type":"array","title":"Rows","description":"The first 5 of those rows, by their place among the sampled rows the step read, from 0."}},"additionalProperties":false,"type":"object","required":["code","message"],"title":"ValidationIssue"},"Verdict":{"type":"string","enum":["right","wrong"],"title":"Verdict","description":"A person's mark on one answer."},"WebhookDelivery":{"properties":{"id":{"type":"string","title":"Id"},"type":{"anyOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"string","const":"webhook.test"}],"title":"Type"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"status":{"$ref":"#/components/schemas/DeliveryStatus"},"attempts":{"type":"integer","title":"Attempts"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"last_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status Code"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"}},"additionalProperties":false,"type":"object","required":["id","type","run_id","status","attempts","created_at","next_attempt_at","delivered_at","last_status_code","last_error"],"title":"WebhookDelivery","description":"One message to an address, with every try of it. `id` is its webhook-id header, the same each try."},"WebhookEndpoint":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"events":{"items":{"$ref":"#/components/schemas/WebhookEvent"},"type":"array","title":"Events"},"enabled":{"type":"boolean","title":"Enabled"},"disabled_reason":{"anyOf":[{"$ref":"#/components/schemas/DisabledReason"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_delivery":{"anyOf":[{"$ref":"#/components/schemas/LastDelivery"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","url","description","events","enabled","disabled_reason","created_at","last_delivery"],"title":"WebhookEndpoint","description":"An address as people see it: never its signing secret."},"WebhookEndpointChange":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":1,"title":"Url"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"},"events":{"items":{"$ref":"#/components/schemas/WebhookEvent"},"type":"array","minItems":1,"title":"Events"},"enabled":{"type":"boolean","title":"Enabled"}},"additionalProperties":false,"type":"object","title":"WebhookEndpointChange","description":"`PATCH /v1/webhook-endpoints/{endpoint_id}`: only what changes, since what's left out is kept. Only\nthe description can be null, which clears it. Turning the address on or off by hand clears why it was\nturned off."},"WebhookEndpointRequest":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":1,"title":"Url"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"},"events":{"items":{"$ref":"#/components/schemas/WebhookEvent"},"type":"array","minItems":1,"title":"Events"}},"additionalProperties":false,"type":"object","required":["url","events"],"title":"WebhookEndpointRequest","description":"`POST /v1/webhook-endpoints`: an address, what it's for, and the outcomes it's sent."},"WebhookEvent":{"type":"string","enum":["run.succeeded","run.completed_with_errors","run.failed","run.cancelled","run.delivered","run.delivery_failed"],"title":"WebhookEvent","description":"What a webhook address can tick to be told about (ADR 0013): how a full run ended, and whether its\nresults reached a bucket."},"WebhookReceipt":{"properties":{"received":{"type":"boolean","title":"Received"},"applied":{"type":"boolean","title":"Applied"}},"additionalProperties":false,"type":"object","required":["received","applied"],"title":"WebhookReceipt","description":"What Nango's webhook is told: its event was received, and whether it changed anything here."},"WebhookTestMessage":{"properties":{"type":{"type":"string","const":"webhook.test","title":"Type","description":"The event."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When it happened."},"data":{"$ref":"#/components/schemas/WebhookTestNote","description":"A note saying it's a test."}},"additionalProperties":false,"type":"object","required":["type","timestamp","data"],"title":"WebhookTestMessage","description":"Send test's message."},"WebhookTestNote":{"properties":{"message":{"type":"string","const":"This is a test message from Jevreduce.","title":"Message"}},"additionalProperties":false,"type":"object","required":["message"],"title":"WebhookTestNote","description":"What Send test's message carries in place of a run."},"Weekday":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"title":"Weekday","description":"The day a weekly schedule runs on, in Temporal's order: 0 is Sunday."},"Weekly":{"properties":{"every":{"type":"string","const":"week","title":"Every"},"day":{"$ref":"#/components/schemas/Weekday"},"hour":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Hour"},"minute":{"type":"integer","maximum":59.0,"minimum":0.0,"title":"Minute"}},"additionalProperties":false,"type":"object","required":["every","day","hour","minute"],"title":"Weekly","description":"Once a week, on a day, at a time."},"Workspace":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"default":{"type":"boolean","title":"Default"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"additionalProperties":false,"type":"object","required":["id","name","default","created_by","created_at","archived_at"],"title":"Workspace","description":"A workspace as people see it: the organization's Default, or one its admins made."},"WorkspaceRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"WorkspaceRequest","description":"`POST /v1/workspaces` and `PATCH /v1/workspaces/{workspace_id}`: a workspace's name."}},"securitySchemes":{"bearer":{"type":"http","description":"An API key, such as `jr_live_…`.","scheme":"bearer","bearerFormat":"API key"}}},"tags":[{"name":"Saved workflows","description":"Start a run of a workflow saved in the app."},{"name":"Runs","description":"Watch, cancel and rerun runs, or start one from a definition."},{"name":"Downloads","description":"A run's rows: as a file, a page at a time, or one by one."},{"name":"Checks","description":"Right-or-wrong marks on a run's answers."},{"name":"Files and datasets","description":"Upload files, and read the datasets and versions they make."},{"name":"Library","description":"Saved questions, queries and workflows."},{"name":"Models and estimates","description":"The models on offer, estimates and checks before a run, and plans."},{"name":"Credits","description":"Your organization's credits, and every change to them."},{"name":"Workspaces","description":"Your organization's workspaces, each with its own workflows, data, runs and API keys."},{"name":"Telemetry","description":"Metrics the app reports and shows, and their deletion."},{"name":"App only","description":"For the Jevreduce app and its services. API keys can't call these."}]}