Skip to main content

Ask a panel a question

POST/panel/asks

Puts one question to a panel and returns what it answered as counts of people. The panel is synthetic people (the default): made-up US adults drawn from census figures, each answering through a language model, never real people. Ask the general population (US adults) with people, or personas with personas (each an existing persona or a group described in words, with how many of it to ask); each persona's answers are counted on their own and where the groups differ most is named. Or ask this workspace's twins of people interviewed before (twins: true), never mixed with synthetic people. Questions: single choice, scale, choose any, or open (each answers in a sentence or two; the answers come back as themes with quotes). At most 300 people for a fixed-answer question and 40 for an open one; a workspace may ask a limited number of questions a day. Each person's one answer is drawn in code from the chances the model gave for their profile, so the same question asked again with the same key gives the same counts. It asks at once. With billing on, a question to synthetic people costs a fixed price from the workspace's credit ($0.02 a person asked, and at least $0.50 a question), taken when it is asked and given back if it fails or comes back void; a question to twins costs nothing. Tell the researcher the price before calling, unless they already know it. The result says what was taken and what credit is left. Short of credit, nothing is asked and the error says INSUFFICIENT CREDIT (code insufficient_credit) with the shortfall and the address where an admin adds credit: give the researcher that address. The answer may take a minute: when status is queued or running, call get_panel_ask with the askId. Under nine in ten readable answers the result is void. (The MCP tool ask_panel.) Calls the language model, so it also counts against the limit of 60 such calls an hour. Short of credit it is refused with 409, title "Not enough credit" and code: "insufficient_credit", with the amounts and addCreditUrl (CreditProblem).

Scope results:write · Credential a workspace API key (jean_sk_…, make one in the Jean app) or an OAuth access token. See scopes.

curl --fail-with-body -X POST "https://app.jeantechnologies.com/api/v1/panel/asks" \
-H "Authorization: Bearer $JEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "Which matters most when you choose a meal kit?",
"options": [
"Price",
"Variety",
"Fresh ingredients",
"Short cooking time"
],
"people": 30
}'

An Idempotency-Key header is optional here and makes a retry safe. See idempotency.

Body​

