Draft a persona from a description
/personas/draftMakes a persona from the researcher's description of a group in plain words, for example "adults in the US who changed coffee brands this year", or with personaId revises one from a new description. A model reads the description against the segments this workspace's studies record (what list_segments returns) and splits it into criteria it can match on and traits no study records yet; a party, political views, religion or attendance that no study records is kept as a trait written "Party identification: Republican or Lean Republican", which the synthetic panel and synthetic runs then choose members by (it is never counted for people); code then checks every segment and value against the real list, and anything the model named that is not on it is moved to the traits not recorded, never matched on. The description is kept word for word as the brief. With no studies yet, every trait is not recorded and the persona is still saved. A revision keeps the persona's name. Returns the persona and who matches it. Counts are computed in code from interviews that completed and passed the quality check, one per person and study, for one basis at a time (people by default; never twins). A person matches when every criterion's segment is recorded for them and its value is one of the listed values, ignoring case. People in a study that did not record one of the criteria's segments, or with no value for it, are counted as not recorded, never as not matching. Traits in unrecorded are not part of any count. Calls the model once. (The MCP tool draft_persona.) Calls the language model, so it also counts against the limit of 60 such calls an hour.
Scope studies: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/personas/draft" \
-H "Authorization: Bearer $JEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Parents under 40 who rent and cook at home most nights"
}'
An Idempotency-Key header is optional here and makes a retry safe. See idempotency.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
text | string | yes | The group, in the researcher's words. 3 to 2000 characters. |
personaId | string | no | To revise an existing persona from this description. Leave out to make a new one. At most 64 characters. |
Response · 200
| Field | Type | Required | Notes |
|---|---|---|---|
persona | object | yes | |
persona.id | string | yes | |
persona.name | string | yes | |
persona.brief | string or null | yes | The researcher's own words for this group, word for word. Null when it was written as criteria only. |
persona.criteria[] | object[] | yes | The structured part, all of which must hold for a person to match. Matching uses these only. |
persona.unrecorded[] | object[] | yes | Traits the brief asks for that no study in this workspace records yet. Never part of any count. |
persona.createdAt | string | yes | |
persona.updatedAt | string | yes | |
counts | object | yes | |
counts.basis | "people", "test-scripts" | yes | Whose interviews: people (the default) or test-script interviews (SIM, used to rehearse a study, not people). Never both at once. Twins are never included. |
counts.people | integer | yes | Every person read: completed, passed the quality check, of this basis, in all studies. |
counts.matching | integer | yes | Of those, how many meet every criterion. |
counts.notMatching | integer | yes | |
counts.notRecorded | integer | yes | Of those, how many sit in a study that did not record a criterion's segment, or have no value for one. Not known either way. |
counts.studies[] | object[] | yes | |
created | boolean | yes | |
movedToUnrecorded[] | string[] | yes | What the model named that no study records, moved to the traits not recorded by code. |
The full response schema
{
"type": "object",
"properties": {
"persona": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"brief": {
"description": "The researcher's own words for this group, word for word. Null when it was written as criteria only.",
"type": [
"string",
"null"
]
},
"criteria": {
"type": "array",
"items": {
"type": "object",
"properties": {
"segment": {
"type": "string",
"minLength": 1,
"maxLength": 60,
"description": "A segment's name, as list_segments gives it. Matched across studies ignoring case and surrounding spaces."
},
"values": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": "The values that count, as list_segments gives them. Matched ignoring case."
}
},
"required": [
"segment",
"values"
],
"additionalProperties": false
},
"description": "The structured part, all of which must hold for a person to match. Matching uses these only."
},
"unrecorded": {
"type": "array",
"items": {
"type": "object",
"properties": {
"trait": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "A trait in plain words, such as: has a coffee every Saturday."
}
},
"required": [
"trait"
],
"additionalProperties": false
},
"description": "Traits the brief asks for that no study in this workspace records yet. Never part of any count."
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"name",
"brief",
"criteria",
"unrecorded",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
"counts": {
"type": "object",
"properties": {
"basis": {
"type": "string",
"enum": [
"people",
"test-scripts"
],
"description": "Whose interviews: people (the default) or test-script interviews (SIM, used to rehearse a study, not people). Never both at once. Twins are never included."
},
"people": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Every person read: completed, passed the quality check, of this basis, in all studies."
},
"matching": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, how many meet every criterion."
},
"notMatching": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"notRecorded": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, how many sit in a study that did not record a criterion's segment, or have no value for one. Not known either way."
},
"studies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"recordsEverySegment": {
"type": "boolean",
"description": "False when this study's design does not record one of the criteria's segments: its people are then counted as not recorded."
},
"people": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "People in this study who completed and passed the quality check."
},
"matching": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"notMatching": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Recorded, and a value is not one of the criteria's."
},
"notRecorded": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "A segment the criteria name is not recorded for them. Never counted as not matching."
}
},
"required": [
"id",
"title",
"recordsEverySegment",
"people",
"matching",
"notMatching",
"notRecorded"
],
"additionalProperties": false
}
}
},
"required": [
"basis",
"people",
"matching",
"notMatching",
"notRecorded",
"studies"
],
"additionalProperties": false
},
"created": {
"type": "boolean"
},
"movedToUnrecorded": {
"type": "array",
"items": {
"type": "string"
},
"description": "What the model named that no study records, moved to the traits not recorded by code."
}
},
"required": [
"persona",
"counts",
"created",
"movedToUnrecorded"
],
"additionalProperties": false
}
Errors
| Status | Meaning |
|---|---|
400 | The request is not valid: the body is not JSON, a field is wrong (listed in errors), or a required Idempotency-Key is missing. |
401 | No key or token, or one that is wrong, expired or revoked. |
403 | The key or connection lacks the scope this operation needs. scope names it. |
404 | No such address, or no study (or conversation) with that id in this workspace. Another workspace's id is answered the same way. |
409 | The 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. |
429 | Too 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. |
503 | The language model is not available. Try again later. |
Every error is application/problem+json, the same shape on every endpoint.