Complete guides, API reference, SDK documentation, architecture diagrams, and direct support — all in one place.
# Any OpenAI SDK client — zero code changes from openai import OpenAI client = OpenAI( base_url="https://yoursmartflow.yourcompany.com/v1", api_key="sk-sf-your-virtual-key" ) response = client.chat.completions.create( model="gpt-4o", # or "claude-sonnet-4-6", "gemini-2.0-flash"… messages=[{"role": "user", "content": "Hello!"}] ) print(response.choices[0].message.content)
# Native Anthropic SDK — set ANTHROPIC_BASE_URL, nothing else changes from anthropic import Anthropic client = Anthropic( base_url="https://yoursmartflow.yourcompany.com/anthropic", api_key="sk-sf-your-virtual-key" ) message = client.messages.create( model="claude-sonnet-4-6", max_tokens=1024, messages=[{"role": "user", "content": "Hello!"}] ) print(message.content[0].text)
# OpenAI-compatible endpoint curl https://yoursmartflow.yourcompany.com/v1/chat/completions \ -H "Authorization: Bearer sk-sf-your-virtual-key" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "Hello!"}] }' # Native Anthropic Messages API curl https://yoursmartflow.yourcompany.com/anthropic/v1/messages \ -H "x-api-key: sk-sf-your-virtual-key" \ -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4-6", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello!"}] }'
import asyncio from smartflow import SmartflowClient async def main(): async with SmartflowClient( base_url="https://yoursmartflow.yourcompany.com", api_key="sk-sf-your-virtual-key" ) as sf: # Chat completion (OpenAI-compatible) reply = await sf.chat("Explain quantum entanglement", model="claude-sonnet-4-6") print(reply) # Cache stats — see your hit rates stats = await sf.get_cache_stats() print(f"Cache hit rate: {stats.hit_rate:.1%}") asyncio.run(main())
# Install the chart from the package you were given helm upgrade --install smartflow ./smartflow \ --namespace smartflow --create-namespace \ --set secrets.openaiApiKey="sk-..." \ --set secrets.anthropicApiKey="sk-ant-..." \ --set ingress.host="yoursmartflow.yourcompany.com" \ --set ingress.tls="true" # Check rollout kubectl rollout status deployment/smartflow-proxy -n smartflow
SmartflowClient and SyncSmartflowClient — chat, completions, Anthropic native, compliance, cache, VAS logs, MCP, A2A, and more.@smartflow_tool decorator), a reduction benchmark, and a verified compression quality delta./metrics · OIDC SSO dashboard config.