# Base URL

> Point any OpenAI-compatible client at the Tchavi API.

- Canonical: https://tchavi.com/en/docs/base-url

---


All API requests go to the following base URL:

```bash
https://tchavi.com/api/v1
```

Tchavi is **100% compatible with the OpenAI API format**. If you already use the OpenAI SDK or any OpenAI-compatible library, just change the base URL and API key — the rest of your code stays the same.

<CodeTabs>

```javascript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://tchavi.com/api/v1',
});

const response = await client.chat.completions.create({
  model: 'gpt-4o-mini',
  messages: [{ role: 'user', content: 'Hello!' }],
});

console.log(response.choices[0].message.content);
```

```python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://tchavi.com/api/v1",
)

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello!"}],
)

print(response.choices[0].message.content)
```

</CodeTabs>

