Studies

Agent Edit Study

Execute AI-powered study editing.

Returns the agent's mutations alongside the materialized post-edit state. By default (auto_save=True), changes are persisted to the database with automatic rollback on failure — same behavior as before this endpoint started returning mutations. Pass auto_save=false to preview the edits without writing; callers can then POST the mutations to /agent/apply when ready to commit.

model selects the agent's underlying LLM:

  • "smart" (default): gpt-5.6-sol — highest quality on complex multi-step edits, slower and more expensive.
  • "fast": gpt-5.6-terra — faster and cheaper. Good for simple instructions or preview-and-revise flows.
post/api/v1/studies/{study_id}/agent

Path parameters

study_idstring required

Request body

messagestring required
auto_saveboolean
model'fast' | 'smart'
languagestring nullable

Optional target language name or code for generated or rewritten participant-facing content.

Response

Successful Response

messagestring nullable
questionsobject[] required
logicobject[] required
study_settingsobject nullable
question_groupsobject[]
routing_nodesobject[]
routing_branchesobject[]

Changes