Welcome to the Generative AI API Service, our centralized gateway designed to empower staff and students with seamless access to state-of-the-art Large Language Models (LLMs).
Our service provides a fully OpenAI-compatible API, allowing you to leverage a diverse and growing roster of industry-leading AI models using the tools, SDKs, and frameworks you already know.
You will receive a free monthly credit of HKD 8.00, which will be automatically renewed on the first day of each month at 8:00am. This credit is shared with your usage on the HKUST GenAI platform. For any additional usage, you may top up credits your own expense.
API Key Subscription
To access the Generative AI models, you will need an API key. This key uniquely identifies each user. Follow the instructions below to obtain your own API key. REMEMBER to keep your API key secure and do not share it with others, as it provides access to your account and usage.
- Navigate to the HKUST API Developer Portal on Microsoft Azure API Management

- Sign up with your HKUST account

- Navigate to the Products page from the top menu, and click on the HKUST GenAI

- Enter a description for your reference, and click Subscribe

- Click Show to display the hidden API keys. Both primary and secondary keys can be used to access the Generative AI models

API Key Verification
Verify API key access to Generative AI API
Note: All API requests must include a custom header named api-key with your API key set as its value.
- Method - Postman (GUI)
- Launch Postman (Postman API Platform)
- Prepare a POST request to https://hkust.azure-api.net/hkust-genai/v1/chat/completions, and set header and body as follows:

- send the request to receive a response

Use OpenAI Python Library
Use the OpenAI Python library to integrate OpenAI's services into Python applications.

Rate Limits
Rate limits are restrictions that the API imposes on the number of times a user or client can access the services within a specified timeframe. Currently, the rate limit configured on the API gateway are set to 60 requests per minute.
Recommendations for staying within rate limits
- Avoid sudden spikes in traffic and scale your workload gradually
- Introduce deliberate delays between subsequent requests
- Implement robust retry mechanisms (such as exponential backoff) in your application
Supported Generative AI Models
- Below is a list of the Generative AI models currently accessible through this service. Please note that models are deployed and retired on a regular basis. To obtain the current list of supported models, please retrieve them from following endpoint: https://hkust.azure-api.net/hkust-genai/v1/models
Provider Model name Suggested Use Case Google gemini-2.5-flash Fast, low-cost multimodal tasks and chatbots Google gemini-2.5-flash-image Image generation Google gemini-2.5-flash-lite Ultra-cheap, fast classification and routing Google gemini-3-flash-preivew Next-generation high-speed multimodal features Google gemini-3.1-pro-preivew Deep complex analysis and advanced coding OpenAI gpt-4.1-mini Efficient, low-cost daily text generation OpenAI gpt-4o High-stakes complex reasoning OpenAI gpt-4o-mini Massive-scale lightweight tasks, summarization, and simple queries OpenAI gpt-5-mini Next-gen everyday automation balancing high intelligence and cost OpenAI gpt-5-nano On-device processing, mobile apps, and offline micro-tasks OpenAI o3-mini Budget-friendly deep reasoning for coding and math logic OpenAI o4-mini Next-generation advanced STEM solving at a smaller scale OpenAI text-embedding-3-large High-precision semantic search and deep RAG applications OpenAI text-embedding-3-small Fast, low-cost vector generation for standard search OpenAI text-embedding-ada-002 Legacy support for existing, pre-built vector databases Local Inference deepseek-r1-distill Deep reasoning and coding Local Inference llama33-70b Enterprise-grade general intelligence Local Inference qwen3-32b Multilingual tasks and balanced coding
Unsupported Features
Credit Balance & Top Up
To check your latest credit balance, you can retrieve both free and paid credits from: https://hkust.azure-api.net/hkust-genai/v1/balance
Once you have depleted your credit, the following response will be returned when you try to access the OpenAI API. Top up your credit at the OpenAI Credit Purchase System
Reference
The HKUST Generative AI API service is available to offices and departments on chargeback basis. For further information, please contact cchelp@ust.hk.