Skip to content

Formats

All three endpoints take ?format= and return the result in that format. The default is json.

curl "https://api.prismlet.com/v1/results/0192f5c1-7c1a-7b3e-9f55-3c1d2e4a5b6c?format=raw" \
-H "Authorization: Bearer $PRISMLET_API_KEY"
format Content-Type Body
json application/json; charset=utf-8 The result, with answers shaped by the Lens.
raw application/json; charset=utf-8 The result, with the stored answers and every probability.
csv text/csv; charset=utf-8 A header row and the result's row.
tsv text/tab-separated-values; charset=utf-8 The same, separated by tabs.
jsonl application/x-ndjson; charset=utf-8 The result's row as one line of JSON.

An empty format= counts as left out and returns json. An unknown value answers 400, before anything reaches the model. Errors are JSON in every format, so check the status code before you parse a CSV body.

The envelope, with one entry in answers per Lens column, in Lens order. Values are keys: option keys, other, insufficient_information, and yes, no or unsure.

{
"id": "0192f5c1-7c1a-7b3e-9f55-3c1d2e4a5b6c",
"ref": "TCK-8812",
"prism": "support-routing",
"version": 3,
"status": "ok",
"error": null,
"took_ms": 640,
"created_at": "2026-09-23T09:14:02.187Z",
"answers": {
"team": "billing",
"team_probability": 0.91,
"urgent": "yes",
"tone": "annoyed",
"tone_average": 2.05
}
}

Use json when you want the columns someone chose in the app, named the way they named them.

The same envelope, with answers holding the stored answer to every question, keyed by question key. Each answer carries its type and every probability.

{
"id": "0192f5c1-7c1a-7b3e-9f55-3c1d2e4a5b6c",
"ref": "TCK-8812",
"prism": "support-routing",
"version": 3,
"status": "ok",
"error": null,
"took_ms": 640,
"created_at": "2026-09-23T09:14:02.187Z",
"answers": {
"team": {
"type": "choice",
"value": "billing",
"probabilities": {
"billing": 0.91,
"technical": 0.05,
"other": 0.03,
"insufficient_information": 0.01
},
"confidence": 0.88
},
"urgent": {
"type": "yes_no",
"probability": 0.83
},
"tone": {
"type": "scale",
"level": "annoyed",
"probabilities": {
"calm": 0.12,
"annoyed": 0.71,
"angry": 0.17
}
}
}
}
type Keys
choice value (option key, other, insufficient_information or null), probabilities, confidence
yes_no probability of yes
scale level, probabilities

A Choice's probabilities include other and insufficient_information. The keys of probabilities come in no particular order. For the order of options or levels, read the prism in the app.

Use raw when a Lens edit must not change what your code reads. A json read applies the current Lens, so renaming a column or moving a cutoff changes the next response for every result, old ones included. raw answers never change. Apply your own cutoffs to probability, and your code decides when they move.

A header row, then the result's row.

format=csv
result_id,ref,version,status,error,created_at,subject,text,team,team_probability,urgent,tone,tone_average
0192f5c1-7c1a-7b3e-9f55-3c1d2e4a5b6c,TCK-8812,3,ok,,2026-09-23T09:14:02.187Z,Charged twice this month,"Hi, I was billed twice for September. Please refund the second charge before Friday.",Billing,0.91,Yes,Annoyed,2.05

The columns are, in this order:

  1. result_id, ref, version, status, error, created_at
  2. One column per field of the prism's latest version, holding what the call sent
  3. The Lens columns

A result made by an older version still gets the latest version's field columns. A field the old version did not have is an empty cell, and a field the latest version dropped is not in the row.

Cells hold labels, as in the app: option labels such as Billing, Other and Not enough information, and Yes, No or Unsure. An all column lists every option with its probability, highest first, such as Billing 0.91; Technical support 0.05; Other 0.03; Not enough information 0.01. An empty value, such as a null ref, is an empty cell.

csv lines end in CRLF. A cell holding a comma, a double quote or a line break is quoted, with quotes doubled, as RFC 4180 describes. tsv lines end in LF, and a tab or line break inside a cell becomes a space.

A text cell that starts with =, +, -, @, a tab or a carriage return gets a single quote in front, so a spreadsheet shows it as text instead of running it as a formula. A ref of =SUM(A1) arrives as '=SUM(A1). Numbers such as probabilities are never changed, and json, raw and jsonl carry the value as sent.

A csv row from the API is the same row a download from the app has for that result, so you can append API rows to an exported file.

The row as one line of JSON, ending in LF. It has the csv columns with keys instead of labels and all columns as objects. An empty Lens cell, ref or error is null, and a field the result's version did not have is "".

format=jsonl
{"result_id":"0192f5c1-7c1a-7b3e-9f55-3c1d2e4a5b6c","ref":"TCK-8812","version":3,"status":"ok","error":null,"created_at":"2026-09-23T09:14:02.187Z","subject":"Charged twice this month","text":"Hi, I was billed twice for September. Please refund the second charge before Friday.","team":"billing","team_probability":0.91,"urgent":"yes","tone":"annoyed","tone_average":2.05}

Append each response to a file and you have a JSON Lines file of results. Answering many texts does that.

Value json, raw, jsonl csv, tsv
Option billing Billing
Reserved options other, insufficient_information Other, Not enough information
Yes / No label yes, no, unsure Yes, No, Unsure
Probability 0.91 0.91
Empty Lens cell null empty cell
Missing field "" in jsonl empty cell

A failed result has the same shape in every format. The call that made it answers 502, and GET /v1/results/{result_id} answers 200.

Format answers or Lens columns error
json, raw answers: null The error text
csv, tsv Empty cells The error text, a cell
jsonl null The error text, a string

A result that succeeded has an empty error cell in csv and tsv, and null in the other formats.

502, format=csv
result_id,ref,version,status,error,created_at,subject,text,team,team_probability,urgent,tone,tone_average
0192f5c3-2b4e-7d10-8a61-5e0f9c7d2a13,TCK-8812,3,failed,"The model took too long to answer, so we stopped after 15 seconds.",2026-09-23T09:15:40.502Z,Charged twice this month,"Hi, I was billed twice for September. Please refund the second charge before Friday.",,,,,