Quickstart
1. Create an API key
Create a key with the write:repository scope in the Modaic dashboard, then export it.
export MODAIC_API_KEY="mdc_..."
Install an SDK to use Python or TypeScript. The cURL example uses the key directly.
2. Run a decision
Send the support ticket as state and ask whether it needs immediate attention.
from modaic import Modaic
client = Modaic()
result = client.decisions.create(
model="mo-latest",
state="Checkout is unavailable.",
questions={"urgent": {"type": "noul", "instructions": "Does this require immediate attention?"}},
)
print(result.answers["urgent"].noul)
The urgent answer is a number from 0 to 1. For example, 0.94 means the model assigned a 94% likelihood to the ticket needing immediate attention.