Anthropic SDK
Use the official anthropic SDK against the firepass bridge.
1. Sign up and create a key
It's free. Create your account, then open the dashboard and click Create. Save the sk-firepass-… key — it's shown once.
2. Use it like any OpenAI/Anthropic key
Point your client at https://dizosrf-firepass.hf.space/v1 (OpenAI) or https://dizosrf-firepass.hf.space/anthropic (Anthropic). The same key works for both.
3. Use the anthropic SDK
import anthropic
client = anthropic.Anthropic(
base_url="https://dizosrf-firepass.hf.space/anthropic",
api_key="sk-firepass-…",
)
msg = client.messages.create(
model="claude-opus-4-7",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)
print(msg.content[0].text)
Streaming:
with client.messages.stream(
model="claude-opus-4-7",
max_tokens=1024,
messages=[{"role": "user", "content": "Tell me a story."}],
) as stream:
for text in stream.text_stream:
print(text, end="")