Skip to main content
Text is the base of every decision. Put the material to judge in state and the judgment you want in each question’s instructions. A text-only request omits assets. state accepts a string, a JSON object, or a JSON array. Objects and arrays are serialized as text and read as one shared state, not as a batch of separate requests. A string is enough for a single message. Use an object when the decision depends on several pieces, such as a customer message and the policy it is checked against:
Answers come back in data.answers under the same names. Question types covers each answer’s shape.

Write a state the model can judge

  • Include the content, not a link. URLs in state are read as text; paste the document, page, or transcript you want evaluated.
  • Name the parts. Keys such as message, policy, and history tell the model what each piece is.
  • Keep one decision per request. Questions in a request share the same state and run independently. When a question depends on an earlier answer, ask it in a later request.
  • Watch the context budget. heygen-decision-1 reads up to 128k tokens per model read, and heygen-decision-1-turbo (preview) up to 256k. See Context limits.
For spoken content, put the transcript in state.