cera-client
Asynchronous, strongly typed Rust client for OpenAI and OpenRouter endpoints.
Part of the Cera inference workspace.
Features
- Multi-Provider Support: First-class support for OpenAI, OpenRouter, and custom OpenAI-compatible servers (vLLM, Ollama, LocalAI, etc.).
- Chat Completions: Typed request and response models with tool calling, JSON schema output, and custom sampling parameters.
- Streaming Responses: Real-time Server-Sent Events (SSE) stream parsing yielding chunk deltas.
- Embeddings: Generate vector embeddings for text with batch input support.
- Model Discovery: Fetch available model catalogs from providers.
- Environment Auto-Discovery: Automatically resolve
OPENAI_API_KEYorOPENROUTER_API_KEYwhen available.
Usage
use ;
async