Basic Setup
The pattern is the same for all providers:- Create an Observ instance with your API key
- Create your provider client
- Wrap it with
ob.providerName(client) - Use the wrapped client normally
Provider Examples
- TypeScript
- Python
Anthropic (Claude)
Anthropic (Claude)
OpenAI
OpenAI
Mistral
Mistral
xAI (Grok)
xAI (Grok)
OpenRouter
OpenRouter
Adding Sessions and Metadata
You can enhance your traces with session tracking and custom metadata.Session Tracking
Chain.withSessionId() (TypeScript) or .with_session_id() (Python) before your API call:
- TypeScript
- Python
Learn More
See the full Session Tracking guide for multi-turn
conversation examples
Custom Metadata
Chain.withMetadata() (TypeScript) or .with_metadata() (Python) to attach data:
- TypeScript
- Python
Learn More
See the full Custom Metadata guide for common metadata
patterns
Next Steps
Configuration
Configure Observ options
Session Tracking
Group related calls with sessions
Custom Metadata
Attach metadata to traces
Dashboard
View your traces and analytics
