{"openapi":"3.1.1","info":{"title":"decision-machine-1","description":"Decisions over text. Send text and get typed answers back: a yes/no, a label, a path through a label tree, a rating, an answer span, a filled JSON Schema, entities, or a value check. No generation, no chat. Every capability takes `text` for one result or `texts` for a batch. Errors are `{ error: { code, message } }`.","version":"1.0.0"},"servers":[{"url":"https://api.milliseconds.ai","description":"Production"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A milliseconds API key, test_sk-{namespace}-{entropy} or prod_sk-{namespace}-{entropy}. Every /v1 route requires it."}},"schemas":{"YesNoResult":{"type":"object","properties":{"statement":{"type":"string"},"answer":{"type":"boolean"},"probability":{"type":"number","minimum":0,"maximum":1,"example":0.93}},"required":["statement","answer","probability"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"YesNoRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"The text to decide about.","example":"I was charged twice and support is not answering. Fix this today."},"texts":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000},"description":"Batch form: one result per text."},"statement":{"example":"The customer expresses urgency.","type":"string","minLength":1},"statements":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"when_true":{"description":"What makes the statement true. Improves accuracy.","example":"Time pressure, ASAP, losing money","type":"string"},"when_false":{"example":"A routine question with no time pressure","type":"string"}}},"ClassifyResult":{"type":"object","properties":{"label":{"type":"string","example":"billing"},"probability":{"type":"number","minimum":0,"maximum":1,"example":0.82},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"1 = one clear winner, 0 = flat","example":0.71},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["label","probability","confidence","scores"]},"ClassifyRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"The text to decide about.","example":"I was charged twice and support is not answering. Fix this today."},"texts":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000},"description":"Batch form: one result per text."},"labels":{"anyOf":[{"minItems":2,"maxItems":64,"type":"array","items":{"type":"string","minLength":1}},{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}}],"description":"Label names, or name -> description. Descriptions improve accuracy.","example":{"billing":"Charges, invoices, refunds","shipping":"Delivery and tracking"}}},"required":["labels"]},"ClassifyTreeLevel":{"type":"object","properties":{"label":{"type":"string"},"probability":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"input_chars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"inference_ms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","probability","confidence","scores","input_chars","input_tokens","inference_ms"]},"ClassifyTreeResult":{"type":"object","properties":{"path":{"type":"array","items":{"type":"string"},"description":"Winning label per level, top to bottom"},"label":{"type":"string","description":"The deepest label, the last of `path`"},"probability":{"type":"number","minimum":0,"maximum":1,"description":"Product of the level probabilities"},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"Product of the level confidences"},"levels":{"type":"array","items":{"$ref":"#/components/schemas/ClassifyTreeLevel"}}},"required":["path","label","probability","confidence","levels"]},"ClassifyTree":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ClassifyTreeNode"}]},"description":"Nested labels: name -> description, or name -> { description, labels }. A node without `labels` is a leaf.","example":{"billing":{"description":"payments, invoices, charges, refunds and subscriptions","labels":{"refund_request":"the customer asks for money back","subscription_change":"the customer wants to upgrade, downgrade or cancel a plan"}},"shipping":"delivery, tracking, lost or damaged parcels"}},"ClassifyTreeNode":{"type":"object","properties":{"description":{"type":"string"},"labels":{"$ref":"#/components/schemas/ClassifyTree"}}},"ClassifyTreeRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"The text to decide about.","example":"I was charged twice and support is not answering. Fix this today."},"texts":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000},"description":"Batch form: one result per text."},"tree":{"$ref":"#/components/schemas/ClassifyTree"}},"required":["tree"],"$defs":{"ClassifyTree":{"$ref":"#/components/schemas/ClassifyTree"},"ClassifyTreeNode":{"$ref":"#/components/schemas/ClassifyTreeNode"}}},"RateResult":{"type":"object","properties":{"score":{"type":"number","description":"Probability-weighted position on the scale, 0 to scale.length - 1","example":2.3},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Index of the most likely level","example":2},"label":{"type":"string","description":"The scale entry at `level`","example":"Angry"},"confidence":{"type":"number","minimum":0,"maximum":1},"scores":{"type":"array","items":{"type":"number","minimum":0,"maximum":1},"description":"One probability per level, same order as scale"}},"required":["score","level","label","confidence","scores"]},"RateRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"The text to decide about.","example":"I was charged twice and support is not answering. Fix this today."},"texts":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000},"description":"Batch form: one result per text."},"scale":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"string","minLength":1},"description":"Level descriptions, low to high.","example":["Calm","Annoyed","Angry","Threatening to leave"]}},"required":["scale"]},"AnswerResult":{"type":"object","properties":{"question":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A span of the text, null when nothing fits","example":"John Ternus"},"probability":{"type":"number","minimum":0,"maximum":1},"start":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"end":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["question","answer","probability","start","end"]},"AnswerRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"The text to decide about.","example":"I was charged twice and support is not answering. Fix this today."},"texts":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000},"description":"Batch form: one result per text."},"question":{"example":"Who announced the product?","type":"string","minLength":1},"questions":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1}}}},"ExtractResult":{"type":"object","properties":{"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["data"]},"ExtractRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"The text to decide about.","example":"I was charged twice and support is not answering. Fix this today."},"texts":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000},"description":"Batch form: one result per text."},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema of the object to extract. Strings, numbers, booleans, enums, arrays of strings and nested objects. Arrays of objects are accepted and returned empty.","example":{"type":"object","properties":{"invoice_number":{"type":"string"},"total":{"type":"number"}}}}},"required":["schema"]},"Entity":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"probability":{"type":"number","minimum":0,"maximum":1},"start":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","text","probability","start","end"]},"EntitiesResult":{"type":"object","properties":{"entities":{"type":"array","items":{"$ref":"#/components/schemas/Entity"}}},"required":["entities"]},"EntitiesRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"The text to decide about.","example":"I was charged twice and support is not answering. Fix this today."},"texts":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000},"description":"Batch form: one result per text."},"types":{"anyOf":[{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","minLength":1}},{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}}],"description":"Entity types, or type -> description.","example":{"person":"a human name","product":"a commercial product"}}},"required":["types"]},"VerifyResult":{"type":"object","properties":{"matches":{"type":"boolean"},"probability":{"type":"number","minimum":0,"maximum":1},"found":{"type":"array","items":{"type":"string"},"description":"What the text actually says for that field"}},"required":["matches","probability","found"]},"VerifyRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"The text to decide about.","example":"I was charged twice and support is not answering. Fix this today."},"texts":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000},"description":"Batch form: one result per text."},"field":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["name"],"example":{"name":"invoice_number","description":"The identifier printed on the invoice"}},"value":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"The value to check against the text","example":"4471"}},"required":["field","value"]},"Model":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"model"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"owned_by":{"type":"string"}},"required":["id","object","created","owned_by"]},"ChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat.completion"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"]}}},"required":["role","content"]},"finish_reason":{"type":"string","enum":["stop","tool_calls"]}},"required":["index","message","finish_reason"]}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["prompt_tokens","completion_tokens","total_tokens"]}},"required":["id","object","created","model","choices","usage"]},"ChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string","example":"decision-machine-1"},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool","developer"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}},"required":["type"],"additionalProperties":{}}},{"type":"null"}]}},"required":["role"],"additionalProperties":{}}},"response_format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean"}},"required":["schema"]}},"required":["type","json_schema"]},{"type":"object","properties":{"type":{"type":"string","const":"json_object"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"text"}},"required":["type"]}]},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name"]}},"required":["type","function"]}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"]}]},"stream":{"type":"boolean"}},"required":["model","messages"],"additionalProperties":{}}}},"security":[{"apiKey":[]}],"tags":[{"name":"decision-machine-1","description":"The capability endpoints. Each takes `text` or `texts` and returns one typed result, or `{ results }` for a batch."},{"name":"openai","description":"OpenAI-compatible surface. Point any OpenAI client at `/v1` with `model: \"decision-machine-1\"`. `response_format.json_schema` extracts, `tools` does function calling. Plain chat is rejected."}],"paths":{"/v1/decision-machine-1/yes-no":{"post":{"operationId":"yesNo","tags":["decision-machine-1"],"summary":"Is a statement true of the text?","description":"Answers one or more statements with a yes/no and the probability. Add `when_true` / `when_false` to sharpen the boundary.\n\nSend `text` for one result, or `texts` for a batch wrapped as `{ results: [...] }`. The response carries `x-input-chars` (input characters) and `x-input-tokens` (input tokens billed for this call) headers. Each item of `texts` (and each of `statements` or `questions`) counts as one request against the requests-per-minute limit.","responses":{"200":{"description":"Result, or { results } for a batch","content":{"application/json":{"schema":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/YesNoResult"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/YesNoResult"}}},"required":["results"]}]},{"type":"object","properties":{"results":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/YesNoResult"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/YesNoResult"}}},"required":["results"]}]}}},"required":["results"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Inference failed twice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"529":{"description":"All inference slots busy. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/YesNoRequest"}}}}}},"/v1/decision-machine-1/classify":{"post":{"operationId":"classify","tags":["decision-machine-1"],"summary":"Pick one label","description":"Picks the best label for the text and returns the full distribution. Describe labels for better accuracy.\n\nSend `text` for one result, or `texts` for a batch wrapped as `{ results: [...] }`. The response carries `x-input-chars` (input characters) and `x-input-tokens` (input tokens billed for this call) headers. Each item of `texts` (and each of `statements` or `questions`) counts as one request against the requests-per-minute limit.","responses":{"200":{"description":"Result, or { results } for a batch","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ClassifyResult"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ClassifyResult"}}},"required":["results"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Inference failed twice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"529":{"description":"All inference slots busy. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequest"}}}}}},"/v1/decision-machine-1/classify-tree":{"post":{"operationId":"classifyTree","tags":["decision-machine-1"],"summary":"Walk a label tree","description":"Runs classify once per level of a nested label tree, on the same text, descending into the winning label each time. Returns the path, the deepest label, the compound probability and confidence (products over the levels), and one entry per level with its scores, the input it sent to the model and its inference time.\n\nSend `text` for one result, or `texts` for a batch wrapped as `{ results: [...] }`. The response carries `x-input-chars` (input characters) and `x-input-tokens` (input tokens billed for this call) headers. Each item of `texts` (and each of `statements` or `questions`) counts as one request against the requests-per-minute limit. Each level re-sends the text, so latency grows with depth.","responses":{"200":{"description":"Result, or { results } for a batch","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ClassifyTreeResult"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ClassifyTreeResult"}}},"required":["results"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Inference failed twice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"529":{"description":"All inference slots busy. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyTreeRequest"}}}}}},"/v1/decision-machine-1/rate":{"post":{"operationId":"rate","tags":["decision-machine-1"],"summary":"Place the text on a scale","description":"Rates the text on an ordered scale of described levels. `score` is the probability-weighted position, `level` the most likely index.\n\nSend `text` for one result, or `texts` for a batch wrapped as `{ results: [...] }`. The response carries `x-input-chars` (input characters) and `x-input-tokens` (input tokens billed for this call) headers. Each item of `texts` (and each of `statements` or `questions`) counts as one request against the requests-per-minute limit.","responses":{"200":{"description":"Result, or { results } for a batch","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RateResult"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/RateResult"}}},"required":["results"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Inference failed twice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"529":{"description":"All inference slots busy. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateRequest"}}}}}},"/v1/decision-machine-1/answer":{"post":{"operationId":"answer","tags":["decision-machine-1"],"summary":"Answer questions from the text","description":"Extractive question answering: each answer is a span of the text, with its position. Null when nothing fits.\n\nSend `text` for one result, or `texts` for a batch wrapped as `{ results: [...] }`. The response carries `x-input-chars` (input characters) and `x-input-tokens` (input tokens billed for this call) headers. Each item of `texts` (and each of `statements` or `questions`) counts as one request against the requests-per-minute limit.","responses":{"200":{"description":"Result, or { results } for a batch","content":{"application/json":{"schema":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/AnswerResult"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/AnswerResult"}}},"required":["results"]}]},{"type":"object","properties":{"results":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/AnswerResult"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/AnswerResult"}}},"required":["results"]}]}}},"required":["results"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Inference failed twice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"529":{"description":"All inference slots busy. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerRequest"}}}}}},"/v1/decision-machine-1/extract":{"post":{"operationId":"extract","tags":["decision-machine-1"],"summary":"Extract structured data","description":"Fills a JSON Schema from the text. Supports strings, numbers, booleans, enums, string arrays and nested objects. Arrays of objects are accepted and returned empty. Missing values are null.\n\nSend `text` for one result, or `texts` for a batch wrapped as `{ results: [...] }`. The response carries `x-input-chars` (input characters) and `x-input-tokens` (input tokens billed for this call) headers. Each item of `texts` (and each of `statements` or `questions`) counts as one request against the requests-per-minute limit.","responses":{"200":{"description":"Result, or { results } for a batch","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExtractResult"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ExtractResult"}}},"required":["results"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Inference failed twice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"529":{"description":"All inference slots busy. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequest"}}}}}},"/v1/decision-machine-1/entities":{"post":{"operationId":"entities","tags":["decision-machine-1"],"summary":"Find entities","description":"Finds every span matching each entity type, with positions.\n\nSend `text` for one result, or `texts` for a batch wrapped as `{ results: [...] }`. The response carries `x-input-chars` (input characters) and `x-input-tokens` (input tokens billed for this call) headers. Each item of `texts` (and each of `statements` or `questions`) counts as one request against the requests-per-minute limit.","responses":{"200":{"description":"Result, or { results } for a batch","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EntitiesResult"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/EntitiesResult"}}},"required":["results"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Inference failed twice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"529":{"description":"All inference slots busy. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitiesRequest"}}}}}},"/v1/decision-machine-1/verify":{"post":{"operationId":"verify","tags":["decision-machine-1"],"summary":"Check a value against the text","description":"Does the text say `value` for `field`? Extracts the field and compares. `found` shows what the text actually says.\n\nSend `text` for one result, or `texts` for a batch wrapped as `{ results: [...] }`. The response carries `x-input-chars` (input characters) and `x-input-tokens` (input tokens billed for this call) headers. Each item of `texts` (and each of `statements` or `questions`) counts as one request against the requests-per-minute limit.","responses":{"200":{"description":"Result, or { results } for a batch","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/VerifyResult"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/VerifyResult"}}},"required":["results"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Inference failed twice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"529":{"description":"All inference slots busy. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}}}}},"/v1/models":{"get":{"operationId":"listModels","tags":["openai"],"summary":"List models","responses":{"200":{"description":"Models","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}},"required":["object","data"]}}}}}}},"/v1/models/{id}":{"get":{"operationId":"getModel","tags":["openai"],"summary":"Get a model","responses":{"200":{"description":"Model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"404":{"description":"Unknown model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/chat/completions":{"post":{"operationId":"chatCompletions","tags":["openai"],"summary":"OpenAI-compatible chat completions","description":"Drop-in for OpenAI clients with `model: \"decision-machine-1\"`. Two modes: `response_format: { type: \"json_schema\" }` extracts the schema from the user messages and returns the JSON as the assistant content; `tools` picks a tool and fills its arguments (function calling). Plain chat is rejected with 400. `stream: true` returns one chunk then [DONE].","responses":{"200":{"description":"Completion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}}}},"400":{"description":"Invalid or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"529":{"description":"All inference slots busy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}}}}}}