AI: Analysis 10 credits LLM

Translate API

Translate text to any of 100+ languages via REST API, powered by Claude. Preserves tone, handles idiomatic expressions, and understands context — producing more natural-sounding translations than rule-based systems for marketing copy, support responses, and documentation.

Try it live →

How it works

POST your text and target language (English name or ISO 639-1 code). Optionally specify source language (auto-detected if omitted) and tone preservation level. The API returns the translated text and detected source language.

Use cases

API Reference

POST https://slopshop.gg/v1/llm-translate
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Input parameters

ParameterTypeRequiredDescription
text string required The text to process with AI
options object optional Optional configuration (format, length, etc.)

Example response

{
  "data": {
    "result": "AI-generated result based on your input.",
    "model": "claude-3-5-sonnet",
    "tokens_used": 150
  },
  "meta": {
    "credits_used": 10,
    "engine": "real",
    "ms": 4
  }
}

Examples

Three real-world scenarios showing how developers use Translate in production.

Example 1
Translate product description
Localize an English product description into Spanish for a Latin American market.
curl -X POST https://slopshop.gg/v1/llm-translate \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Premium wireless headphones with 40-hour battery life and noise cancellation.", "target": "Spanish"}'
Example 2
Translate support ticket
Translate a French customer complaint to English before routing.
curl -X POST https://slopshop.gg/v1/llm-translate \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Mon colis est arrivé endommagé et je souhaite un remboursement immédiat.", "target": "English"}'
Example 3
Localize UI copy
Translate a button label and error message for a German interface.
curl -X POST https://slopshop.gg/v1/llm-translate \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Submit your order
Payment failed. Please try again.", "target": "German"}'

Code examples

curl

curl -X POST https://slopshop.gg/v1/llm-translate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "your data here"}'

Python

import requests

response = requests.post(
    "https://slopshop.gg/v1/llm-translate",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"input": "your data here"}
)
result = response.json()
print(result["data"])

Node.js

const response = await fetch("https://slopshop.gg/v1/llm-translate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ input: "your data here" })
});
const { data } = await response.json();
console.log(data);

CLI

# Install the Slopshop CLI
npm install -g slopshop

# Set your API key
export SLOPSHOP_KEY=your_api_key

# Call llm-translate
slop llm-translate '{"input": "your data here"}'

Pricing

Credits per call
10
credits
Cost per call
$0.01
at Starter tier
Tier
LLM
Requires LLM key

Credits are purchased in bundles starting at $1 for 1,000 credits. All compute APIs like this one use 10 credits per call — that's $0.01. See all pricing tiers.

Related APIs in AI: Analysis

View the full API catalog · Try in playground · Documentation