Skip to content

Models ​

查询当前 Token 可以使用的模型清单,了解可用能力与属性。

GET /v1/models 返回与当前 Token 绑定的所有模型,包含模型 ID、类型、可用状态等信息。

请求示例(cURL) ​

bash
curl "https://aiapi.fhddos.com/v1/models" \
  -H "Authorization: Bearer $TOKEN"

业务场景 ​

  • 动态能力探测:根据返回的模型列表决定是否显示某些功能入口。
  • 监控与灰度:结合 Fhddos 控制台的配额策略,可在模型级别做灰度发布。
  • SDK 初始化:许多外部 SDK 允许通过提前拉取模型列表进行本地缓存,避免硬编码。

OpenAPI ​

yaml
openapi: 3.0.3
info:
  title: Fhddos Core API
  version: '1.0'
  description: >-
    Core OpenAI-compatible and model-family endpoints used by the Fhddos user
    docs.
servers:
  - url: https://aiapi.fhddos.com
security:
  - BearerAuth: []
paths:
  /v1/models:
    get:
      tags:
        - OpenAI
      summary: List models
      responses:
        '200':
          $ref: '#/components/responses/JsonObject'
components:
  responses:
    JsonObject:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericObject'
  schemas:
    GenericObject:
      type: object
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer <token>'

Fhddos AI 用户文档