Gemini Models API
Query available models on the HaoAI platform through the Gemini native protocol. The response format follows the Google GenAI API specification (name, displayName, inputTokenLimit, and other camelCase fields).
The Models API is a public endpoint that does not require an API Key. This endpoint returns all models accessible via the Gemini protocol, not limited to Google models.
List All Models
GET https://api.hao.ai/gemini/v1beta/modelsRequest Example
Terminal
curl https://api.hao.ai/gemini/v1beta/modelsResponse Format
{
"models": [
{
"name": "models/google/gemini-3.1-flash-lite-preview",
"version": "001",
"displayName": "Google: Gemini 3 Flash Preview",
"description": "High speed, high value thinking model designed for agentic workflows...",
"inputTokenLimit": 1048576,
"outputTokenLimit": 65536,
"supportedGenerationMethods": [
"generateContent",
"countTokens"
],
"ownedBy": "google",
"canonicalSlug": "gemini-3.1-flash-lite-preview",
"contextLength": 1048576,
"architecture": {
"modality": "text+image+audio+file->text",
"input_modalities": ["text", "image", "audio", "file"],
"output_modalities": ["text"],
"tokenizer": "gemini",
"instruct_type": null
},
"pricing": {
"prompt": "0.0000005",
"completion": "0.000003",
"audio": "0.000001",
"input_cache_read": "0.00000005",
"input_cache_write": "0.000001",
"web_search": "0.014"
},
"topProvider": {
"context_length": 1048576,
"max_completion_tokens": 65536,
"is_moderated": false
},
"supportedParameters": [
"temperature",
"top_p",
"max_tokens",
"stop",
"tools",
"tool_choice",
"response_format",
"reasoning"
],
"expirationDate": null
}
]
}Field Differences from OpenAI Protocol
| Field | OpenAI Protocol | Gemini Protocol |
|---|---|---|
| List key | data | models |
| Model identifier | id | name (with models/ prefix) |
| Name | name | displayName |
| Context length | context_length | inputTokenLimit + contextLength |
| Max output | top_provider.max_completion_tokens | outputTokenLimit |
| Naming style | snake_case | camelCase |
Filter Models by Provider
GET https://api.hao.ai/gemini/v1beta/models/{provider}Path Parameters
| Parameter | Type | Description |
|---|---|---|
provider | string | Provider identifier, e.g. google, anthropic, openai |
Request Example
Terminal
# List only Google models
curl https://api.hao.ai/gemini/v1beta/models/googleResponse Format
The response format is the same as listing all models, with the models array containing only models from the specified provider.
Get Model Details
GET https://api.hao.ai/gemini/v1beta/models/{provider}/{model_id}Path Parameters
| Parameter | Type | Description |
|---|---|---|
provider | string | Provider identifier, e.g. google |
model_id | string | Model name, e.g. gemini-3.1-flash-lite-preview |
Request Example
Terminal
curl https://api.hao.ai/gemini/v1beta/models/google/gemini-3.1-flash-lite-previewResponse Format
Returns a single Model object with the same structure as objects in the list endpoint.