Overview
LangChain is a popular framework for developing applications powered by language models. The API works seamlessly with LangChain.All requests through LangChain automatically flow through the TEE-protected gateway.
Installation
Python Integration
Basic Setup
Streaming Responses
Using Multiple Models
The platform supports a broad range of models. Switch between them easily:Conversation Chains
TypeScript/JavaScript Integration
Basic Setup
Streaming in TypeScript
RAG (Retrieval Augmented Generation)
Function Calling with LangChain
Environment Variables
Store your API key securely:.env
Python
Supported Models
The available models work with LangChain:View All Models
Browse complete model list →
Best Practices
Use Environment Variables
Use Environment Variables
Never hardcode API keys. Use environment variables or secret managers.
Choose the Right Model
Choose the Right Model
- GPU TEE models: Best for sensitive data (full TEE protection)
- GLM 5.1: Best for confidential reasoning
- GLM-5: Best for confidential systems engineering
- GPT-5: Best for general tasks
- Claude Sonnet 4.5: Best for reasoning and analysis
- DeepSeek: Best for coding tasks
Enable Streaming for UX
Enable Streaming for UX
Use streaming for better user experience in interactive applications.
Implement Error Handling
Implement Error Handling
Wrap API calls in try-catch blocks to handle rate limits and errors gracefully.
Example Projects
Chatbot
Build a multi-turn conversational AI with memory
RAG System
Create a document Q&A system with embeddings
AI Agent
Build an autonomous agent with function calling
Content Generator
Generate articles, summaries, and creative content