模型管理 · 小模型管理 API (0.1.0)

Download OpenAPI specification:

Public HTTP contract derived from the current route signatures and Pydantic request models. Internal /api/private routes are excluded. Dynamic controller results remain an open JSON schema.

Small Model Add

Current route signature. Successful results are returned by the controller without a FastAPI response_model; no fixed response object is enforced at this route.

Authorizations:
BearerAuth
Request Body schema: application/json
required

JSON request accepted by the implemented handler signature. Dictionary fields are validated by the controller.

model_name
required
string (Model Name)

Model name

model_type
required
string (Model Type) ^(reranker|embedding)$

Model type

model_config
object (Model Config)
Default: {}

Third-party model service configuration

adapter
boolean (Adapter)
Default: false

Whether to enable the adapter service

adapter_code
string (Adapter Code)

Adapter code

batch_size
required
integer (Batch Size)

Batch size

max_documents
integer or null [ 1 .. 2147483647 ]

Maximum input documents per rerank request; only supported for reranker models. Null disables the local limit. Creation without this field has no local limit. Editing without this field preserves the saved limit; explicit null clears it. Requests exceeding the limit return HTTP 400 without calling the provider.

max_tokens
integer (Max Tokens)

Maximum token count

embedding_dim
integer (Embedding Dim)

Embedding dimension

default
boolean (Default)
Default: false

Whether to set this model as the system default

is_private
boolean (Is Private)
Default: false

Whether this is a private route used to control validation

Responses

Request samples

Content type
application/json
{
  • "model_name": "string",
  • "model_type": "string",
  • "model_config": { },
  • "adapter": false,
  • "adapter_code": "string",
  • "batch_size": 0,
  • "max_documents": 1,
  • "max_tokens": 0,
  • "embedding_dim": 0,
  • "default": false,
  • "is_private": false
}

Response samples

Content type
application/json
null

Small Model Edit

Current route signature. Successful results are returned by the controller without a FastAPI response_model; no fixed response object is enforced at this route.

Authorizations:
BearerAuth
Request Body schema: application/json
required

JSON request accepted by the implemented handler signature. Dictionary fields are validated by the controller.

model_id
required
string (Model Id) = 19 characters

Configuration ID

model_name
required
string (Model Name)

Model name

model_type
required
string (Model Type) ^(reranker|embedding)$

Model type

model_config
object (Model Config)
Default: {}

Third-party model service configuration

adapter
boolean (Adapter)
Default: false

Whether to enable the adapter service

adapter_code
string (Adapter Code)

Adapter code

batch_size
required
integer (Batch Size)

Batch size

max_documents
integer or null [ 1 .. 2147483647 ]

Maximum input documents per rerank request; only supported for reranker models. Null disables the local limit. Creation without this field has no local limit. Editing without this field preserves the saved limit; explicit null clears it. Requests exceeding the limit return HTTP 400 without calling the provider.

max_tokens
integer (Max Tokens)

Maximum token count

embedding_dim
integer (Embedding Dim)

Embedding dimension

change
boolean (Change)
Default: false

Whether api_key in model_config was changed

Responses

Request samples

Content type
application/json
{
  • "model_id": "stringstringstrings",
  • "model_name": "string",
  • "model_type": "string",
  • "model_config": { },
  • "adapter": false,
  • "adapter_code": "string",
  • "batch_size": 0,
  • "max_documents": 1,
  • "max_tokens": 0,
  • "embedding_dim": 0,
  • "change": false
}

Response samples

Content type
application/json
null

Small Model List

Current route signature. Successful results are returned by the controller without a FastAPI response_model; no fixed response object is enforced at this route.

Authorizations:
BearerAuth
query Parameters
order
string (Order) ^(desc|asc)$
Default: "desc"
rule
string (Rule) ^(create_time|update_time|model_name)$
Default: "update_time"
page
integer (Page) >= 1
Default: 1
size
integer (Size) >= 1
Default: 20
model_name
string (Model Name)
Default: ""
model_type
string (Model Type)
Default: ""
model_series
string (Model Series)
Default: ""

Responses

Response samples

Content type
application/json
null

Small Model Get

Current route signature. Successful results are returned by the controller without a FastAPI response_model; no fixed response object is enforced at this route.

Authorizations:
BearerAuth
query Parameters
model_id
required
any (Model Id)

Responses

Response samples

Content type
application/json
null

Small Model Get_Default

Requires an enabled account and small_model display authorization. Authorized callers receive an empty object when no default is configured. Successful results use an open JSON schema.

Authorizations:
BearerAuth
query Parameters
model_type
string (Model Type)
Default: "embedding"

Responses

Response samples

Content type
application/json
null

Small Model Set Default

Current route signature. Successful results are returned by the controller without a FastAPI response_model; no fixed response object is enforced at this route.

Authorizations:
BearerAuth
Request Body schema: application/json
required

JSON request accepted by the implemented handler signature. Dictionary fields are validated by the controller.

object (Model Para)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
null

Small Model Names

Current route signature. Successful results are returned by the controller without a FastAPI response_model; no fixed response object is enforced at this route.

Authorizations:
BearerAuth
Request Body schema: application/json
required

JSON request accepted by the implemented handler signature. Dictionary fields are validated by the controller.

object (Model Para)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
null

Small Model Delete

Current route signature. Successful results are returned by the controller without a FastAPI response_model; no fixed response object is enforced at this route.

Authorizations:
BearerAuth
Request Body schema: application/json
required

JSON request accepted by the implemented handler signature. Dictionary fields are validated by the controller.

object (Model Para)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
null

Small Model Test

Requires an enabled account and small_model execute authorization. New configurations use the type-wide resource; saved configurations use their model ID. Authorization precedes configuration loading and provider calls. Successful results use an open JSON schema.

Authorizations:
BearerAuth
Request Body schema: application/json
required

JSON request accepted by the implemented handler signature. Dictionary fields are validated by the controller.

model_id
string (Model Id) = 19 characters

Configuration ID

model_name
string (Model Name)
Default: ""

Model name

model_type
string (Model Type) ^(reranker|embedding)$
Default: ""

Model type

model_config
object (Model Config)
Default: {}

Third-party model service configuration

adapter
boolean (Adapter)
Default: false

Whether to enable the adapter service

adapter_code
string (Adapter Code)

Adapter code

batch_size
integer (Batch Size)

Batch size

max_documents
integer or null [ 1 .. 2147483647 ]

Maximum input documents per rerank request; only supported for reranker models. Null disables the local limit. Creation without this field has no local limit. Editing without this field preserves the saved limit; explicit null clears it. Requests exceeding the limit return HTTP 400 without calling the provider.

max_tokens
integer (Max Tokens)

Maximum token count

embedding_dim
integer (Embedding Dim)

Embedding dimension

change
boolean (Change)
Default: false

Whether api_key in model_config was changed

Responses

Request samples

Content type
application/json
{
  • "model_id": "stringstringstrings",
  • "model_name": "",
  • "model_type": "",
  • "model_config": { },
  • "adapter": false,
  • "adapter_code": "string",
  • "batch_size": 0,
  • "max_documents": 1,
  • "max_tokens": 0,
  • "embedding_dim": 0,
  • "change": false
}

Response samples

Content type
application/json
null