{"openapi":"3.0.2","info":{"title":"typesafe/jev-1.13.0","description":"The request body Comfy Router accepts for the model \"typesafe/jev-1.13.0\", and the response body it returns. The INPUT schema is the same schema the server validates a call against before it reaches the provider, so what is published and what is enforced cannot differ. `x-comfy-router-input-modalities` records the media kinds the model is documented to accept; the request schema is shared across sibling models and may admit media kinds this model ignores. The OUTPUT schema describes the provider's native result document exactly as Router returns it: Router does not validate, narrow or re-envelope the response, so the output schema is descriptive rather than enforced, and Comfy owns no output shape of its own.","version":"8ffd820ea0ec"},"paths":{"/v2/models/typesafe/jev-1.13.0":{"post":{"operationId":"runRouterModel","summary":"Run typesafe/jev-1.13.0 synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Comfy Router input schema for TypeSafe Jev, the System One decision model (https://docs.typesafe.ai/api.md). Send a `state` to evaluate and a map of typed `questions`; each answer comes back under the same question id. Images ride inline in `assets` and are referenced by their key anywhere in `state`, `instructions` or `criteria` (https://docs.typesafe.ai/images.md). Box questions need `typesafe/jev-1.14.0`; `typesafe/jev-1.13.0` refuses them.","example":{"questions":{"department":{"criteria":{"billing":"Payments, invoicing, refunds","technical":"Bugs, outages, integrations"},"instructions":"Which team should handle this?","type":"choice"},"is_urgent":{"instructions":"Does this convey urgency?","type":"noul"}},"state":"Help! My payouts have been failing for 3 days."},"properties":{"assets":{"additionalProperties":{"$ref":"#/components/schemas/TypesafeSystemOneAsset"},"description":"The images in the request, keyed by a reference string. Every reference must appear somewhere in `state`, `instructions` or `criteria`. Each image is a still PNG or JPEG of 280 to 1568 pixels per side and at most 16 MiB after decoding; TypeSafe refuses a call over 32 MiB in total.","type":"object"},"model":{"description":"The pinned Jev version. Optional: Router fills it from the model id in the path. The `jev-latest` and `jev-preview` aliases are not accepted.","nullable":true,"type":"string"},"questions":{"additionalProperties":{"$ref":"#/components/schemas/TypesafeSystemOneQuestion"},"description":"The questions to answer, keyed by an id you choose. The answer to each is returned under the same id.","type":"object"},"state":{"description":"The content to evaluate: a string, or structured data (an object or array) up to 64 levels deep. An asset reference anywhere in it is replaced by that image."}},"required":["state","questions"],"type":"object"}}}},"responses":{"200":{"description":"OK - the model's native JSON output, returned unchanged; the schema describes the provider's terminal result document as Router returns it.","content":{"application/json":{"schema":{"description":"Comfy Router output schema for TypeSafe Jev: the System One answer document, forwarded unchanged. The operation is DIRECT RETURN, so the answers arrive on the original call. `answers` holds one answer per question, under the question's id; `usage` is the token count the call is billed by, images included as input tokens.","example":{"answers":{"is_urgent":{"noul":0.95,"type":"noul"},"mug":{"box":{"bottom":0.82,"left":0.44,"right":0.84,"top":0.25},"confidence":0.92,"type":"box"}},"model":"jev-1.14.0","usage":{"input_tokens":290,"output_tokens":21}},"properties":{"answers":{"additionalProperties":{"$ref":"#/components/schemas/TypesafeSystemOneAnswer"},"description":"One answer per question, keyed by the question ids you sent.","type":"object"},"model":{"description":"The Jev version that answered, such as `jev-1.14.0`.","type":"string"},"usage":{"description":"Token usage for the request.","properties":{"input_tokens":{"description":"Input tokens, including every image in the request.","type":"integer"},"output_tokens":{"description":"Output tokens.","type":"integer"}},"type":"object"}},"required":["model","answers"],"type":"object"}}}}}}}},"components":{"schemas":{"TypesafeSystemOneAnswer":{"description":"One answer. `type` matches the question's and decides which sibling fields are set.","properties":{"box":{"description":"For `box`, the four edges of the smallest box around the target, each a fraction from 0 to 1 of the image measured from its top-left corner: `left` and `right` of the width, `top` and `bottom` of the height. `left` is less than `right` and `top` is less than `bottom`. A box answer is always a box, even when the target is absent; ask a `noul` alongside it to check.","properties":{"bottom":{"maximum":1,"minimum":0,"type":"number"},"left":{"maximum":1,"minimum":0,"type":"number"},"right":{"maximum":1,"minimum":0,"type":"number"},"top":{"maximum":1,"minimum":0,"type":"number"}},"required":["top","bottom","left","right"],"type":"object"},"choice":{"description":"For `choice`, the highest-probability option.","type":"string"},"confidence":{"description":"For `choice`, `score` and `box`, how certain the model is, from 0 to 1.","maximum":1,"minimum":0,"type":"number"},"legend":{"additionalProperties":{"type":"string"},"description":"For `score`, each level index mapped back to its description.","type":"object"},"noul":{"description":"For `noul`, the answer from 0 (no) to 1 (yes).","type":"number"},"probabilities":{"additionalProperties":{"type":"number"},"description":"For `choice`, every option mapped to its probability; for `score`, every level index. The probabilities sum to 1.","type":"object"},"score":{"description":"For `score`, the probability-weighted level; it can land between levels.","type":"number"},"type":{"description":"The question type this answers (`noul`, `choice`, `score` or `box`).","type":"string"}},"required":["type"],"type":"object"},"TypesafeSystemOneAsset":{"description":"One inline image. Send the file base64-encoded in `data_base64` with its `format`.","properties":{"data_base64":{"description":"The image file, standard base64 with `=` padding, no line breaks and no `data:` prefix. The decoded bytes must be a PNG or JPEG matching `format`.","type":"string"},"format":{"description":"The image format, in lowercase. `jpeg` is another name for `jpg`.","enum":["png","jpg","jpeg"],"type":"string"},"type":{"description":"The kind of asset. Optional; when sent it must be `image`.","enum":["image"],"type":"string"}},"required":["format","data_base64"],"type":"object"},"TypesafeSystemOneQuestion":{"description":"One typed question. `noul` is a yes/no question, `choice` picks one option from `criteria`, `score` rates along the ordered levels in `criteria`, and `box` (Jev 1.14 only, needs an image) finds where something is in an image.","properties":{"criteria":{"description":"For `noul`, optional `true`/`false` descriptions. For `choice`, a map of option name to description (at most 255 options). For `score`, an ordered array of 2 to 10 level descriptions. `box` takes no criteria."},"instructions":{"description":"What to decide. A string, or an object or array holding the question in one field and data it refers to in others."},"type":{"description":"The question type.","enum":["noul","choice","score","box"],"type":"string"}},"required":["type","instructions"],"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-comfy-router-model-id":"typesafe/jev-1.13.0","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["text","image"],"x-comfy-router-output-modalities":["text"]}
