# 获取所有供应商

Source: https://langbot.app/docs/ja/api-reference/model-providers/%E8%8E%B7%E5%8F%96%E6%89%80%E6%9C%89%E4%BE%9B%E5%BA%94%E5%95%86

## GET /api/v1/provider/providers

获取所有模型供应商列表，包含每个供应商关联的 LLM 和 Embedding 模型数量。

Authentication (OpenAPI security alternatives; OR between entries, AND within each entry): [{"ApiKeyAuth":[]},{"BearerAuth":[]}]. See components.securitySchemes below for header names, schemes and scopes.

Servers: http://localhost:5300. Use your own LangBot instance, not the documentation host.

[Complete ja OpenAPI specification](https://langbot.app/docs/openapi/service-api-ja.json)

## Operation contract

The OpenAPI subset below preserves path/operation parameters, request bodies, response codes, media types, examples and schemas. All referenced components are included transitively; resolve local JSON pointers against this document. The operation is preserved verbatim, including security overrides.

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "LangBot Service API",
    "description": "LangBot external service API documentation. These endpoints support API Key authentication for programmatic access to LangBot resources.\n\n**Authentication:**\n- User Token (via `Authorization: Bearer <token>`)\n- API Key (via `X-API-Key: <key>` or `Authorization: Bearer <key>`)\n\nAll endpoints in this document support both authentication methods unless otherwise noted.\n",
    "version": "4.9.5",
    "contact": {
      "name": "LangBot",
      "url": "https://langbot.app"
    },
    "license": {
      "name": "AGPL-3.0",
      "url": "https://github.com/langbot-app/LangBot/blob/master/LICENSE"
    }
  },
  "servers": [
    {
      "url": "http://localhost:5300",
      "description": "Local development server"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/api/v1/provider/providers": {
      "get": {
        "tags": [
          "Model Providers"
        ],
        "summary": "获取所有供应商",
        "description": "获取所有模型供应商列表，包含每个供应商关联的 LLM 和 Embedding 模型数量。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 0
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "providers": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ModelProvider"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ModelProvider": {
        "type": "object",
        "description": "模型供应商。定义了 API 地址和密钥，模型通过 provider_uuid 关联。",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "example": "OpenAI"
          },
          "requester": {
            "type": "string",
            "description": "请求器类型",
            "example": "openai-chat-completions"
          },
          "base_url": {
            "type": "string",
            "description": "API 基础地址",
            "example": "https://api.openai.com/v1"
          },
          "api_keys": {
            "type": "array",
            "description": "API 密钥列表",
            "items": {
              "type": "string"
            }
          },
          "llm_count": {
            "type": "integer",
            "description": "关联的 LLM 模型数量"
          },
          "embedding_count": {
            "type": "integer",
            "description": "关联的 Embedding 模型数量"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```
