Proxy
Anthropic
Python
Node (TS)
cURL
Langchain
Change the api url and add a Helicone-Auth header
import anthropic
client = anthropic.Client(
api_key="<Anthropic API Key>",
base_url="https://anthropic.hconeai.com/v1"
)
res = client._request_as_json(
"post",
"v1/complete",
params={
"prompt": f"{anthropic.HUMAN_PROMPT} How many toes do dogs have?{anthropic.AI_PROMPT}",
"stop_sequences": [anthropic.HUMAN_PROMPT],
"model": "claude-v1",
"max_tokens_to_sample": 300,
},
headers={
"Helicone-Auth": "Bearer <HELICONE_API_KEY>"
}
)