Start here

Playground

Run every capability from the browser in the API Reference tab, and read what comes back.

Every endpoint page in the API Reference tab carries a live request builder. You edit the JSON body, press Send, and get the real response from https://api.milliseconds.ai.

No API key is required during the launch period. The builder shows no credential fields, because the API declares none.

1

Open an endpoint

Go to the API Reference and open an endpoint, for example POST /v1/decision-machine-1/classify.

2

Paste a body and send

Replace the prefilled body with an example below. Press Send.

Every response on this page is a real capture. Two headers come back on every capability call: x-input-chars reports the number of input characters, and x-input-tokens reports the input tokens billed for this call. You pay $0.04 per million input tokens and $0 per output token. See Pricing.

Yes / no

Endpoint POST /v1/decision-machine-1/yes-no.

Request
{
"text": "My order still has not arrived and I need it before Friday. This is the third time I am writing.",
"statement": "The customer expresses urgency.",
"when_true": "The customer needs this resolved urgently.",
"when_false": "The customer is not in a hurry."
}
Response
{"statement":"The customer expresses urgency.","answer":true,"probability":1}

Look at probability, not answer. answer is only probability >= 0.5. Now edit when_true to "yes" and when_false to "no" and send again. The probability drops to 0 and answer turns false, which is wrong for this text. The hint text must describe the case, a rule covered in writing good statements and labels.

Classify

Endpoint POST /v1/decision-machine-1/classify.

Request
{
"text": "My order still has not arrived and I need it before Friday. This is the third time I am writing.",
"labels": {
"billing": "payment, invoice or refund problems",
"shipping": "delivery, tracking or delays",
"account": "login, password or profile problems"
}
}
Response
{"label":"shipping","probability":0.995,"confidence":0.973,"scores":{"billing":0.004,"shipping":0.995,"account":0}}

Look at confidence and scores. confidence is 1 − normalized entropy: 0.973 means one clear winner. scores shows the runner-up, which tells you which label pair to rewrite. Send "labels": ["billing", "shipping", "account"] and compare the scores you get without descriptions.

Rate

Endpoint POST /v1/decision-machine-1/rate.

Request
{
"text": "My order still has not arrived and I need it before Friday. This is the third time I am writing.",
"scale": ["Calm", "Annoyed", "Frustrated", "Threatening to leave"]
}
Response
{"score":1.504,"level":2,"confidence":0.489,"scores":[0,0.499,0.499,0.002]}

Look at score against level. level is the argmax, here 2 by a margin under 0.001. score is the probability-weighted position, 1.504, sitting between Annoyed and Frustrated. confidence of 0.489 reports the tie honestly. Route on score when the levels are close.

Answer

Endpoint POST /v1/decision-machine-1/answer.

Request
{
"text": "Tim Cook announced the iPhone 17 in Cupertino on Tuesday. It starts at $999.",
"questions": ["Who announced the product?", "How much does it cost?", "What is the CEO salary?"]
}
Response
{"results":[{"question":"Who announced the product?","answer":"Tim Cook","probability":0.998,"start":0,"end":8},{"question":"How much does it cost?","answer":"$999","probability":0.995,"start":71,"end":75},{"question":"What is the CEO salary?","answer":null,"probability":0,"start":null,"end":null}]}

Look at the third result. Answers are spans of your text, never generated prose. A question the text cannot answer returns answer: null and probability: 0. Check start and end against your own string to confirm the span.

Extract

Endpoint POST /v1/decision-machine-1/extract.

Request
{
"text": "INVOICE #4471\nBilled to: Acme Corp\nInvoice date: 3 September 2026\nTotal due: $2,676.00\nPayment terms: Net 30",
"schema": {
"type": "object",
"title": "invoice",
"properties": {"invoice_number": {"type": "string", "description": "the invoice number"},
"customer": {"type": "string", "description": "who the invoice is billed to"},
"total_due": {"type": "number", "description": "the total amount due"},
"paid": {"type": "boolean", "description": "whether the invoice is paid"}}
}
}
Response
{"data":{"invoice_number":"4471","customer":"Acme Corp","total_due":2676,"paid":true}}

Look at paid. This invoice text says nothing about payment, and the model still returned true. Extraction gives you types, not truth. Confirm any value that drives an action with verify. Note also that $2,676.00 came back as the number 2676.

Send {"type": "string"} as the whole schema to see the guard: 400 invalid_schema, schema must be an object with properties.

Entities

Endpoint POST /v1/decision-machine-1/entities.

Request
{
"text": "Tim Cook announced the iPhone 17 in Cupertino on Tuesday. It starts at $999.",
"types": {"person": "a person name", "product": "a product name", "location": "a city or country"}
}
Response
{"entities":[{"type":"person","text":"Tim Cook","probability":0.999,"start":0,"end":8},{"type":"product","text":"iPhone 17","probability":0.993,"start":23,"end":32},{"type":"location","text":"Cupertino","probability":0.999,"start":36,"end":45}]}

Look at the offsets. Entities come back sorted by start. The offsets let you redact or highlight the original string without a search. Add "date": "a day or date" to types and send again.

Verify

Endpoint POST /v1/decision-machine-1/verify.

Request
{
"text": "INVOICE #4471\nBilled to: Acme Corp\nTotal due: $2,676.00",
"field": {"name": "invoice_number", "description": "the invoice number"},
"value": "4471"
}
Response
{"matches":true,"probability":0.842,"found":["INVOICE #4471"]}

Look at found. It holds the raw spans the model read for that field, match or not. Change value to 4417 and send again: matches goes false, probability goes to 0, and found still shows ["INVOICE #4471"]. That is your debugging output.

The OpenAI-compatible route

POST /v1/chat/completions runs in the explorer too. Plain chat returns 400 on purpose. Send response_format.json_schema or tools, as shown in Structured extraction and Function calling.

Try an error

Send classify with a one-item labels array. Every error uses this envelope. The full list of codes lives in Errors.

Response — 400
{"error":{"code":"invalid_request","message":"labels: Too small: expected array to have >=2 items"}}

Typical round trips from a laptop: classify, rate and yes-no land near 1 second. answer, entities and verify land near 0.5 seconds, extract near 0.7 seconds. Errors return in under 0.2 seconds.

Next