Cloud models are used through an API with a key. This example uses Anthropic's Python SDK; the key is read from the ANTHROPIC_API_KEY environment variable.
pip install anthropic export ANTHROPIC_API_KEY="your-key" import anthropic client = anthropic.Anthropic() message = client.messages.create( model="claude-opus-5-5", max_tokens=16000, messages=[{"role": "user", "content": "Explain DNS in two sentences."}], ) for block in message.content: if block.type == "text": print(block.text)