Set an agent's model

Set the model tier, temperature and thinking budget one agent runs with. A higher tier and more thinking cost more on every run.

PATCHhttps://app.trygtm.com/api/v1/agents/{preset}/model
Scope
write

Path parameters

presetstringrequired
The agent's role, from list_agents: leads, intent, outreach, copy or qa. Pass this or agentId.leadsintentoutreachcopyqa

Headers

Idempotency-Keystringoptional
A key unique to this write, up to 255 characters. A retry carrying the same key returns the first response instead of running again. Kept for 24 hours.

Body

agent_idstringoptional
The agent's id, from list_agents. Pass this or preset.
tierstringoptional
economy is cheapest, premium the most capable.economystandardpremium
temperaturenumberoptional
0 is most literal, 1 most varied.
thinkingstringoptional
Reasoning budget. The largest cost multiplier; off unless the task needs it.offlowmediumhigh

Request

curl -X PATCH https://app.trygtm.com/api/v1/agents/copy/model \
  -H "Authorization: Bearer $TRYGTM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Response

{
  "data": {
    "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "preset": "copy",
    "name": "GTM Copy",
    "version": 7,
    "detail": "The model settings are saved and apply from the agent's next run."
  }
}

Was this page helpful?