This article explains how to translate using any OpenAI-compatible LLM endpoint, such as a self-hosted LiteLLM gateway, a proprietary LLM gateway, or a service like OpenRouter. You’ll create an LLM Profile to configure the endpoint, model, translation prompt, and other translation settings. You can then use the LLM Profile to translate in Smartling by assigning it to a translation step in a workflow or using it with one of Smartling’s instant translation integrations.
This is a bring-your-own-key (BYOK) provider only; Smartling does not offer provisioned credentials for OpenAI-Compatible API. You will need the base URL of your OpenAI-compatible endpoint and the HTTP header your gateway uses for authentication (for example, Authorization, x-api-key, or Ocp-Apim-Subscription-Key).
Supported models
Any model exposed by your OpenAI-compatible endpoint can be used. When creating your LLM Profile, you enter the model name manually, in the exact same way your gateway expects it. For example: gpt-4o or bedrock/anthropic.claude-sonnet-4-5.
Supported languages
OpenAI-Compatible API does not have a fixed list of supported languages. Language support depends on the underlying model connected behind your endpoint. It will attempt to generate a translation for any language you prompt it with. As with other LLM providers, translation quality will generally be strongest for high-resource languages and may vary for less common or low-resource languages.
Prerequisites
- A base URL for an endpoint that supports the OpenAI chat/completions API. This is the root of your gateway, including its version path (for example,
https://gateway.example.com/v1). The URL must use HTTPS; Smartling appends/chat/completionsto it. - The HTTP header your gateway authenticates with (for example,
Authorization,x-api-key, orOcp-Apim-Subscription-Key), and the full value to send for that header (for example,Bearer <token>forAuthorization, or the bare key forx-api-key).
Note: This provider is BYOK only; Smartling-provisioned credentials are not available.
Limitations
Token and rate limits
Token and rate limits depend on the specific endpoint or gateway you connect to, not on Smartling. Consult the documentation for your gateway or provider (for example, LiteLLM, OpenRouter, or your proprietary gateway) for details on token usage and rate limits.
Info: If a token or rate limit is exceeded, an error will appear in Smartling on the Profiles page in the AI Hub. If the overall or monthly token limit has been reached, the LLM Profile may stop generating translations.
Setting up OpenAI-Compatible API as a translation provider
Step 1: Obtain access to an OpenAI-compatible endpoint
Make sure you have a base URL and an authentication header for a service that implements the OpenAI chat/completions API. This can be a self-hosted LiteLLM gateway, a proprietary LLM gateway that supports a chat/completions endpoint, or a service such as OpenRouter.
Step 2: Add provider credentials in Smartling
You will need to store your credentials in Smartling in order to use OpenAI-Compatible API as a translation provider.
- From the top navigation of your Smartling dashboard, access the AI Hub.
- Navigate to the Credentials section.
- Click Add Provider Credential.
This opens a modal where you can save your provider key. Please enter the following information:- MT or LLM Provider (required): From the dropdown, select OpenAI-Compatible API.
- Credential Name (required): Give your provider key a nickname to help identify it. Ideally, this nickname should reflect which team owns the credential, which gateway or provider is used, and any other valuable information to help you identify this provider key. For example: Marketing LiteLLM Gateway
- Credential Description (optional)
-
Base URL (required): The root of your OpenAI-compatible API, including the version path. For example:
https://gateway.example.com/v1. Must be HTTPS; Smartling appends/chat/completions. -
Auth header name (required): The HTTP header your gateway authenticates with. For example:
Authorization,x-api-key, orOcp-Apim-Subscription-Key. -
Auth header value (required): The full value of that header, sent exactly as entered. For example:
Bearer <token>forAuthorization, or the bare key forx-api-key.
- Click Save.
Step 3: Use the provider credentials in an LLM Profile
Once the provider credential has been saved, it can now be used to create an LLM Profile. An LLM Profile allows you to configure your translation prompt, as well as additional preferences to further customize the translation output.
- From the top navigation of your Smartling dashboard, access the AI Hub.
- Navigate to the Profiles tab.
- Click Create Profile and select LLM Profile.
- Under Provider, select OpenAI-Compatible API.
- Enter a Profile Name.
- Under Provider Credentials, select the credential you created in Step 2 from the dropdown. If you haven't created one yet, click Add credentials here to open the Credentials dialog without leaving the Profile setup flow.
- In the Model field, enter the model name exactly as your gateway expects it. For example:
gpt-4o,bedrock/anthropic.claude-sonnet-4-5, orgemini/gemini-3-flash-preview. - Optional: Under Linguistic Packages, select one or more packages if RAG will be used with this profile for non-project-based integrations, such as the MT API or Smartling Translate.
- Optional: Under Parameter Details, adjust Temperature, Top P, Presence penalty, or Frequency penalty, or select Disable hallucination detection. The gateway's default is used for any parameter left blank, and the valid range for each depends on the model behind your gateway.
Next, you'll configure your translation prompt and optionally enable Retrieval-Augmented Generation (RAG) to further enhance translations, then test the output.
Step 4: Use the LLM Profile in a translation workflow or translation integration
Once the LLM Profile has been created, it can be used to translate your content, either within the Smartling platform (using a translation workflow or translation suggestions in the CAT Tool), or through one of Smartling's instant translation integrations to display translations directly where needed.
Troubleshooting OpenAI-Compatible API translation issues
Error appears on the Profile page in the AI Hub
- Check whether you've exceeded your gateway's rate limits or your account's usage/billing limits.
- Confirm your base URL and auth header value are still correct and haven't been rotated or revoked.
- Verify the model name entered in the profile matches a model currently available through your gateway.
Translations aren't appearing
- Verify the LLM Profile has been added to your workflow's translation step or selected for your instant translation integration.
- Check for error messages on the Profiles page in the AI Hub.
- Confirm your fallback provider is working, if one is configured.
Poor translation quality
- Review and refine your translation prompt.
- Try a different model available through your gateway.
- Consider adding a human review step to your workflow.
Considerations for translation with OpenAI-Compatible API
Because OpenAI-Compatible API can point to any compatible endpoint, translation quality, prompt behavior, and reliability depend entirely on the model and gateway behind your configured base URL rather than on a single, known model from Smartling. The general considerations that apply to other LLM translation providers (hallucinations, inconsistent handling of HTML tags and placeholders, and variable translation quality) also apply here, and will vary depending on which model your gateway routes to.
Fallback translation provider
As with other LLM providers, when OpenAI-Compatible API is used on the Translation step of a workflow in Smartling, it is strongly recommended to set up an alternate MT profile and/or a fallback method, in case translation with your configured endpoint should fail or become unavailable.