MoleAPIMoleAPI
DocumentationAPI ReferenceAI Model APIModelsList models

Native OpenAI Format

Retrieve the list of currently available models.

The response format is automatically determined based on the request headers:

  • Returns Anthropic format when both x-api-key and anthropic-version headers are included
  • Returns Gemini format when the x-goog-api-key header or the key query parameter is included
  • Returns OpenAI format in all other cases
GET
/v1/models

Authorization

BearerAuth

AuthorizationBearer <token>

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

In: header

Query Parameters

key?string

Google API Key (用于 Gemini 格式)

Header Parameters

x-api-key?string

Anthropic API Key (用于 Claude 格式)

anthropic-version?string

Anthropic API 版本

x-goog-api-key?string

Google API Key (用于 Gemini 格式)

Response Body

application/json

application/json

curl -X GET "https://api.moleapi.com/v1/models"
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4",
      "object": "model",
      "created": 0,
      "owned_by": "openai"
    }
  ]
}
{
  "error": {
    "message": "string",
    "type": "string",
    "param": "string",
    "code": "string"
  }
}

How is this guide?

Last updated on

Back HomeGateway