- a mental-state read for each modelled subject — what they currently believe, want, and feel,
- a predicted reaction — what each subject likely says or does next if the
draft is sent as-is, with a
riskrating, - a refined reply in your agent’s voice that heads off the predicted
damage, plus a one-line
refinement_rationaleexplaining why it changed.
Authorization
Your bearer token:
Bearer <token>. See Authentication.
Tokens are issued as ak_... keys tied to your account.Request body
The conversation so far, in order. Must contain at least one turn.
The agent’s draft reply — what would be sent if you did nothing. This is the
message the API evaluates and rewrites.
Which speaker in
transcript is your agent. The service never infers this:
the agent’s draft is the one being refined; everyone else is treated as
someone the agent is replying to, whose reaction is predicted.Optional. Restrict the mental-state read and predicted reaction to a single
person by name. If omitted, all non-agent speakers are modelled.
Who sent the message. Used both to identify the agent (via
agent_name) and
to label each modelled subject in the response.The message text.
Request
Response
The response holds parallel arrays — one entry per modelled subject — plus the rewritten reply.What each modelled subject currently believes, wants, and feels.
How each modelled subject is predicted to react if
candidate_reply is sent
as-is. Same order as mental_state.An improved reply, written in the agent’s voice, rewritten to head off the
predicted damage.
One line: why the reply changed.
The modelled speaker.
What the subject currently believes about the situation.
What the subject currently wants.
The subject’s emotional state. Each emotion has a
type (e.g.
resignation, frustration) and an intensity between 0.0 and 1.0.The subject this reaction is for.
One line: what the subject does next.
The likely next message the subject would send, or
"(no reply)" if they
are predicted to disengage.How badly the draft is predicted to land for this subject:
low, medium,
or high. Treat medium and high as a signal to send refined_reply
instead.200 OK
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | The transcript is too large to analyze, or it could not be analyzed. |
401 | UNAUTHORIZED | The bearer token is missing, invalid, or expired. |
402 | PAYMENT_REQUIRED | Your account does not have enough credits to cover this request. Top up and retry. You are not charged. |
403 | forbidden | The token is valid but not allowed to call foresee. |
422 | VALIDATION_ERROR | The body is malformed, transcript is empty, or candidate_reply is missing. |
502 | UPSTREAM_ERROR | A dependency the request relies on was unavailable. The request is not billed; safe to retry. |
402 and is not billed, and a request that fails is not billed either. See
Credits and billing.

