Skip to main content

Get started in two steps

1. Create an API key

Create your key from the Capriole AI API page.

2. Call POST /v1/chat/completions

Send a simple text chat request.
import requests

API_KEY = "YOUR_API_KEY"

payload = {
    "model": "google/gemini-3.1-flash-lite-preview",
    "messages": [
        {
            "role": "user",
            "content": "Tell me a short joke."
        }
    ]
}

response = requests.post(
    "https://api.caprioletech.com/v1/chat/completions",
    headers={
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json",
    },
    json=payload,
    timeout=60,
)

response.raise_for_status()
print(response.json())