Local API Guide contents
Overview
Returns one of the two chat models, installed or not. Use it to check whether a model is the loaded one before you send work.
Request
| Parameter | Description |
|---|---|
idpathrequired | qwen3.8-27b or qwen3.6-35b-a3b. |
| Authorization header | Authorization: Bearer <key>, only when Require API key is on in the app. |
Response
A single model object, with the same fields as in List models.
Example
curl http://localhost:1234/v1/models/qwen3.6-35b-a3bfrom openai import OpenAI client = OpenAI(base_url="http://localhost:1234/v1", api_key="not-needed") m = client.models.retrieve("qwen3.6-35b-a3b") print(m.model_extra["loaded"], m.model_extra["context_length"])
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "http://localhost:1234/v1", apiKey: "not-needed" }); const m = await client.models.retrieve("qwen3.6-35b-a3b"); console.log(m.loaded, m.context_length);
{ "id": "qwen3.6-35b-a3b", "object": "model", "created": 1760000000, "owned_by": "5090Ai",
"display_name": "Qwen3.6-35B-A3B", "context_length": 262144, "loaded": true }Errors
| Status | Code | When |
|---|---|---|
| 401 | invalid_api_key | Require API key is on and the key is missing or wrong. |
| 404 | model_not_found | The id is not one of the two chat models. |