Get a Single Model
Brief: Returns information for a single model accessible by the current API key.
Overview
- Method:
GET - Path:
/v1/models/{model} - Content-Type:
application/json
Authentication
Supports multiple header authentication formats (any one is accepted):
- OpenAI:
Authorization: Bearer sk-xxx - Anthropic:
x-api-key: sk-xxx+anthropic-version: 2023-06-01 - Google:
x-goog-api-key: sk-xxx
Request Examples
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model name, e.g., gemini-2.0-flash |
Headers
| Header | Example | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Authorization | Bearer sk-xxxx | No (OpenAI format) |
| x-api-key | sk-xxx | No (Anthropic format) |
| anthropic-version | 2023-06-01 | No (Anthropic format) |
| x-goog-api-key | sk-xxx | No (Google format) |
curl example
bash
curl -X GET "https://api.gpt.ge/v1/models/gemini-2.0-flash" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx"JavaScript (fetch) example
javascript
fetch('https://api.gpt.ge/v1/models/gemini-2.0-flash', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sk-xxxx'
}
}).then(r => r.json()).then(console.log)Python (requests) example
python
import requests
resp = requests.get(
'https://api.gpt.ge/v1/models/gemini-2.0-flash',
headers={'Content-Type': 'application/json', 'Authorization': 'Bearer sk-xxxx'}
)
print(resp.json())Response Example (200)
json
{
"data": [
{
"id": "gemini-2.0-flash",
"object": "model",
"created": 1627776000,
"owned_by": "google"
},
{
"id": "claude-sonnet-4-5-20230929",
"object": "model",
"created": 1627776000,
"owned_by": "anthropic"
}
],
"object": "list",
"success": true
}