import requests
url = "https://labs.chonkie.ai/api/v1/chat/completions"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"model": "documentation-assistant",
"messages": [
{"role": "user", "content": "How do I configure authentication?"}
]
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
assistant_message = result["choices"][0]["message"]["content"]
print(f"Assistant: {assistant_message}")