跳转到主要内容
Use this endpoint to fetch the full list of models available to your API key. This is useful for dynamically populating model selectors in your application, verifying that a specific model ID is accessible, or discovering newly added models. Endpoint: GET https://api.qhaigc.net/v1/models

Authentication

Include your API key in the Authorization header:
Authorization: Bearer sk-your-api-key-here

Response Fields

object
string
Always "list".
data
array
Array of model objects accessible to your API key.

Code Examples

from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key-here",
    base_url="https://api.qhaigc.net/v1"
)

models = client.models.list()

for model in models.data:
    print(f"ID: {model.id}")

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o",
      "object": "model",
      "created": 1626777600,
      "owned_by": "openai"
    },
    {
      "id": "claude-opus-4-20250514",
      "object": "model",
      "created": 1746057600,
      "owned_by": "anthropic"
    },
    {
      "id": "qh-draw-x2-preview",
      "object": "model",
      "created": 1626777600,
      "owned_by": "qh-draw"
    },
    {
      "id": "bge-m3",
      "object": "model",
      "created": 1626777600,
      "owned_by": "baai"
    }
  ]
}
The id field is the exact string to pass as the model parameter in other API requests. Always fetch from this endpoint rather than hard-coding model IDs — new models are added regularly.