textstringआवश्यक
Parameter defines the text you want to translate. Its length can't exceed 5,000 characters, emojis and some rare characters count as two.
https://api.sandbase.ai/v1/api/google/translateTranslate text with Google Translate between a source and target language code and get the translation with detected language.
आपका आउटपुट यहाँ दिखाई देगा
इनपुट पूरा करें, फिर Run पर क्लिक करें।
Translate text with Google Translate between a source and target language code and get the translation with detected language.
curl -X POST "https://api.sandbase.ai/v1/api/google/translate" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Hello, how are you?", "from": "en", "to": "zh-CN"}'
The result is returned in outputs[0].data as structured JSON.
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Parameter defines the text you want to translate. Its length can't exceed 5,000 characters, emojis and some rare characters count as two. |
from | string | Yes | Parameter defines the language of the text you want to translate. It's a two or three-letter language code, optionally followed by a region or script code (e.g., es for Spanish, pt-PT for Portuguese (Portugal), or zh-CN for Chinese (S |
to | string | Yes | Parameter defines the language you want to translate the text into. It's a two or three-letter language code, optionally followed by a region or script code (e.g., es for Spanish, pt-PT for Portuguese (Portugal), or zh-CN for Chinese |
json_restrictor | string | No | Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |
$0.010 per successful call. Failed calls are not charged.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
curl -X POST "https://api.sandbase.ai/v1/api/google/translate" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "zh-CN",
"from": "en",
"text": "Hello, how are you?"
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
textstringआवश्यकParameter defines the text you want to translate. Its length can't exceed 5,000 characters, emojis and some rare characters count as two.
fromstringआवश्यकParameter defines the language of the text you want to translate. It's a two or three-letter language code, optionally followed by a region or script code (e.g., `es` for Spanish, `pt-PT` for Portuguese (Portugal), or `zh-CN` for Chinese (Simplified)). Use `auto` to detect the language of the text. Head to the Google Translate languages page for a full list of supported languages.
tostringआवश्यकParameter defines the language you want to translate the text into. It's a two or three-letter language code, optionally followed by a region or script code (e.g., `es` for Spanish, `pt-PT` for Portuguese (Portugal), or `zh-CN` for Chinese (Simplified)). Head to the Google Translate languages page for a full list of supported languages.
json_restrictorstringParameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
कोई सेव response प्रकाशित नहीं किया गया है। इसका response देखने के लिए Playground में API चलाएँ।
और जानें
| API | कीमत | प्रतिक्रिया |
|---|---|---|
Google Translateयह API Google | $0.01 प्रति कॉल | JSON |
Google | $0.01 प्रति कॉल | JSON |
Google | $0.015 प्रति कॉल | JSON |
Google | $0.002 प्रति कॉल से | JSON |
Google | $0.0015 प्रति कॉल से | JSON |
Google | $0.01 प्रति कॉल | JSON |
प्रश्न
https://api.sandbase.ai/v1/api/google/translate पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.01 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
आवश्यक: text (string), from (string) और to (string)। वैकल्पिक: json_restrictor (string)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)।
नहीं। Google Translate SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Google API access के लिए आवेदन करने की आवश्यकता नहीं है।