Using models
Save questions as a decision model when you want to run the same task on new inputs. This guide creates a model that flags urgent support tickets. Replace acme with your workspace and set up authentication before you start.
1. Save the question
Create the model with a base model and a named question. Keep the question ID stable so future answers and annotations refer to the same task.
from modaic import Modaic
client = Modaic()
model = client.models.create(
workspace="acme",
slug="support-priority",
model="mo-latest",
questions={"urgent": {"type": "noul", "instructions": "Does this require immediate attention?"}},
)
2. Run the saved model
Send a new ticket to acme/support-priority. The model loads its saved question and returns the answer under urgent.
result = client.decisions.create(
model="acme/support-priority",
state="Checkout is unavailable.",
)
print(result.answers["urgent"].noul)
If the response includes an example_id (exampleId in TypeScript), the input was captured for review. Use reviewed examples to optimize the question's instructions.
See Model versions to pin a revision, or List models to find available base models.