Python
Install
pip install gatectr-sdk
# or
uv add gatectr-sdkInitialize
from gatectr import GateCtr
client = GateCtr(api_key=os.environ["GATECTR_API_KEY"])client.complete()
client.complete()response = client.complete(
model="gpt-4o", # model name or "auto"
messages=[...], # OpenAI-compatible messages
gatectr={
"optimize": True, # default: True (Pro+)
"route": False, # default: False (Pro+)
"budget_id": "proj_123",
}
)client.stream()
client.stream()Async
client.usage()
client.usage()Drop-in for OpenAI SDK
Drop-in for LangChain
Full reference
Last updated
Was this helpful?