Streaming
Long clinical answers are better consumed as they generate. Set stream: true and the response becomes a server-sent-event stream of chat.completion.chunk objects.
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.
How to stream
import osfrom openai import OpenAI client = OpenAI(api_key=os.environ["ACTAVA_API_KEY"], base_url="https://inference.actava.ai/v1") stream = client.chat.completions.create( model="actava/cura-soar", messages=[{"role": "user", "content": "Walk through sepsis screening criteria."}], stream=True,)for chunk in stream: delta = chunk.choices[0].delta if chunk.choices else None if delta and delta.content: print(delta.content, end="", flush=True)Wire format (no SDK)
Each event is a data: line carrying one JSON chunk; content arrives in choices[0].delta.content. The stream terminates with data: [DONE].
data: {"object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant","content":""}}]}data: {"object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Screen"}}]}data: {"object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}data: [DONE]Usage accounting
Token usage for a streamed response is reported once, on the final chunk — read usage there rather than summing deltas yourself.
Terminating early
Close the HTTP connection (or break out of the SDK iterator) to stop generation; you are billed for tokens generated up to termination. Cap the worst case with max_tokens.