FieldTypeRequiredNotes
questionstringyesThe question, as people would be asked it. At most 500 characters.
kind"single", "scale", "multi", "open"nosingle (one answer, the default), scale, multi (choose any) or open (in their own words).
options[]string[]nosingle and multi: the answers to choose from, 2 to 12. At most 12 items.
scaleobjectnoscale: its lowest and highest points and what they mean.
scale.minintegeryes0 to 1.
scale.maxintegeryes2 to 11.
scale.minLabelstringnoAt most 60 characters.
scale.maxLabelstringnoAt most 60 characters.
peopleintegernoHow many people in all. Default 200 for a fixed-answer question, 30 for an open one. With no personas, all of them are the general population. 1 to 300.
personas[]object[]noAsk these groups instead of the general population, each counted on its own. At most 6 items.
personas[].personaIdstring (UUID)noAn existing persona, from list_personas.
personas[].describestringnoOr a group in plain words, such as "parents under 40 in the South who rent" or "Republicans who go to church weekly". Read once by a model against the census's traits and the four assigned ones (party, political views, religion, attendance); what neither records is told to each member as your description. At most 400 characters.
personas[].criteria[]object[]noOr the group as criteria, checked in code with no model call: each a segment and the values that count, all of which must hold. Segments: the census's (Age, Sex, State, US region, Race and ethnicity, Education, Employment, Household income, Marital status, Children under 18 at home) and four assigned to each US member from published distributions (Pew Research Center), never said by them: Party identification (Republican, Lean Republican, No lean, Lean Democrat, Democrat), Political views (Conservative, Moderate, Liberal, Does not say), Religion (Evangelical Protestant, Mainline Protestant, Historically Black Protestant, Catholic, Latter-day Saint (Mormon), Other Christian, Jewish, Muslim, Another religion, Atheist, Agnostic, Nothing in particular) and Religious service attendance (At least once a week, Once or twice a month, A few times a year, Seldom or never). A segment or value not on these lists is refused, named. At most 12 items.
personas[].labelstringnoWith criteria: the group's name as shown. At most 80 characters.
personas[].notRecorded[]string[]noWith criteria: the group's traits the census does not record, told to each member as the group's description and never drawn on. At most 10 items.
personas[].peopleintegernoHow many of this group to ask. Default: the total split evenly. 1 to 300.
personas[].variety"alike", "typical", "varied"noHow varied this group's people are drawn: alike (close to the group's center), typical (the census's own mix, the default) or varied (every mix of age, education and income about equally likely; not census proportions).
variety"alike", "typical", "varied"noHow varied the general population's people are drawn. Default typical: the census's own mix.
twinsbooleannoAsk this workspace's twins of people instead of synthetic people. Fixed-answer questions only.
fromStudyIdstring (UUID)noWith twins: only twins built from this study.
requestKeystringnoYour own key for this one question: sent again, the same ask is returned and nothing is asked twice. 8 to 100 characters.

Response · 200​

FieldTypeRequiredNotes
askIdstringyesPass it to get_panel_ask to read the result again.
statusstringyesqueued, running, done, void (too few readable answers: no result) or failed.
answeredBy"synthetic people", "twins of people", "real answers"yesSynthetic people are made from census figures and a model; twins are models of people this workspace interviewed; real answers: the question was really asked of the twins' people. Never added together.
questionstringyes
kindstringyes
options[]string[]yes
peopleintegeryesHow many were asked, across every group.
answeredintegeryesHow many answers could be used: the base of the counts.
groups[]object[]yes
groups[].labelstringyes
groups[].peopleintegeryes
groups[].answeredintegeryes
groups[].countsobject[] or nullyesPeople by answer, most first. Null while answering, for an open question, or for twins under the floor.
groups[].censusCriteriastringyesWho the group is: census criteria and any of the four attributes assigned from published distributions (Party identification, Political views, Religion, Religious service attendance).
groups[].notRecorded[]string[]yes
groups[].varietystring or nullyes
groups[].byConstructionstring or nullnoSet when the question IS an attribute this group was chosen by: its answer follows from how it was chosen and is not a finding. Its counts are given for the record only.
countsobject[] or nullyesEvery group together.
largestGapstring or nullyes
themesobject[] or nullyesAn open question's themes, counted in code.
tooFewTwinsbooleanyesTrue under 20 twins: no distribution is given, only each twin's lean.
studyIdstring or nullyesThe draft study this question was turned into on the People page, if it was.
methodstring or nullyesHow the answers were made, in one line: each member's attitude assigned from published distributions (construction, not prediction), published figures, or the respondent model and what it was shown.
byConstructionbooleanyesTrue when the question is one of the attitudes synthetic people were assigned from published distributions (party, political views, religion, attendance) and was answered with them: it gives back those figures by construction and says nothing about the panel's accuracy.
chosenByAssignedstring or nullnoSet when a group was chosen by party, political views, religion or attendance: those were assigned to members from published distributions, never said by them.
consoleUrlstringyes
creditMinorinteger or nullnoask_panel: what this question took from the workspace's credit, net of anything given back, in cents. Null when nothing was charged (billing off, or twins).
The full response schema
{
"type": "object",
"properties": {
"askId": {
"type": "string",
"description": "Pass it to get_panel_ask to read the result again."
},
"status": {
"type": "string",
"description": "queued, running, done, void (too few readable answers: no result) or failed."
},
"answeredBy": {
"type": "string",
"enum": [
"synthetic people",
"twins of people",
"real answers"
],
"description": "Synthetic people are made from census figures and a model; twins are models of people this workspace interviewed; real answers: the question was really asked of the twins' people. Never added together."
},
"question": {
"type": "string"
},
"kind": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "string"
}
},
"people": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "How many were asked, across every group."
},
"answered": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "How many answers could be used: the base of the counts."
},
"groups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"people": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"answered": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"counts": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"option": {
"type": "string"
},
"count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"option",
"count"
],
"additionalProperties": false
}
},
{
"type": "null"
}
],
"description": "People by answer, most first. Null while answering, for an open question, or for twins under the floor."
},
"censusCriteria": {
"type": "string",
"description": "Who the group is: census criteria and any of the four attributes assigned from published distributions (Party identification, Political views, Religion, Religious service attendance)."
},
"notRecorded": {
"type": "array",
"items": {
"type": "string"
}
},
"variety": {
"type": [
"string",
"null"
]
},
"byConstruction": {
"description": "Set when the question IS an attribute this group was chosen by: its answer follows from how it was chosen and is not a finding. Its counts are given for the record only.",
"type": [
"string",
"null"
]
}
},
"required": [
"label",
"people",
"answered",
"counts",
"censusCriteria",
"notRecorded",
"variety"
],
"additionalProperties": false
}
},
"counts": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"option": {
"type": "string"
},
"count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"option",
"count"
],
"additionalProperties": false
}
},
{
"type": "null"
}
],
"description": "Every group together."
},
"largestGap": {
"type": [
"string",
"null"
]
},
"themes": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"of": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"quote": {
"type": [
"string",
"null"
]
},
"who": {
"type": [
"string",
"null"
]
}
},
"required": [
"title",
"count",
"of",
"quote",
"who"
],
"additionalProperties": false
}
},
{
"type": "null"
}
],
"description": "An open question's themes, counted in code."
},
"tooFewTwins": {
"type": "boolean",
"description": "True under 20 twins: no distribution is given, only each twin's lean."
},
"studyId": {
"description": "The draft study this question was turned into on the People page, if it was.",
"type": [
"string",
"null"
]
},
"method": {
"description": "How the answers were made, in one line: each member's attitude assigned from published distributions (construction, not prediction), published figures, or the respondent model and what it was shown.",
"type": [
"string",
"null"
]
},
"byConstruction": {
"type": "boolean",
"description": "True when the question is one of the attitudes synthetic people were assigned from published distributions (party, political views, religion, attendance) and was answered with them: it gives back those figures by construction and says nothing about the panel's accuracy."
},
"chosenByAssigned": {
"description": "Set when a group was chosen by party, political views, religion or attendance: those were assigned to members from published distributions, never said by them.",
"type": [
"string",
"null"
]
},
"consoleUrl": {
"type": "string"
},
"creditMinor": {
"description": "ask_panel: what this question took from the workspace's credit, net of anything given back, in cents. Null when nothing was charged (billing off, or twins).",
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"askId",
"status",
"answeredBy",
"question",
"kind",
"options",
"people",
"answered",
"groups",
"counts",
"largestGap",
"themes",
"tooFewTwins",
"studyId",
"method",
"byConstruction",
"consoleUrl"
],
"additionalProperties": false
}

Errors​

StatusMeaning
400The request is not valid: the body is not JSON, a field is wrong (listed in errors), or a required Idempotency-Key is missing.
401No key or token, or one that is wrong, expired or revoked.
403The key or connection lacks the scope this operation needs. scope names it.
404No such address, or no study (or conversation) with that id in this workspace. Another workspace's id is answered the same way.
409The study is not in a state that allows this (the detail says what to do instead), or the Idempotency-Key was used with a different request.
429Too many requests from this key or connection, or the workspace has reached its hourly or daily limit for model calls (title "Workspace model limit reached", window says which). Retry-After says when to try again.
503The language model is not available. Try again later.

Every error is application/problem+json, the same shape on every endpoint.

API overview · OpenAPI document