---
title: "Translate a message"
method: GET
path: "/messages/{message_id}/translate"
tags: ["Message"]
---

# Translate a message

`GET /messages/{message_id}/translate`

## Request

- Base URL: `https://api.your-domain.com`
- URL: `https://api.your-domain.com/messages/{message_id}/translate`
- Auth: API key in header `X-API-KEY`
- TypeScript: <https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/docs/messages/:message_id/translate/get.ts> (a function with typed inputs; its response is checked against the schema)

Translate a message's content into the requested language.

## Path parameters

- `message_id` integer, required: ID of the message to translate.

## Query parameters

- `lang` string, required: Target language. Preferably RFC 5646 format.
- `cookie_name` string, nullable

## Response `200`

Successful Response

- Translation
  - `content` string, required: The translated or rephrased text.

## Other responses

- `401`: Missing or invalid authentication.
- `403`: No access to the message's chat, or usage budget exceeded.
- `404`: Message, its chat, or owning user does not exist.
- `422`: Validation Error

---

[API](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api.md) - [All operations](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/revisions/b53e89b98c2b?raw)
