Skip to main content
POST
/
llm
/
translate
Translate text to Spanish
curl --request POST \
  --url https://api.httpayer.com/llm/translate \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "Hello, how are you?"
}
'
{
  "original": "Hello, how are you?",
  "translation": "Hola, ¿cómo estás?",
  "model": "gpt-4o-mini-2024-07-18"
}

Headers

X-Payment
string

x402 v1 payment authorization header (base64-encoded JSON). Include on second request after receiving 402.

Body

application/json
text
string
required

Text to translate to Spanish

Example:

"Hello, how are you?"

Response

Translation successful

original
string

Original text

Example:

"Hello, how are you?"

translation
string

Translated text in Spanish

Example:

"Hola, ¿cómo estás?"

model
string

OpenAI model used (server-configured)

Example:

"gpt-4o-mini-2024-07-18"