---
title: "Generate text for a new dialogue node with text and animation using AI"
method: POST
path: "/api/ai/{simulationId}/generate-dialogue-node-text"
tags: ["AI"]
---

# Generate text for a new dialogue node with text and animation using AI

`POST /api/ai/{simulationId}/generate-dialogue-node-text`

## Request

- Base URL: `https://api.wearelearning.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.wearelearning.io/api/ai/{simulationId}/generate-dialogue-node-text`
- Auth: OAuth 2
  - Implicit: `https://login.wearelearning.io/authorize?audience=https://api.wearelearning.io`

## Path parameters

- `simulationId` string, uuid, required: A valid GUID

## Request body

- GenerateDialogueNodeTextDto
  - `id` string, required
  - `sourceNodeId` string, required
  - `sourceNodeType` 'dialogue' | 'response' | 'poster' | 'event' | 'end' | 'open-response' | 'outcome' | 'no-match' | 'hotspot' | 'quiz' | 'page' | 'code', required
  - `position` Position2dDto, required
    - `x` number, double, required
    - `y` number, double, required
  - `targetSpeakerIndex` string, required

## Response `200`

OK

- string

## Other responses

- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/wearelearning/apis/we-are-learning-api.md) - [All operations](https://skmtc.dev/wearelearning/apis/we-are-learning-api/llms.txt) - [OpenAPI document](https://skmtc.dev/wearelearning/apis/we-are-learning-api/revisions/e2ca5265db77?raw)
