Gateway Inference
Gateway inference lets your code call Islo-managed models without configuring a model provider key. Use the islo package to create a short-lived session token, then pass that token to an OpenAI-compatible or Anthropic-compatible SDK.
The islo package is used here only for token management. Inference requests are sent through SDKs that accept a compatible base URL and API key in code.
Setup
OpenAI SDK
Use the OpenAI-compatible base URL:
For Python:
Call the OpenAI Responses API with the same client:
Anthropic SDK
Use the Anthropic-compatible base URL:
For Python:
For long-running Anthropic clients, create a fresh session token before the current token expires.
Claude Agent SDK
Claude Agent SDK reads Anthropic-compatible connection settings from the process environment. Set those values from a freshly created Islo session token before constructing the client:
For long-running agents, create a fresh session token before starting a new client.
OpenAI Agents SDK
Use the OpenAI Agents SDK with an AsyncOpenAI client configured for the gateway:
LangChain
Use LangChain’s OpenAI chat model with the gateway base URL:
Instructor
Use Instructor with an OpenAI client configured for the gateway: