OpenAI
OpenAI cURL Integration
Use cURL to integrate OpenAI with Helicone to log your OpenAI usage.
1
2
Modify the API base and add the `Helicone-Auth` header
Please ensure to replace API keys with your own.
curl --request POST \
--url https://oai.helicone.ai/v1/chat/completions \
--header 'Authorization: Bearer <<YOUR_OPENAI_API_KEY>>' \
--header 'Content-Type: application/json' \
--header 'Helicone-Auth: Bearer <<YOUR_HELICONE_API_KEY>>' \
--data '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "system",
"content": "Say Hello!"
}
],
"temperature": 1,
"max_tokens": 10
}'