Search...
/
Contact us
Join our Discord
Home
Guides and concepts
API Reference
SDK Docs
Home
Guides and concepts
API Reference
SDK Docs
API Reference
GET
Check API Health
GET
List Chat Models
POST
Chat Completions
POST
Chat Completions Streaming
POST
Chat Completions Vision
GET
List Completions Models
POST
Completions
GET
List Embeddings Models
POST
Embeddings
POST
Factuality
POST
Injection
POST
Replace Personal Information
POST
Toxicity
POST
Translate
SDK Reference
Chat
Chat SSE (Streaming)
Chat Vision
Completions
Embeddings
Factuality
Injection
PII
Toxicity
Translate
Contact us
Join our Discord
API Reference
Translate
POST
https://
api.predictionguard.com
/
translate
Translate text from one language to another.
Request
This endpoint expects an object.
text
string
Required
The text to check for toxicity.
source_lang
string
Required
The source language of the text.
target_lang
string
Required
The target language for the translation.
use_third_party_engine
boolean
Optional
Enables/disables third party translations.
Response
This endpoint returns an object.
id
string
Optional
Unique ID for the chat completion.
object
string
Optional
Type of object (chat completion).
created
integer
Optional
Timestamp of when the chat completion was created.
best_translation
string
Optional
The best translation of the input text.
best_score
double
Optional
The best score for the best translation.
best_translation_model
string
Optional
The model used for the best translation.
translations
list of objects
Optional
The set translations from different models.
Show 4 properties
Errors
400
Bad Request
403
Forbidden
Built with