Skip to content

API Access

uniGPT provides an OpenAI-compatible API that allows researchers and developers to integrate AI models into their own applications, scripts, and workflows.

The API is available at:

https://gpt.uni-muenster.de/v1

Getting an API Key

To use the API, you need an API key (starting with sk-...). API keys are currently available for two use cases:

Research Projects

API keys for research projects are issued upon request. Contact the uniGPT team via our support channel:

uniGPT Support on Mattermost

Please briefly describe your project and intended usage so we can set appropriate quotas.

AI-Assisted Coding (OpenCode, Roo Code, etc.)

API keys for use with coding assistants are available through a self-service portal at https://gpt-api.uni-muenster.de, where you can generate your own key without manual approval. The portal is open to all employees.

Currently the following models are enabled for all employees via the portal:

  • DeepSeek-v4-flash
  • Qwen3.8-27B

Additional models are enabled on request — contact the team via the support channel. If you generated your key before a model was added, you may need to regenerate your key to pick it up.

Beta

The self-service portal is currently in beta. Access and functionality may change. Stay tuned for announcements in the support channel.

Using the Python OpenAI Client

Install the OpenAI Python library:

pip install openai

Basic Example

from openai import OpenAI

client = OpenAI(
    api_key="sk-YOUR_API_KEY",
    base_url="https://gpt.uni-muenster.de/v1"
)

completion = client.chat.completions.create(
    model="gemma-4-31B-it",
    messages=[
        {"role": "user", "content": "What is the capital of France?"}
    ]
)

print(completion.choices[0].message.content)

Streaming Example

stream = client.chat.completions.create(
    model="gemma-4-31B-it",
    messages=[{"role": "user", "content": "Explain quantum computing briefly."}],
    stream=True,
)

for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

Using curl

curl https://gpt.uni-muenster.de/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -d '{
    "model": "gemma-4-31B-it",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

VS Code Integration

You can use uniGPT with VS Code's native AI chat — no plugin required — by adding a custom endpoint model. Create or edit the chatLanguageModels.json file (e.g. ~/.config/Code/User/chatLanguageModels.json):

[
    {
        "name": "uniGPT",
        "vendor": "customendpoint",
        "apiKey": "${input:chat.lm.secret.xxxxxxxxxxxx}",
        "apiType": "chat-completions",
        "models": [
            {
                "id": "Qwen3.8-27B",
                "name": "uniGPT Qwen3.8 27B",
                "url": "https://gpt.uni-muenster.de/v1/chat/completions",
                "toolCalling": true,
                "vision": false,
                "maxInputTokens": 128000,
                "maxOutputTokens": 8000
            }
        ]
    }
]

Tip

maxInputTokens can be set up to 128000. For a multimodal model such as DeepSeek V4 Flash, set "vision": true.

Checking Your Key & Quotas

You can inspect your API key and its quotas using the /key/info endpoint:

curl https://gpt.uni-muenster.de/key/info \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-ENTER-KEY-HERE"

This returns information about your key and the configured quotas/limits.

Limits, Concurrency & Caching

  • Parallel requests: By default, each API key allows 4 parallel requests. Contact the team if you need more.
  • Input caching: Prompt caching is enabled, but the discount is not yet billed — you currently pay the full input price even for cached tokens.
  • Reasoning: Reasoning is returned via the OpenAI Chat Completions format as the reasoning_content field alongside content.

Limits are separate from the chat balance

The API rate limits are managed independently of the token balance shown in the web chat interface. Your API key's quotas are queryable via /key/info.

Available Models via API

You can use any of the internal models listed on the Available Models page by specifying their name in the model parameter, including specialized models such as medgemma-1.5-4b-it for medical text and image tasks. Through the self-service portal, DeepSeek-v4-flash and Qwen3.8-27B are currently enabled for all employees; additional models are enabled on request.

Model access

Access to a model is granted per team/group. If you receive the error team not allowed to access model, the requested model is not enabled for your account.

Drop-in replacement

Since the API is OpenAI-compatible, you can use it as a drop-in replacement in any tool or library that supports the OpenAI API — just change the base_url and api_key.