Create simulation
POST /simulations
Sample next-item sequences for a supplied population. Requires simulate capability. Person IDs must be unique within the request; candidate IDs must belong to the model catalog. Steps are interactions, not time. The same seed is reproducible within a pinned model and runtime.
Use the variables supplied at onboarding.
curl --fail-with-body -X POST "$JEAN_BASE_URL/simulations" \
-H "Authorization: Bearer $JEAN_API_KEY" \
-H "Idempotency-Key: YOUR_UNIQUE_REQUEST_KEY" \
-H "Content-Type: application/json" \
-d '{"model_id":"mdl_sim_demo_v1","population":[{"person_id":"person_7","history":["sku_42"]}],"candidate_item_ids":["sku_43","sku_44"],"steps":5,"trajectories_per_person":1,"repeat_policy":"allow","seed":42}'
Body
| Field | Type | Required | Notes |
|---|---|---|---|
model_id | string | yes | |
population | object[] | yes | 1–20 entries. |
candidate_item_ids | string[] | yes | 1–1000 entries. |
steps | integer | no | Default: 5. Range: 1–10. |
trajectories_per_person | integer | no | Default: 1. Range: 1–5. |
repeat_policy | allow, exclude_history | no | Default: "allow". |
seed | integer | yes | Range: 0–2147483647. |
Response · 202
{
"id": "job_demo",
"kind": "simulation",
"status": "queued",
"request_id": "req_demo"
}
Poll Get job with the returned id. Errors and retries · Complete schemas