Skip to content

Get the next question (LLM-driven)

GET
/v1/sessions/{token}/next-question

Returns the next question in the iterative Q&A flow. LLM-generated, conditioned on prior answers. Returns {done: true} when all questions answered.

Parameters

Path Parameters

token
required
string

Responses

200

OK

object
question
string
What brings you to the obstetrics clinic today?
question_type
string
Allowed values: text number yes_no scale_1_10 date choice
choices
Array<string>
nullable
clinical_purpose
string
nullable
is_final_question
boolean
questions_remaining_estimate
integer
done
boolean
nullable

404

Session not found or expired

object
error
required
string
Invalid link
code
integer
1003

500

Could not generate question (LLM failure)

object
error
required
string
Invalid link
code
integer
1003