> ## Documentation Index
> Fetch the complete documentation index at: https://tokonomics.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect DeepSeek, Gemini, Mistral, and More to Tokonomics

> Route calls to DeepSeek, Gemini, Mistral, xAI, Cohere, Groq, and Together AI through Tokonomics using the same one-URL-swap pattern.

Every provider Tokonomics supports follows the same integration pattern: replace the provider's base URL with `https://tokonomics.ca/proxy/{slug}` and pass your Tokonomics key as a bearer token. The seven providers below are available in addition to [OpenAI](/guides/openai) and [Anthropic](/guides/anthropic).

## Provider connection table

| Provider      | Slug       | Example path                            | Notes             |
| ------------- | ---------- | --------------------------------------- | ----------------- |
| DeepSeek      | `deepseek` | `chat/completions`                      | OpenAI-compatible |
| Google Gemini | `gemini`   | `v1beta/models/{model}:generateContent` |                   |
| Mistral       | `mistral`  | `chat/completions`                      | OpenAI-compatible |
| xAI (Grok)    | `xai`      | `chat/completions`                      | OpenAI-compatible |
| Cohere        | `cohere`   | `chat`                                  |                   |
| Groq          | `groq`     | `chat/completions`                      | OpenAI-compatible |
| Together AI   | `together` | `chat/completions`                      | OpenAI-compatible |

## OpenAI-compatible providers

DeepSeek, Mistral, xAI, Groq, and Together AI all expose an OpenAI-compatible API. You can use the `openai` SDK for any of them — just change the slug in the base URL and supply that provider's API key.

```python Python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="your-provider-api-key",
    base_url="https://tokonomics.ca/proxy/groq",  # change slug per provider
    default_headers={"Authorization": "Bearer mk_your_tokonomics_key"}
)

response = client.chat.completions.create(
    model="llama-3.3-70b-versatile",
    messages=[{"role": "user", "content": "Hello!"}]
)

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

Swap `groq` for `deepseek`, `mistral`, `xai`, or `together` and update `model` to match that provider's model identifiers — everything else stays the same.

## Cohere

Cohere's SDK uses a different interface from the OpenAI SDK. The simplest integration is a direct HTTP call with your Cohere key passed in `X-API-Key`:

```bash cURL theme={null}
curl https://tokonomics.ca/proxy/cohere/chat \
  -H "Authorization: Bearer mk_your_tokonomics_key" \
  -H "X-API-Key: your-cohere-key" \
  -H "Content-Type: application/json" \
  -d '{"model": "command-r-plus", "message": "Hello!"}'
```

Tokonomics forwards `X-API-Key` to Cohere unchanged, so you do not need to modify how you authenticate with the Cohere API.

## Google Gemini

Gemini uses a path-based model routing format. Replace `https://generativelanguage.googleapis.com` with `https://tokonomics.ca/proxy/gemini` and keep the rest of the path intact:

```bash cURL theme={null}
curl "https://tokonomics.ca/proxy/gemini/v1beta/models/gemini-1.5-pro:generateContent?key=your-gemini-api-key" \
  -H "Authorization: Bearer mk_your_tokonomics_key" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"parts": [{"text": "Hello!"}]}]
  }'
```

<Note>
  All providers support the same `X-Metering-Tags`, `X-Feature-Name`, and `X-Tenant-ID` headers for cost attribution regardless of which SDK or HTTP client you use.
</Note>
