Run a study (spends credits)
run_studyActually ask the audience. THIS SPENDS THE WORKSPACE'S CREDITS and cannot be undone.
Returns run_id, study_id and web_url; the result arrives through get_study(run_id).
Credits are debited as the study executes, and the estimate is claimed against the workspace's
daily agent budget at submission. Call estimate_study first unless the study is small, and ask
the user before submitting anything with confirm_recommended=true. Poll get_study every 5 to 10
seconds, and no faster than once per 10 seconds per study when several are in flight: the key
allows 30 calls a minute in total.
kind: pick by what respondents are shown, and pass ONLY that kind's material; another kind's
field is refused (kind_mismatch) rather than ignored.
closed_question a question with 2-8 answer options (add 'Not sure' if they are not exhaustive)
open_question answered in their own words, coded into themes
preference_test choose between 2-12 written options, with reasons (the web app's creative
test for copy or concepts)
image_reaction react to 1-3 images (the web app's creative test for pictures). Respondents
see the pixels, so pass the image itself, never your description of it:
host attachments as image_files first; else request_upload, send the file,
then image_refs; a public address as image_urls. Never invent a download_url
or file_id. A rough sketch of an IDEA may instead be described in words in an
open_question or preference_test with material_is_description=true.
url_feedback a page test: first impression, three ratings, then your question
survey / guide a questionnaire (survey) or interview guide (guide): pass instrument_id from
the web app's library, or transcribe the user's document into questions in
order and tell them skip logic, grids and pictures do not carry over
focus_group a moderated discussion over topics, 3 to 8 seats
society a PR test: stimulus (an announcement, policy or message, verbatim)
spreads through the audience over days simulated days on platform
(weibo | xiaohongshu | x | reddit | internal). People see it through their
feed, post, reply, repost and privately change their minds only on arguments
they read. events places later facts on the timeline ("day 3: the company
apologises"). variants adds up to 4 other versions of the announcement and
ranks every version by how it moves opinion against saying nothing.
Returns reach and fermentation by day, private vs public stance,
the arguments that emerged, who moved whom. Compares scenarios for one
audience; never a forecast of the real platform.
audience_ids: from list_audiences. respondents: per audience; the default is 50, or the
kind's smaller size (url_feedback 30, focus_group 8, society 100). Ask for more only when the user wants
more, and stay inside what today's workspace budget still covers. respondents_by_audience
overrides per id.
study_id: an earlier study's id, to ask the SAME respondents a follow-up (the whole panel answers
again with their earlier answers in front of them; there is no per-option targeting).
notes: the research goal, verbatim, for the report.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | url_feedback only: the page | |
| days | No | society only: simulated days (default 5) | |
| kind | Yes | closed_question | open_question | preference_test | image_reaction | url_feedback | survey | guide | focus_group | society | |
| notes | No | The user's research goal or context, verbatim | |
| events | No | society only: later facts placed on the timeline, each {day, text} | |
| topics | No | focus_group only: 1-12 discussion topics in order | |
| options | No | closed_question / preference_test: the answer options exactly as respondents read them | |
| platform | No | society only: weibo | xiaohongshu | x | reddit | internal (default: a generic feed) | |
| question | No | The exact question respondents receive, in the user's language. For focus_group/survey/guide: a one-line label | |
| stimulus | No | society only: the announcement, policy or message people react to, verbatim | |
| study_id | No | Follow-up: the study_id of an earlier run_study, to ask the same respondents again | |
| variants | No | society only: up to 4 other versions of the announcement, verbatim; the result ranks every version by how it moves opinion against saying nothing | |
| questions | No | survey / guide only, instead of instrument_id: the user's questions in order, each {question, options?, multi_select?}; leave options out for an open question | |
| image_refs | No | image_reaction only: refs from request_upload, once the image has been sent | |
| image_urls | No | image_reaction only: 1-3 public image URLs | |
| image_files | No | image_reaction only: host-provided chat attachments; prefer these over another upload. Never invent download_url or file_id | |
| respondents | No | Respondents per audience | |
| audience_ids | Yes | Audience ids from list_audiences (1-8) | |
| wait_seconds | No | Block up to this long for a small study to finish and return its result inline (max 45) | |
| instrument_id | No | survey / guide only: the saved instrument's id | |
| idempotency_key | No | Your own token for this submission; a retry with the same token returns the existing study instead of running it twice | |
| material_is_description | No | true when respondents will see YOUR description of the user's material rather than the material itself; results are labelled accordingly | |
| respondents_by_audience | No | Per-audience override {audience_id: n} |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | false means the call failed: read `error` and `hint` | |
| hint | No | What to change, when ok is false | |
| kind | No | ||
| next | No | What to do next | |
| note | No | Something to tell the user or keep in mind | |
| error | No | Error code, when ok is false | |
| run_id | No | Poll get_study with this | |
| status | No | ||
| web_url | No | The study in the iMario web app | |
| replayed | No | true: the idempotency_key matched an earlier submission | |
| study_id | No | Pass to run_study for a follow-up with the same respondents | |
| respondents | No | ||
| estimated_credits | No |