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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| input | string (CSV) | yes | brick,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. |
| model | string | yes | ocsai2 | Which scoring model to use. See the live list below. Defaults to "ocsai2" (recommended). |
| task | string | no | uses | Divergent-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. |
| language | string | no | eng | ISO 639-3 code (e.g. "eng", "spa", "fre"). Models advertise supported languages; only ocsai2 is multilingual. |
| prompt | string | no | — | If 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. |
| question | string | no | — | Optional 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_input | boolean | no | true | When 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_input | boolean | no | false | When true, an extra CSV column carries the per-row task question (between prompt and response). Default false. |
| elab_method | "none" | "whitespace" | no | none | How to compute elaboration alongside originality. 'whitespace' adds an `elaboration` field equal to the word count of the response. |
| logprob_scoring | boolean | no | true | When 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-KEYheader | string (header) | no | — | Optional 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.
| Name | Description | Tasks | Languages |
|---|---|---|---|
| ocsai2recommended | Cross-lingual, multi-task, gpt-4.1-mini base | uses, completion, consequences, instances, metaphors, CUSTOM | ara, chi, dut, eng, fre, ger, heb, ita, pol, rus, spa, CUSTOM |
| ocsai2-paper | Paper model, gpt-4.1-mini base | uses, completion, consequences, instances, metaphors, CUSTOM | ara, chi, dut, eng, fre, ger, heb, ita, pol, rus, spa, CUSTOM |
| ocsai2-paper-xs | Paper model, gpt-4.1-nano base | uses, completion, consequences, instances, metaphors, CUSTOM | ara, chi, dut, eng, fre, ger, heb, ita, pol, rus, spa, CUSTOM |
| ocsai-1.6 | Ocsai 1.5, gpt-4o-mini base | uses, completion, consequences, instances, metaphors, CUSTOM | ara, chi, dut, eng, fre, ger, heb, ita, pol, rus, spa, CUSTOM |
| ocsai1-4o | Ocsai 1, English-focused, gpt-4o-mini base | uses, 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-KEYlifts 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.