# Modelix

Modelix is our in-house built AI Gateway.

You can reach it at [https://10.152.0.2:9999](https://10.152.0.2:9999).

You will need an account at [https://iam.isn.edu.au](https://iam.isn.edu.au).

Once you have access, you can make a virtual key and make requests to the OpenAI-compatible API.

## Example Requests

### Chat

OpenAI API docs: [Create chat completion](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create)

```
curl https://10.152.0.2:9999/v1/chat/completions -k \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $VIRTUAL_KEY" \
  -d '{
    "model": "indra-llm/google/gemma-4-26b-a4b-it",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }'
```

### Speech Generation (Text to Speech - TTS)

OpenAI API docs: [Create speech](https://developers.openai.com/api/reference/resources/audio/subresources/speech/methods/create)

```
curl -X POST https://10.152.0.2:9999/v1/audio/speech \
  -k \
  -H "Authorization: Bearer $VIRTUAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "indra-tts/default",
    "input": "This is a text-to-speech system check. Audio synthesis is functional on Indra.",
    "voice": "nona"
  }' \
  --output tts_test.wav
```

### Transcription (Speech to Text - STT)

OpenAI API docs: [Create transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)

```
curl https://10.152.0.2:9999/v1/audio/transcriptions \
  -k \
  -H "Authorization: Bearer $VIRTUAL_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "file=@/path/to/audio/file/on/your/computer/sample.ogg" \
  -F "body=" \
  -F "model=indra-stt/deepdml/faster-whisper-large-v3-turbo-ct2" \
  -F "response_format=json"
```