Connect Helicone with Anthropic, a platform for running open-source language models. Monitor and optimize your AI applications using Anthropic’s powerful models through a simple base_url configuration.
Change the api url and add a Helicone-Auth header
Copy
Ask AI
import anthropicclient = anthropic.Client( api_key="<Anthropic API Key>", base_url="https://anthropic.helicone.ai/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>" })