> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Translate Post

> Translate post text into over 100 languages using AI. The current language is automatically detected and translated to the language code you specify.

Translate text for a post to over 100 different [languages](https://www.ayrshare.com/docs/iso-codes/language.md) using AI. The current language is automatically detected and translated to the specified language.

## Header Parameters

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`

## Body Parameters

**text** `string` *required*

Text to be translated.

**lang** `string` *required*

[Language code](https://www.ayrshare.com/docs/iso-codes/language.md) to translate the text.

```json 200: Success theme={"system"}
{
    "status": "success",
    "translatedText": "Nos vamos a las carreras",
    "originalText": "Off we go to the races",
    "language": "es"
}
```

```json 400: Bad Language Submitted theme={"system"}
{
  "action": "request",
  "status": "error",
  "code": 101,
  "message": "Missing or incorrect parameters. Please verify with the docs. .../ayrshare.com/rest-api/endpoints"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.