The LLM Gateway is in beta.
SemIf
SemIf is a LangChain-hosted decision model with the model IDsemif-qwen3.5-4b. It is free through September 28, 2026. No provider key or Gateway Credits purchase is required.
Prerequisites
- Your organization must be on a paid, non-Enterprise plan with SemIf enabled. Availability depends on your organization and region.
- You need a workspace-scoped LangSmith API key with
gateway:invokeandworkspaces:readpermissions. See Admin setup to grant access.
Call SemIf
Callsemif-qwen3.5-4b through POST /v1/systemone, not Chat Completions, Messages, or Responses. Set LANGSMITH_API_KEY to your workspace-scoped LangSmith API key.
The TypeSafe SDKs append /v1/systemone to the base URL. Set base_url in Python or baseURL in JavaScript to https://gateway.smith.langchain.com, without /v1.
- Python
- JavaScript
- cURL
Install the TypeSafe SDK:
state and between 1 and 32 named questions in questions. SemIf supports three question types:
noul: Returns the probability that the answer is true.choice: Classifies the state into one of the supplied options.score: Scores the state against a rubric.
answers keyed by question name rather than a chat message. Streaming is not supported.
You can also select SemIf from the hosted models on the gateway home page to get a request example. For regional base URLs, see Regional gateways.
Apply gateway policies
SemIf calls do not consume Gateway Credits. Gateway access, rate-limit, and budget policies still apply.TypeSafe
The gateway also supports TypeSafe decision models with bring-your-own-key (BYOK). ConfigureTYPESAFE_API_KEY as a workspace provider secret. See TypeSafe setup to create a key and install the LangChain integration.
Set LANGSMITH_API_KEY to your workspace-scoped LangSmith API key. The typesafe/ prefix routes the request through your workspace’s TypeSafe provider secret, not the hosted SemIf model. Do not pass your TypeSafe API key as the SDK’s api_key or apiKey when calling the gateway. Use the gateway base URL without /v1 for the SDKs:
- Python
- JavaScript
- cURL
Install the TypeSafe SDK:
See also
- Admin setup: Grant gateway access without configuring a provider secret for SemIf.
- TypeSafe integration: Use TypeSafe decision models through LangChain.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

