# List Model Hosts

`GET /v1/catalog/models/hosts`

The hosts that can serve one OpenRouter language model; fastest first when the workspace
has an OpenRouter key. Each `host` is a valid entry for `llm.hosts`.

Authenticate with `Authorization: Bearer $TALQING_API_KEY`. Errors use the shared envelope: https://docs.talqing.com/api-reference/errors.md

## OpenAPI

```json
{
 "openapi":"3.1.0",
 "servers":[
  {
   "description":"Talqing API",
   "url":"https://api.talqing.com"
  }
 ],
 "paths":{
  "/v1/catalog/models/hosts":{
   "get":{
    "description":"The hosts that can serve one OpenRouter language model; fastest first when the workspace\nhas an OpenRouter key. Each `host` is a valid entry for `llm.hosts`.",
    "operationId":"catalog.models.hosts",
    "parameters":[
     {
      "in":"query",
      "name":"model",
      "required":true,
      "schema":{
       "title":"Model",
       "type":"string"
      }
     }
    ],
    "responses":{
     "200":{
      "content":{
       "application/json":{
        "schema":{
         "$ref":"#/components/schemas/ModelHostsResponse"
        }
       }
      },
      "description":"Successful Response"
     },
     "401":{
      "$ref":"#/components/responses/Unauthorized"
     },
     "422":{
      "$ref":"#/components/responses/ValidationFailed"
     },
     "default":{
      "$ref":"#/components/responses/Error"
     }
    },
    "security":[
     {
      "BearerAuth":[]
     },
     {
      "SessionCookie":[]
     }
    ],
    "summary":"List Model Hosts",
    "tags":[
     "catalog"
    ]
   }
  }
 },
 "components":{
  "responses":{
   "Error":{
    "content":{
     "application/json":{
      "schema":{
       "$ref":"#/components/schemas/ErrorResponse"
      }
     }
    },
    "description":"Unexpected error. Every error this API returns carries this body."
   },
   "Unauthorized":{
    "content":{
     "application/json":{
      "schema":{
       "$ref":"#/components/schemas/ErrorResponse"
      }
     }
    },
    "description":"Missing credential, or one that is revoked or no longer a member of this organization."
   },
   "ValidationFailed":{
    "content":{
     "application/json":{
      "schema":{
       "$ref":"#/components/schemas/ErrorResponse"
      }
     }
    },
    "description":"The request did not match this operation's schema; `detail.errors` lists each field."
   }
  },
  "schemas":{
   "ErrorBody":{
    "description":"The structured half of our error contract: a human `message` plus a list\nof individual `errors` (used wherever we surface many problems at once,\nincluding tool publish, op-tree checks, and request validation). The global\nexception handlers normalize every API error to\n`{detail: {message, errors, code}}`, so SDKs can parse one shape consistently.",
    "properties":{
     "code":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "default":null,
      "description":"A stable identifier for this error, when it has one.",
      "title":"Code"
     },
     "errors":{
      "items":{
       "type":"string"
      },
      "title":"Errors",
      "type":"array"
     },
     "message":{
      "title":"Message",
      "type":"string"
     }
    },
    "required":[
     "message",
     "errors"
    ],
    "title":"ErrorBody",
    "type":"object"
   },
   "ErrorResponse":{
    "description":"The body of every error response, at every status code.",
    "properties":{
     "detail":{
      "$ref":"#/components/schemas/ErrorBody"
     }
    },
    "required":[
     "detail"
    ],
    "title":"ErrorResponse",
    "type":"object"
   },
   "LLMPricing":{
    "properties":{
     "cache_write_per_1m":{
      "anyOf":[
       {
        "type":"number"
       },
       {
        "type":"null"
       }
      ],
      "title":"Cache Write Per 1M"
     },
     "cached_input_per_1m":{
      "anyOf":[
       {
        "type":"number"
       },
       {
        "type":"null"
       }
      ],
      "title":"Cached Input Per 1M"
     },
     "input_per_1m":{
      "anyOf":[
       {
        "type":"number"
       },
       {
        "type":"null"
       }
      ],
      "title":"Input Per 1M"
     },
     "output_per_1m":{
      "anyOf":[
       {
        "type":"number"
       },
       {
        "type":"null"
       }
      ],
      "title":"Output Per 1M"
     }
    },
    "title":"LLMPricing",
    "type":"object"
   },
   "ModelHostResponse":{
    "description":"One endpoint that can serve an OpenRouter language model.",
    "properties":{
     "all_endpoints":{
      "title":"All Endpoints",
      "type":"boolean"
     },
     "context_length":{
      "anyOf":[
       {
        "type":"integer"
       },
       {
        "type":"null"
       }
      ],
      "title":"Context Length"
     },
     "host":{
      "title":"Host",
      "type":"string"
     },
     "latency_p50_ms":{
      "anyOf":[
       {
        "type":"integer"
       },
       {
        "type":"null"
       }
      ],
      "title":"Latency P50 Ms"
     },
     "logo_url":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Logo Url"
     },
     "name":{
      "title":"Name",
      "type":"string"
     },
     "pricing":{
      "$ref":"#/components/schemas/LLMPricing"
     },
     "quantization":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Quantization"
     },
     "service_tier":{
      "anyOf":[
       {
        "enum":[
         "priority",
         "ultrafast"
        ],
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Service Tier"
     },
     "throughput_p50":{
      "anyOf":[
       {
        "type":"integer"
       },
       {
        "type":"null"
       }
      ],
      "title":"Throughput P50"
     },
     "uptime_30m":{
      "anyOf":[
       {
        "type":"number"
       },
       {
        "type":"null"
       }
      ],
      "title":"Uptime 30M"
     }
    },
    "required":[
     "host",
     "name",
     "logo_url",
     "quantization",
     "pricing",
     "context_length",
     "latency_p50_ms",
     "throughput_p50",
     "uptime_30m",
     "service_tier",
     "all_endpoints"
    ],
    "title":"ModelHostResponse",
    "type":"object"
   },
   "ModelHostsResponse":{
    "properties":{
     "hosts":{
      "items":{
       "$ref":"#/components/schemas/ModelHostResponse"
      },
      "title":"Hosts",
      "type":"array"
     },
     "model":{
      "title":"Model",
      "type":"string"
     }
    },
    "required":[
     "model",
     "hosts"
    ],
    "title":"ModelHostsResponse",
    "type":"object"
   }
  }
 }
}
```
