# Method: projects.detectLanguage

Detects the language of text within a request.

### HTTP request

`POST https://{TRANSLATION_GDC_ENDPOINT}/v3/{parent}:detectLanguage`

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Project to make a call. Must refer to a caller's project. Format: `projects/{project-id}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "mime_type": string, string: string, ... }, "content": string } ``` |

| Fields ||
|---|---|
| `mime_type` | `string` Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html". |
| `content` | `string` The content of the input stored as a string. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/vertex-ai/translation/rest/v3/DetectLanguageResponse`.