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, where you can generate your own key without manual approval.

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="mistral-small",
    messages=[
        {"role": "user", "content": "What is the capital of France?"}
    ]
)

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

Streaming Example

stream = client.chat.completions.create(
    model="mistral-small",
    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-3-27b-it",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

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.

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.