The supported model

Model and context length for Claude API support:

Claude AI Models

PlatformModel IdentifierNotes
claude-aiclaude/claude-2.1
claude-aiclaude/claude-2.0
claude-aiclaude/claude-instant-1.2
claude-aiclaude/claude-3-opus-20240229
claude-aiclaude/claude-3-sonnet-20240229
claude-aiclaude/Coming soonPlaceholder for future models
from openai import OpenAI

client = OpenAI(
    api_key = "Own API key",
    base_url = "https://api.zgiai.com/v1"
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "Who are you?",
        }
    ],
    model="claude/claude-2.1",
)
print(chat_completion.choices[0].message.content)

Was this page helpful?