中继 API: models
本页由 docs-site/openapi/relay.yaml 生成,内容为英文,请勿手工修改。
Model listing in the OpenAI, Anthropic and Gemini shapes.
GET /v1/models
Section titled “GET /v1/models”List models
operationId relayListModels · auth: bearerAuth or apiKeyHeader or googApiKeyHeader or googApiKeyQuery
Lists the models your key may use and that currently have a price and at least one
provider. A request that carries anthropic-version and no Authorization header gets
the Anthropic list shape and Anthropic errors.
| Status | Meaning | Body |
|---|---|---|
| 200 | The model list. | application/json ModelList |
| default | Error in the OpenAI envelope (error.message, error.type, error.param, error.code). |
application/json OpenAIError |
Response 200 application/json — ModelList
object(string)data(array of Model)id(string) — Model slug. Use it asmodel.object(string)created(integer)owned_by(string)name(string)context_length(integer)max_output_tokens(integer)deprecated(boolean)
GET /v1/models/{model}
Section titled “GET /v1/models/{model}”Get one model
operationId relayGetModel · auth: bearerAuth or apiKeyHeader or googApiKeyHeader or googApiKeyQuery
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
model |
path | string | yes |
| Status | Meaning | Body |
|---|---|---|
| 200 | The model. | application/json Model |
| 404 | Error in the OpenAI envelope (error.message, error.type, error.param, error.code). |
application/json OpenAIError |
| default | Error in the OpenAI envelope (error.message, error.type, error.param, error.code). |
application/json OpenAIError |
Response 200 application/json — Model
id(string) — Model slug. Use it asmodel.object(string)created(integer)owned_by(string)name(string)context_length(integer)max_output_tokens(integer)deprecated(boolean)
GET /v1beta/models
Section titled “GET /v1beta/models”List models (Gemini shape)
operationId relayListGeminiModels · auth: googApiKeyHeader or googApiKeyQuery or bearerAuth
| Status | Meaning | Body |
|---|---|---|
| 200 | Chat and embedding models with supportedGenerationMethods. |
application/json OpenAIObject |
| default | Error in the Google envelope (error.code, error.message, error.status). |
application/json GeminiError |
Response 200 application/json — OpenAIObject
The provider-shaped response object of the dialect, with cost added inside its usage object.