openapi: 3.0.1 info: title: langfuse AnnotationQueues LlmConnections API version: '' description: '## Authentication Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings: - username: Langfuse Public Key - password: Langfuse Secret Key ## Exports - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml' tags: - name: LlmConnections paths: /api/public/llm-connections: get: description: Get all LLM connections in a project operationId: llmConnections_list tags: - LlmConnections parameters: - name: page in: query description: page number, starts at 1 required: false schema: type: integer nullable: true - name: limit in: query description: limit of items per page required: false schema: type: integer nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PaginatedLlmConnections' '400': description: '' content: application/json: schema: {} '401': description: '' content: application/json: schema: {} '403': description: '' content: application/json: schema: {} '404': description: '' content: application/json: schema: {} '405': description: '' content: application/json: schema: {} security: - BasicAuth: [] put: description: Create or update an LLM connection. The connection is upserted on provider. operationId: llmConnections_upsert tags: - LlmConnections parameters: [] responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/LlmConnection' '400': description: '' content: application/json: schema: {} '401': description: '' content: application/json: schema: {} '403': description: '' content: application/json: schema: {} '404': description: '' content: application/json: schema: {} '405': description: '' content: application/json: schema: {} security: - BasicAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpsertLlmConnectionRequest' /api/public/llm-connections/{id}: delete: description: Delete an LLM connection by id. Evaluators that depend on the deleted connection are automatically paused. operationId: llmConnections_delete tags: - LlmConnections parameters: - name: id in: path required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/DeleteLlmConnectionResponse' '400': description: '' content: application/json: schema: {} '401': description: '' content: application/json: schema: {} '403': description: '' content: application/json: schema: {} '404': description: '' content: application/json: schema: {} '405': description: '' content: application/json: schema: {} security: - BasicAuth: [] components: schemas: utilsMetaResponse: title: utilsMetaResponse type: object properties: page: type: integer description: current page number limit: type: integer description: number of items per page totalItems: type: integer description: number of total items given the current filters/selection (if any) totalPages: type: integer description: number of total pages given the current limit required: - page - limit - totalItems - totalPages DeleteLlmConnectionResponse: title: DeleteLlmConnectionResponse type: object properties: message: type: string required: - message LlmAdapter: title: LlmAdapter type: string enum: - anthropic - openai - azure - bedrock - google-vertex-ai - google-ai-studio PaginatedLlmConnections: title: PaginatedLlmConnections type: object properties: data: type: array items: $ref: '#/components/schemas/LlmConnection' meta: $ref: '#/components/schemas/utilsMetaResponse' required: - data - meta UpsertLlmConnectionRequest: title: UpsertLlmConnectionRequest type: object description: Request to create or update an LLM connection (upsert) properties: provider: type: string description: Provider name (e.g., 'openai', 'my-gateway'). Must be unique in project, used for upserting. adapter: $ref: '#/components/schemas/LlmAdapter' description: The adapter used to interface with the LLM secretKey: type: string description: Secret key for the LLM API. baseURL: type: string nullable: true description: Custom base URL for the LLM API customModels: type: array items: type: string nullable: true description: List of custom model names withDefaultModels: type: boolean nullable: true description: Whether to include default models. Default is true. extraHeaders: type: object additionalProperties: type: string nullable: true description: Extra headers to send with requests config: type: object additionalProperties: true nullable: true description: 'Adapter-specific configuration. Validation rules: - **Bedrock**: Required. Must be `{"region": ""}` (e.g., `{"region":"us-east-1"}`) - **VertexAI**: Optional. If provided, must be `{"location": ""}` (e.g., `{"location":"us-central1"}`) - **Other adapters**: Not supported. Omit this field or set to null.' required: - provider - adapter - secretKey LlmConnection: title: LlmConnection type: object description: LLM API connection configuration (secrets excluded) properties: id: type: string provider: type: string description: Provider name (e.g., 'openai', 'my-gateway'). Must be unique in project, used for upserting. adapter: type: string description: The adapter used to interface with the LLM displaySecretKey: type: string description: Masked version of the secret key for display purposes baseURL: type: string nullable: true description: Custom base URL for the LLM API customModels: type: array items: type: string description: List of custom model names available for this connection withDefaultModels: type: boolean description: Whether to include default models for this adapter extraHeaderKeys: type: array items: type: string description: Keys of extra headers sent with requests (values excluded for security) config: type: object additionalProperties: true nullable: true description: Adapter-specific configuration. Required for Bedrock (`{"region":"us-east-1"}`), optional for VertexAI (`{"location":"us-central1"}`), not used by other adapters. createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - id - provider - adapter - displaySecretKey - customModels - withDefaultModels - extraHeaderKeys - createdAt - updatedAt securitySchemes: BasicAuth: type: http scheme: basic