Python
GateCtr + Instructor
Structured outputs via Instructor with GateCtr cost optimization
1
Install
No additional packages required. Use your existing Instructor installation.
2
Configure
Before
import instructor from openai import OpenAI client = instructor.from_openai(OpenAI(api_key="sk-..."))
After GateCtr
import instructor
from openai import OpenAI
client = instructor.from_openai(
OpenAI(api_key="sk-...", base_url="https://api.gatectr.com/v1")
)3
Test
Make a test call and check the GateCtr dashboard for token savings and cost data.
What GateCtr does under the hood for Instructor
When you route Instructor calls through GateCtr, every request is automatically compressed (up to 40% fewer tokens), scored for complexity (to select the optimal model), and checked against your budget cap before reaching the LLM provider. You get full observability β tokens, cost, latency β in the GateCtr dashboard.
Compatible models
Start saving with Instructor β free
No credit card required. Up and running in 5 minutes.
Start free