API Reference

The OCS scoring API lets you score divergent-thinking responses programmatically. Requests are application/x-www-form-urlencoded; responses are JSON. No authentication is required for moderate use; an X-API-KEY header lifts rate limits (email peter.organisciak@du.edu for one).

The same endpoint powers the website's scoring forms, so anything you can do on this site you can also do from Python, R, JavaScript, curl, or any other HTTP client.

POSThttps://openscoring.du.edu/llm

Score one or more divergent-thinking responses with an LLM-based model.

Try it

Sample code

curl -X POST 'https://openscoring.du.edu/llm' \
  --data-urlencode 'input=brick,door stop
brick,plant pot
brick,fly into space' \
  --data-urlencode 'model=ocsai2' \
  --data-urlencode 'task=uses' \
  --data-urlencode 'language=eng' \
  --data-urlencode 'elab_method=none' \
  --data-urlencode 'logprob_scoring=true'

Response

No request sent yet. Use the form on the left.

Parameters

NameTypeRequiredDefaultDescription
inputstring (CSV)yesbrick,door stop brick,plant pot …CSV-encoded rows. By default the first column is the prompt and the second is the response. Newlines separate rows; commas separate cells. Standard CSV quoting applies.
modelstringyesocsai2Which scoring model to use. See the live list below. Defaults to "ocsai2" (recommended).
taskstringnousesDivergent-thinking task type (e.g. "uses", "consequences", "instances", "metaphors", "completion"). Models advertise the tasks they were trained on; pass "CUSTOM" or a free-text value if the model allows it.
languagestringnoengISO 639-3 code (e.g. "eng", "spa", "fre"). Models advertise supported languages; only ocsai2 is multilingual.
promptstringnoIf all rows share one prompt, set it here and disable Prompt-in-input below. Otherwise leave blank and let the first CSV column carry the prompt.
questionstringnoOptional plain-text task question (e.g. 'What would happen if rain were soda?'). Provides extra context to the scorer. Only ocsai-1.5 and later.
prompt_in_inputbooleannotrueWhen true (default), the first CSV column is the prompt. Set false if you supply a single `prompt` parameter above and your CSV has only responses.
question_in_inputbooleannofalseWhen true, an extra CSV column carries the per-row task question (between prompt and response). Default false.
elab_method"none" | "whitespace"nononeHow to compute elaboration alongside originality. 'whitespace' adds an `elaboration` field equal to the word count of the response.
logprob_scoringbooleannotrueWhen true, return a weighted-average score using the top OpenAI logprobs (more stable than the single top-token score), along with a confidence value. Recommended, and on by default (the API also defaults to true when omitted). Not supported by ocsai-1.5 — disabled and forced off for those models.
X-API-KEYheaderstring (header)noOptional API key for higher rate limits. Sent as the X-API-KEY HTTP header. Email peter.organisciak@du.edu to request one.

Available models

Generated from config.yaml. Deprecated models are hidden.

NameDescriptionTasksLanguages
ocsai2recommendedCross-lingual, multi-task, gpt-4.1-mini baseuses, completion, consequences, instances, metaphors, CUSTOMara, chi, dut, eng, fre, ger, heb, ita, pol, rus, spa, CUSTOM
ocsai2-paperPaper model, gpt-4.1-mini baseuses, completion, consequences, instances, metaphors, CUSTOMara, chi, dut, eng, fre, ger, heb, ita, pol, rus, spa, CUSTOM
ocsai2-paper-xsPaper model, gpt-4.1-nano baseuses, completion, consequences, instances, metaphors, CUSTOMara, chi, dut, eng, fre, ger, heb, ita, pol, rus, spa, CUSTOM
ocsai-1.6Ocsai 1.5, gpt-4o-mini baseuses, completion, consequences, instances, metaphors, CUSTOMara, chi, dut, eng, fre, ger, heb, ita, pol, rus, spa, CUSTOM
ocsai1-4oOcsai 1, English-focused, gpt-4o-mini baseuses, completion, consequences, instances

Response shape

{
  "parameters": { "model": "...", "language": "...", "task": "...", ... },
  "scores": [
    {
      "prompt": "brick",
      "response": "door stop",
      "originality": 1.4,
      "confidence": null,
      "flags": null
    }
    // …one entry per input row, in order
  ],
  "summative": {
    "n_examples": 3,
    "originality": { "mean": 1.7, "max": 2.3, "min": 1.4 }
    // "elaboration": {...}     when elab_method=whitespace
    // "by_participant": [...]  when input had a participant_id column
  },
  "version": "...",
  "cite": [ "...", "..." ]
}

GEThttps://openscoring.du.edu/about

Service metadata (description, author, contact). No parameters.

curl 'https://openscoring.du.edu/about'

Notes

  • Requests are rate-limited by IP; an X-API-KEY lifts limits substantially. Bulk scoring jobs are best served via API key.
  • Identical requests are cached server-side keyed by (prompt, response, language, task, model), so re-scoring the same data is free.
  • Found a bug or want a code sample for a language not listed? Email me.