Models
Retrieve the models available to the current virtual API key and get information about a specific model.
Model permissions
Different virtual API keys may receive different model lists. Only models accessible to the current virtual API key are returned.
List all models
Retrieve the models available to the current virtual API key.
Endpoint
http
GET https://api.nexusmodels.cn/v1/modelsHeaders
http
Authorization: Bearer YOUR_NEXUSMODELS_API_KEYExample
bash
curl -sS \
'https://api.nexusmodels.cn/v1/models' \
-H 'Authorization: Bearer YOUR_NEXUSMODELS_API_KEY'Response
A successful request returns:
http
200 OKResponse example
json
{
"object": "list",
"data": [
{
"id": "gpt-5.4",
"object": "model",
"created": 1788163200,
"owned_by": "openai"
},
{
"id": "claude-sonnet-4-6",
"object": "model",
"created": 1788163200,
"owned_by": "anthropic"
},
{
"id": "gemini-3-flash",
"object": "model",
"created": 1788163200,
"owned_by": "google"
}
]
}Response fields
| Field | Type | Description |
|---|---|---|
object | string | Object type, usually list |
data | array | Models available to the virtual API key |
data[].id | string | Public model name used in API requests |
data[].object | string | Object type, usually model |
data[].created | integer | Model record creation timestamp |
data[].owned_by | string | Model provider |
Use a model
The model parameter in other API requests must use an id returned by the model list endpoint.
json
{
"model": "gpt-5.4"
}Chat example:
bash
curl -sS -X POST \
'https://api.nexusmodels.cn/v1/chat/completions' \
-H 'Authorization: Bearer YOUR_NEXUSMODELS_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-5.4",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'Common errors
| Status | Description |
|---|---|
401 | Missing or invalid API key |
403 | The virtual API key cannot access the resource |
404 | The model does not exist or is not accessible |
429 | Budget, RPM or TPM limit exceeded |
500 | Gateway or provider error |