---
title: "Text Message"
method: POST
path: "/api/try-chacha/text-message"
tags: ["try-chacha", "try-chacha"]
---

# Text Message

`POST /api/try-chacha/text-message`

Stateless text-chat turn for the anon TryChaCha preview.

Frontend posts the full history each turn (along with the latest
user message) and gets ChaCha's next message back. Calls Gemini
directly so we can use the custom try_chacha text prompt — the
shared generate_ai_response helper builds its own system prompt and
doesn't take an override.

## Headers

- `authorization` string, nullable

## Request body

- TextMessageRequest
  - `message` string, required
  - `history` TranscriptTurn[]
    - `role` string, required
    - `text` string, required
  - `target_language` string, nullable
  - `native_language` string, nullable
  - `proficiency_level` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/fluentea/apis/aurqa-language-learning-platform-refactored.md) · [All operations](https://skmtc.dev/fluentea/apis/aurqa-language-learning-platform-refactored/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fluentea/aurqa-language-learning-platform-refactored/revisions/78f314acd8bf/schema)
