Sand AISand AI MAGI-2MAGI-2 est maintenant sur SandBase : vidéo 1080p avec audio natifEssayer maintenant

Google Translate

Docs API
https://api.sandbase.ai/v1/api/google/translate

Translate text with Google Translate between a source and target language code and get the translation with detected language.

Prix
$0.01USD / appel
Méthode
POST
Réponse
JSON
Paramètres
3 obligatoires · 1 facultatifs

Bac à sable

Entrée
Parameter defines the text you want to translate. Its length can't exceed 5,000 characters, emojis and some rare characters count as two.
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.
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.
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.
SortiePrêt

Votre sortie apparaîtra ici

Complétez les entrées, puis cliquez sur Exécuter.

README de l'API

Google Translate

Translate text with Google Translate between a source and target language code and get the translation with detected language.

Request

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.

Parameters

NameTypeRequiredDescription
textstringYesParameter defines the text you want to translate. Its length can't exceed 5,000 characters, emojis and some rare characters count as two.
fromstringYesParameter 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
tostringYesParameter 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_restrictorstringNoParameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.

Pricing

$0.010 per successful call. Failed calls are not charged.

Explorer plus

APIs associées

Toutes les APIs
APIPrixRéponse
Google$0.01 par appelJSON
Google$0.01 par appelJSON
Google$0.015 par appelJSON
GoogleÀ partir de $0.002 par appelJSON
GoogleÀ partir de $0.0015 par appelJSON
Google$0.01 par appelJSON

Guides :Best Google API in 2026: Pricing Compared

Questions

FAQ

Comment utiliser l’API Google Translate ?

Envoyez une requête POST à https://api.sandbase.ai/v1/api/google/translate avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.

Combien coûte l’API Google Translate ?

$0.01 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.

Quels paramètres l’API Google Translate accepte-t-elle ?

Obligatoire : text (string), from (string) et to (string). Facultatif : json_restrictor (string). Le tableau des paramètres et le Playground sur cette page listent tous les champs.

Que renvoie l’API Google Translate ?

Une réponse JSON renvoyée dans la même requête HTTP (synchrone).

Ai-je besoin d’un compte développeur ou d’une clé API Google ?

Non. Google Translate fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API Google séparément.