Migrate from OpenAI
Point an application that already calls OpenAI at AI Foundation Services. Keep the SDK. Change the base URL, the API key, and the model id.
If your code uses the AzureOpenAI client, switch to the standard OpenAI client: Azure-style deployment URLs and the api-key header are not part of the AI Foundation Services API.
The move from the current AIFS endpoint to the New API is a separate guide: Migrate to the new API.
Minimal example
Section titled “Minimal example”export OPENAI_API_KEY ="your_api_key_here" export OPENAI_BASE_URL ="https://llm-server.llmhub.t-systems.net/v2" from openai import OpenAI
client = OpenAI() response = client.chat.completions.create( model="gpt-oss-120b" , messages=[{ "role": "user", "content": "Hello from AIFS"}],)print(response.choices[ 0].message.content) The response text is response..
Parameters
Section titled “Parameters”Set OPENAI_ and OPENAI_. The chat body uses model and messages.
Model ids on AIFS can differ from OpenAI model ids. Recommended models lists the catalog. Deprecations lists retirement dates and replacements.
Limitations and troubleshooting
Section titled “Limitations and troubleshooting”The API is OpenAI-compatible. Not every parameter exists on every model. Some models return HTTP 400 for the Responses API. Use the guide for the call you are migrating.
Authentication failures are HTTP 401 or 403. See Error codes.