You are currently on a page documenting the use of Anthropic legacy Claude 2 models as text completion models. The latest and most popular Anthropic models are chat completion models, and the text completion models have been deprecated.You are probably looking for this page instead.
Anthropic
models.
Installation
Environment Setup
We’ll need to get an Anthropic API key and set theANTHROPIC_API_KEY
environment variable: