GET /v1/models
List available models
List available models. Runars serves a catalog of models—this endpoint returns the ones your organization can access. It also provides compatibility with OpenAI SDK's .models.list() method.
Endpoint
GET https://api.runars.ca/v1/modelsAuthentication
Include your API key as a Bearer token:
-H "Authorization: Bearer sk-runars-..."Note: Unlike some OpenAI APIs, this endpoint requires authentication. Invalid or missing keys return 401 Unauthorized.
Response
{
"object": "list",
"data": [
{
"id": "glm-5.2",
"object": "model",
"owned_by": "runars",
"permission": []
}
]
}The response includes one entry per enabled model in your catalog. Requesting a model id that isn't in this list returns 404 model_not_found—unknown ids are never silently substituted.
Examples
Using curl
curl https://api.runars.ca/v1/models \
-H "Authorization: Bearer sk-runars-..."Using the OpenAI SDK
import OpenAI from "openai"
const openai = new OpenAI({
baseURL: "https://api.runars.ca/v1",
apiKey: process.env.OPENAI_API_KEY,
})
const models = await openai.models.list()
console.log(models.data)Output:
[
{
id: 'glm-5.2',
object: 'model',
owned_by: 'runars',
permission: []
}
]Programmatically checking model availability
const models = await openai.models.list()
const runarsAvailable = models.data.some((m) => m.id === "glm-5.2")
console.log(`GLM-5.2 available: ${runarsAvailable}`)Error responses
401 Unauthorized
Invalid or missing API key:
{
"error": {
"message": "Unauthorized",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}404 model_not_found
Returned by /v1/messages, /v1/chat/completions, and /v1/responses when the requested model id isn't in the catalog. Requesting an unknown model never substitutes a default—the caller must send a valid id from GET /v1/models.
Model details
The glm-5.2 model is:
- 744B-parameter Mixture-of-Experts model
- 131,072-token context window
- Served from our Canadian GPU Cloud in Montreal & Calgary (Canadian data residency)
- Pricing: $1.00/1M input tokens, $4.00/1M output tokens (see Pricing or browse all Models)
Additional models may be added to your catalog over time—this endpoint always reflects the current set. For more information, see the Overview.