Anthropic SDK
SDKs & frameworksAnthropic's Python and TypeScript SDKs against /v1/messages, for every chat model.
Fill the guide with your values
Stays in this browser tab — never sent or stored by us. Sign in to create one
Setup
- 1Set the SDK base URL to the host without /v1:
https://api.ultragpt.pro. - 2Pass your UltraGPT key as the API key (sent as
x-api-key).
# pip install anthropic
import os
import anthropic
client = anthropic.Anthropic(base_url="https://api.ultragpt.pro", api_key=os.environ["ULTRAGPT_API_KEY"])
msg = client.messages.create(
model="claude-opus-4.8",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)
print(msg.content[0].text)Tips
- Any model id from Models works; suffixes like :online (web search) and :nitro work too.
- Give each tool its own key with a spend limit, so usage shows separately in Activity.
- Something off? Error codes · Support