Watch the models you use
You use a handful of models, and you want to know when one of them gets a retirement date, changes price, or drops a region. This tutorial polls GET /v1/events for those models only, then shows the webhook way.
You pass your list on each request, with models. A saved list of your models, which the API and webhooks will use for you, is coming.
1. Name your models
Section titled “1. Name your models”Use the names you already use: a family (claude-sonnet-4-5), a version (claude-sonnet-4-5-20250929), an offering slug, or the ID you call on a platform (anthropic.claude-sonnet-4-5-20250929-v1:0). They match exactly, ignoring case. A family brings all its versions and their offerings. A platform’s model ID brings that platform’s offerings, plus the version’s own events: the model maker’s lifecycle, such as Anthropic announcing a retirement. So a Bedrock watcher can get the maker’s retirement while Bedrock still serves the model. Check entity.type and entity.slug before treating an event as a platform’s own: an offering event is the platform’s, a model_version event is the maker’s. Up to 100, comma-separated. See IDs and slugs.
2. Ask for recent changes
Section titled “2. Ask for recent changes”curl -H "Authorization: Bearer $MA_API_KEY" \ "$MA_API/v1/events?models=gpt-4o,claude-sonnet-4-5&materiality=high,medium&since=2026-11-23T00:00:00Z"models: only events about these models.materiality=high,medium: leave out the low ones (a region added, a deprecation date). See Materiality.since: events detected at or after this time.
The answer, oldest first (the listEvents example):
{ "data": [ { "id": "01M855W3PP5T7T06Y7EXD2BWS3", "type": "lifecycle.retirement_date_changed", "detected_at": "2026-11-23T21:44:26.07Z", "materiality": "high", "entity": {"type": "offering", "slug": "bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"}, "data": {"field": "retires_on", "region": null, "old": null, "new": "2027-04-27", "effective_on": "2027-04-27", "detail": {"retires_on_kind": {"old": "none", "new": "exact"}}} }, { "id": "01M871763TVZEQ81EMSSVHYKEH", "type": "price.changed", "detected_at": "2026-11-24T15:01:34.97Z", "materiality": "medium", "entity": {"type": "offering", "slug": "openai/gpt-4o-2024-08-06"}, "data": {"field": "usd", "region": null, "old": "2.5", "new": "2.75", "effective_on": null, "detail": {"price_kind": "input_token", "unit": "per_million_tokens", "change_pct": 10}} } ], "next_cursor": "eyJhZnRlciI6IjAxTTg3MTc2M1RWWkVRODFFTVNTVkhZS0VIIiwiZiI6IjNhOWMxZTBiNzI0ZDZmODEifQ", "unmatched_models": []}(Trimmed: each event also has version, correction, correction_reason and provenance.) Bedrock set a retirement date for its Claude Sonnet 4.5 offering, and an input price for GPT-4o went up 10%.
Check unmatched_models: a name there matched nothing, so you’d never hear about it. Fix it before you rely on the list.
3. Poll for what’s new
Section titled “3. Poll for what’s new”Keep the id of the last event you processed. Next time, pass it as after, with the same filters:
curl -H "Authorization: Bearer $MA_API_KEY" \ "$MA_API/v1/events?models=gpt-4o,claude-sonnet-4-5&materiality=high,medium&after=01M871763TVZEQ81EMSSVHYKEH"New events always sort after old ones, so after never skips one. An empty data means nothing new yet. Unlike cursor, after works when you’ve reached the last page.
How often? Sources load once a day, at different times. Every 15 minutes is plenty. See Rate limits.
A complete poller
Section titled “A complete poller”It stores the last event ID in a file, so a restart carries on where it stopped, retries 429 and 5xx with backoff, and warns about names that match nothing. Replace handle with your own: open a ticket, post to chat.
"""poll_events.py: prints new high and medium change events about the models you use.Python 3.9+, standard library only.
Run: MA_API=https://dev.modelatlas.io MA_API_KEY=… python3 poll_events.py"""import datetimeimport http.clientimport jsonimport osimport randomimport timeimport urllib.errorimport urllib.parseimport urllib.request
API = os.environ["MA_API"].rstrip("/")KEY = os.environ["MA_API_KEY"]MODELS = "gpt-4o,claude-sonnet-4-5" # the names you use: families, versions, offerings or platform IDsSTATE_FILE = "last_event_id.txt" # the last event processed, so a restart carries on from itPOLL_SECONDS = 15 * 60
def get_events(params): url = API + "/v1/events?" + urllib.parse.urlencode(params, safe=",:") request = urllib.request.Request(url, headers={"Authorization": "Bearer " + KEY}) for attempt in range(5): try: with urllib.request.urlopen(request, timeout=30) as response: return json.load(response) except urllib.error.HTTPError as e: if e.code != 429 and e.code < 500: raise # another 4xx gets the same answer every time: fix the request except (OSError, http.client.HTTPException): pass # a network error or a timeout, even mid-body: try again time.sleep(2 ** attempt + random.random()) # 1, 2, 4, 8, 16 seconds, with jitter raise RuntimeError("the API kept failing; try again later")
def handle(event): data = event["data"] if data.get("entitled") is False: change = "(this field group isn't in your plan)" else: region = f" in {data['region']}" if data["region"] else "" old, new = (v if v is not None else "(none)" for v in (data["old"], data["new"])) change = f"{data['field']}{region}: {old} -> {new}" print(f"{event['detected_at']} {event['materiality'] or 'fix':6} {event['type']} {event['entity']['slug']} {change}", flush=True)
def main(): last_id = open(STATE_FILE).read().strip() if os.path.exists(STATE_FILE) else None warned = False while True: params = {"models": MODELS, "materiality": "high,medium", "limit": 200} if last_id: params["after"] = last_id else: # the first run: start from the last 7 days since = datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(days=7) params["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ") page = get_events(params) if page.get("unmatched_models") and not warned: print("these names matched no model:", ", ".join(page["unmatched_models"]), flush=True) warned = True for event in page["data"]: handle(event) last_id = event["id"] with open(STATE_FILE, "w") as f: f.write(last_id) if page["next_cursor"] is None: # caught up: wait for new events time.sleep(POLL_SECONDS)
if __name__ == "__main__": main()It prints lines like these (from the example above):
2026-11-23T21:44:26.07Z high lifecycle.retirement_date_changed bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0 retires_on: (none) -> 2027-04-272026-11-24T15:01:34.97Z medium price.changed openai/gpt-4o-2024-08-06 usd: 2.5 -> 2.75Things to know
Section titled “Things to know”- Corrections are left out. When we fix our own data, the events are corrections, hidden unless you add
include_corrections=true. Good for alerts. If you keep a copy of our data, include them: addinclude_corrections=trueand dropmateriality, since a correction has no materiality (null) and amaterialityfilter always leaves corrections out. The poller printsfixfor those. See Corrections. - Your plan. An event whose field group isn’t in your plan is still listed, with
data: {"entitled": false}. The poller prints a note for those. - History. You can read events detected in the last 400 days on today’s plans. A
sincebefore that isn’t an error. - Events are about offerings and versions. A family or version in
modelsbrings its offerings’ events too, so you see each platform’s changes.
Or get them pushed: webhooks
Section titled “Or get them pushed: webhooks”Instead of polling, a webhook subscription sends the same events to your HTTPS endpoint as they’re detected. The body’s events are the same JSON as above. A subscription for the same models and levels, every event type, looks like this (see createWebhookSubscription):
{ "endpoint_id": "2a7f9c4d-8e1b-4f6a-93d5-c0b8e2f17a46", "event_types": [], "materiality": ["high", "medium"], "include_corrections": false, "scope": "models", "models": ["gpt-4o", "claude-sonnet-4-5"]}An empty event_types means every type, as the poller gets. To hear only about retirements, list lifecycle.retirement_date_changed and lifecycle.status_changed instead.
Webhook endpoints and subscriptions are managed with a portal sign-in, not an API key, and the portal isn’t open yet: ask your Model Atlas contact to set one up. Then follow Receiving webhooks to verify signatures and answer correctly. Keep the poller’s after loop as a backstop: it’s how you catch up after downtime.
- Change events: every type and the materiality rules.
- Find models retiring before a date: today’s state, not just the changes.