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

# Introduction

export const DownloadOpenApiCard = ({url}) => {
  return <Card title="Full API Schema" href={url} target="_blank" horizontal>
      Explore the raw schema to see all endpoints in one place. Perfect for tools and integration setup.
    </Card>;
};

## Phrase BYO Engine API

Machine translation powered by [Phrase](https://phrase.com/) allows the translation of content using a unique AI powered feature to pick the best available translation engine for that content.
By implementing the following API it is possible to integrate custom machine translation engine directly into [Phrase Language AI](https://support.phrase.com/hc/en-us/articles/5709660879516-Phrase-Language-AI-TMS).

A minimal BYO Engine machine translation API specification.
It supports the following operations and features:

* [supported languages](/en/guides/byo-engine/supported-languages/get-supported-language-pairs)
* [engine status](/en/guides/byo-engine/engine-status/get-engine-status)
* multi-segment translation operations
  * [synchronous translation](/en/guides/byo-engine/synchronous-translation/translate-multiple-segments)
  * [asynchronous translation](/en/guides/byo-engine/asynchronous-translation/translate-multiple-segments-asynchronously)
  * [with glossaries](/en/guides/byo-engine/synchronous-translation/translate-multiple-segments#body-glossary)
    * applies to both synchronous and asynchronous endpoints
  * [with custom metadata](/en/guides/byo-engine/synchronous-translation/translate-multiple-segments#body-metadata)
    * applies to both synchronous and asynchronous endpoints

## Dynamic Metadata

Phrase automatically resolves the following placeholders in request-level metadata values before sending them to the engine:

| Placeholder              | Resolved value          |
| ------------------------ | ----------------------- |
| `{project_uid}`          | TMS project UID         |
| `{job_uid}`              | TMS job UID             |
| `{idm_organization_uid}` | Phrase organization UID |

These can be used to pass contextual information about the translation job to your engine without any additional integration work.

## Authentication

For authentication either the [OAuth client credentials flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow) or an API token can be leveraged.

## Demo Implementation

A reference implementation of the adapter is available [here](https://github.com/phrase/custom.adapter). It demonstrates a basic integration and includes additional guidance.

## Technical Notes

* Implement your adapter in accordance with the [OpenAPI schema](https://developers.phrase.com/public/assets/openapi/phrase-byo-mt.yaml).
* In general, but especially for the asynchronous endpoints, **ensure thread safety and proper concurrency handling** to prevent race conditions where concurrent requests could overwrite each other's data.

### Stability and Performance Recommendations

* **DNS Infrastructure & Routing:** Ensure DNS resolution is stable and all entries are correctly configured. Misconfigurations or propagation delays can result in intermittent resolution failures, elevated latency, or request timeouts.
* **Application & Proxy Server Tuning (e.g., Nginx):** Optimize your proxy or gateway servers for high-concurrency traffic. Review keep-alive settings and worker process limits to avoid TCP connection resets or dropped requests under load.
* **Load & Concurrency Testing:** Perform synthetic load tests from external endpoints before going to production. Validate your adapter against a sustained concurrency of 100–200 requests per second (RPS) to confirm that performance remains linear and stable.

***

<DownloadOpenApiCard url="https://developers.phrase.com/public/assets/openapi/phrase-byo-mt.yaml" />
