JSON mode
Set response_format: {"type": "json_object"} to constrain output to a single valid JSON object — for extraction, triage scoring, and anything a program consumes downstream.
Cura 1T is a research model, not a medical service, and not a substitute for a clinician. Benchmark scores do not establish safety for unsupervised clinical use.
Example
Always describe the schema you expect in the prompt — JSON mode guarantees syntax, your prompt defines the keys:
Python
import jsonimport osfrom openai import OpenAI client = OpenAI(api_key=os.environ["ACTAVA_API_KEY"], base_url="https://inference.actava.ai/v1") response = client.chat.completions.create( model="actava/cura-soar", response_format={"type": "json_object"}, messages=[ { "role": "system", "content": ( "Extract structured data. Respond in JSON with keys: " "chief_complaint (string), red_flags (string[]), triage_level (1-5)." ), }, { "role": "user", "content": "58F, crushing substernal chest pain radiating to left arm, diaphoretic, 30 min.", }, ],)data = json.loads(response.choices[0].message.content)print(data["triage_level"])Output
{ "chief_complaint": "crushing substernal chest pain radiating to left arm", "red_flags": ["radiation to left arm", "diaphoresis", "duration 30 minutes"], "triage_level": 1}Notes
- Mention "JSON" in your prompt. The request succeeds either way, but if the messages never reference JSON output the object you get back is unpredictable — always state the format and keys explicitly.
- Truncation produces invalid JSON. If finish_reason is "length", the object was cut off — raise max_tokens rather than attempting repair.
- Validate downstream. Syntax is guaranteed; clinical semantics are not — check required keys and ranges before acting on the values.