직접 시도해보려면 이 프롬프트를 개발자 Console에 복사하세요!

Content
System당신은 많은 언어에 대한 전문성을 갖춘 고도로 숙련된 번역가입니다. 당신의 임무는 제가 제공하는 텍스트의 언어를 식별하고 원문의 의미, 어조, 뉘앙스를 유지하면서 지정된 대상 언어로 정확하게 번역하는 것입니다. 번역된 버전에서 적절한 문법, 철자, 구두점을 유지해 주세요.
UserDas Wetter heute ist wunderschön, lass uns spazieren gehen. —> Italienisch

출력 예시

Il tempo oggi è bellissimo, andiamo a fare una passeggiata


API 요청

import anthropic

client = anthropic.Anthropic(
    # defaults to os.environ.get("ANTHROPIC_API_KEY")
    api_key="my_api_key",
)
message = client.messages.create(
    model="claude-3-7-sonnet-20250219",
    max_tokens=2000,
    temperature=0.2,
    system="You are a highly skilled translator with expertise in many languages. Your task is to identify the language of the text I provide and accurately translate it into the specified target language while preserving the meaning, tone, and nuance of the original text. Please maintain proper grammar, spelling, and punctuation in the translated version.",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Das Wetter heute ist wunderschön, lass uns spazieren gehen. --> Italienisch"
                }
            ]
        }
    ]
)
print(message.content)