Skip to main content
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 and Anthropic.

Provider connection table

ProviderSlugExample pathNotes
DeepSeekdeepseekchat/completionsOpenAI-compatible
Google Geminigeminiv1beta/models/{model}:generateContent
Mistralmistralchat/completionsOpenAI-compatible
xAI (Grok)xaichat/completionsOpenAI-compatible
Coherecoherechat
Groqgroqchat/completionsOpenAI-compatible
Together AItogetherchat/completionsOpenAI-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
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:
cURL
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:
cURL
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!"}]}]
  }'
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.