LLM providers
Availability
Open core · self-host + all Splyntra Cloud plans
LLM calls become llm_call spans with model name, token counts, and cost. Splyntra has
three native provider instrumentors, and captures any OpenAI-compatible provider
through the OpenAI instrumentor.
Native instrumentors
| Provider | instrument name | Languages |
|---|---|---|
| OpenAI | openai | Python + TS |
| Anthropic (Claude) | anthropic | Python + TS |
| Ollama | ollama | Python + TS |
from splyntra import Splyntra
Splyntra(
api_key=os.environ["SPLYNTRA_API_KEY"],
project="my-app",
instrument=("openai", "anthropic"),
)
OpenAI-compatible providers
Many providers expose an OpenAI-compatible API. Point your OpenAI client's base_url
at the provider and keep instrument=("openai",) — the OpenAI adapter captures the
calls and Splyntra labels and cost-tracks them by provider.
| Provider | base_url |
|---|---|
| Grok / xAI | https://api.x.ai/v1 |
| Google Gemini | https://generativelanguage.googleapis.com/v1beta/openai/ |
| Groq | https://api.groq.com/openai/v1 |
| OpenRouter | https://openrouter.ai/api/v1 |
| Mistral | provider's OpenAI-compatible endpoint |
| Together | provider's OpenAI-compatible endpoint |
| Fireworks | provider's OpenAI-compatible endpoint |
| DeepSeek | provider's OpenAI-compatible endpoint |
| Cohere | provider's OpenAI-compatible endpoint |
Example — Grok/xAI via the OpenAI client
- Python
- TypeScript
import os
from splyntra import Splyntra
from openai import OpenAI
Splyntra(
api_key=os.environ["SPLYNTRA_API_KEY"],
project="my-app",
instrument=("openai",), # keep the OpenAI instrumentor
)
client = OpenAI(
api_key=os.environ["XAI_API_KEY"],
base_url="https://api.x.ai/v1", # point at the provider
)
client.chat.completions.create(
model="grok-2-latest",
messages=[{"role": "user", "content": "Hello"}],
)
import { Splyntra } from "@splyntra/sdk";
import OpenAI from "openai";
new Splyntra({
apiKey: process.env.SPLYNTRA_API_KEY!,
project: "my-app",
instrument: ["openai"], // keep the OpenAI instrumentor
});
const client = new OpenAI({
apiKey: process.env.XAI_API_KEY!,
baseURL: "https://api.x.ai/v1", // point at the provider
});
await client.chat.completions.create({
model: "grok-2-latest",
messages: [{ role: "user", content: "Hello" }],
});
Swap the base_url and model for any provider in the table — the instrumentation is
identical.
tip
Cost attribution uses your model pricing. If a provider or model isn't priced yet, add it under Costs → Manage model pricing. See Costs.
Next steps
- Framework integrations — combine a provider with LangGraph, CrewAI, and more.
- Costs — spend by model and provider.
- Connect an agent — the wizard emits the
base_urlnotes for you.