跳转到内容
EN

读取模型

GET/google/v1beta/models/{modelsId}● 支持

Gemini API 官方文档 ↗

请求参数

  • namestring必填

    path: Required. The resource name of the model. This name should match a model name returned by the ListModels method. Format: models/{model}

返回

200

错误按 Gemini API 格式返回,参见 错误码

请求示例

curl
curl https://api.deepraxis.com/google/v1beta/models/gemini-2.5-flash \
  -H "x-goog-api-key: $PRAXIS_API_KEY"
Python
from google import genai
from google.genai import types

client = genai.Client(
    api_key="$PRAXIS_API_KEY",
    http_options=types.HttpOptions(base_url="https://api.deepraxis.com/google"),
)

model = client.models.get(model="gemini-2.5-flash")
print(model.display_name)
TypeScript
import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({
  apiKey: "$PRAXIS_API_KEY",
  httpOptions: { baseUrl: "https://api.deepraxis.com/google" },
});

const model = await ai.models.get({ model: "gemini-2.5-flash" });
console.log(model.displayName);

响应示例 200

{
  "name": "models/deepseek-flash",
  "baseModelId": "deepseek-flash",
  "version": "001",
  "displayName": "DeepSeek V4.1 Flash",
  "description": "DeepSeek 官方 Flash,当前版本为 V4.1。支持文本与图像理解;使用官方 deepseek-flash 滚动入口,后续可能随官方更新,非固定版本快照。平台采用固定公开售价;采购成本按官方高峰价记录为上限估值,并非实际结算成本。",
  "inputTokenLimit": 1000000,
  "outputTokenLimit": 384000,
  "supportedGenerationMethods": [
    "generateContent",
    "streamGenerateContent",
    "countTokens"
  ],
  "thinking": true
}

响应

HTTP 200

Successful response

application/json

名称 类型 说明
baseModelId string Required. The name of the base model, pass this to the generation request. Examples: * gemini-1.5-flash
description string A short description of the model.
displayName string The human-readable name of the model. E.g. "Gemini 1.5 Flash". The name can be up to 128 characters long and can consist of any UTF-8 characters.
inputTokenLimit integer Maximum number of input tokens allowed for this model.
maxTemperature number The maximum temperature this model can use.
name string Required. The resource name of the Model. Refer to Model variants for all allowed values. Format: models/{model} with a {model} naming convention of: * "{base_model_id}-{version}" Examples: * models/gemini-1.5-flash-001
outputTokenLimit integer Maximum number of output tokens available for this model.
supportedGenerationMethods array<string> The model's supported generation methods. The corresponding API method names are defined as Pascal case strings, such as generateMessage and generateContent.
temperature number Controls the randomness of the output. Values can range over [0.0,max_temperature], inclusive. A higher value will produce responses that are more varied, while a value closer to 0.0 will typically result in less surprising responses from the model. This value specifies default to be used by the backend while making the call to the model.
thinking boolean Whether the model supports thinking.
topK integer For Top-k sampling. Top-k sampling considers the set of top_k most probable tokens. This value specifies default to be used by the backend while making the call to the model. If empty, indicates the model doesn't use top-k sampling, and top_k isn't allowed as a generation parameter.
topP number For Nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least top_p. This value specifies default to be used by the backend while making the call to the model.
version string Required. The version number of the model. This represents the major version (1.0 or 1.5)