openapi: 3.2.0 info: title: LiteLLM credential management API description: 'Proxy Server to call 100+ LLMs in the OpenAI format. **Customize Swagger Docs** 👉 ```LiteLLM Admin Panel on /ui```. Create, Edit Keys with SSO. Having issues? Try ```Fallback Login``` 💸 ```LiteLLM Model Cost Map```. 🔎 ```LiteLLM Model Hub```. See available models on the proxy. **Docs**' version: 1.102.1 tags: - name: Credential Management paths: /credentials: get: tags: - Credential Management summary: Get Credentials description: '[BETA] endpoint. This might change unexpectedly.' operationId: get_credentials_credentials_get responses: '200': description: Successful Response content: application/json: schema: {} security: - APIKeyHeader: [] post: tags: - Credential Management summary: Create Credential description: '[BETA] endpoint. This might change unexpectedly. Stores credential in DB. Reloads credentials in memory.' operationId: create_credential_credentials_post requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCredentialItem' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /credentials/by_name/{credential_name}: get: tags: - Credential Management summary: Get Credential By Name description: '[BETA] endpoint. This might change unexpectedly.' operationId: get_credential_by_name_credentials_by_name__credential_name__get security: - APIKeyHeader: [] parameters: - name: credential_name in: path required: true schema: type: string description: The credential name, percent-decoded; may contain slashes title: Credential Name description: The credential name, percent-decoded; may contain slashes responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CredentialItem' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /credentials/by_model/{model_id}: get: tags: - Credential Management summary: Get Credential By Model description: '[BETA] endpoint. This might change unexpectedly.' operationId: get_credential_by_model_credentials_by_model__model_id__get security: - APIKeyHeader: [] parameters: - name: model_id in: path required: true schema: type: string description: The model ID to look up credentials for title: Model Id description: The model ID to look up credentials for responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CredentialItem' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /credentials/{credential_name}: delete: tags: - Credential Management summary: Delete Credential description: '[BETA] endpoint. This might change unexpectedly.' operationId: delete_credential_credentials__credential_name__delete security: - APIKeyHeader: [] parameters: - name: credential_name in: path required: true schema: type: string description: The credential name, percent-decoded; may contain slashes title: Credential Name description: The credential name, percent-decoded; may contain slashes responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Credential Management summary: Update Credential description: '[BETA] endpoint. This might change unexpectedly.' operationId: update_credential_credentials__credential_name__patch security: - APIKeyHeader: [] parameters: - name: credential_name in: path required: true schema: type: string description: The credential name, percent-decoded; may contain slashes title: Credential Name description: The credential name, percent-decoded; may contain slashes requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CredentialItem' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /credentials/migrate-encryption: post: tags: - Credential Management summary: Migrate Encryption Endpoint description: 'Re-encrypt all at-rest credentials into the AES-256-GCM (``v2:gcm:``) format. Admin only. Requires ``general_settings.encryption_algorithm: aes-256-gcm``. Idempotent and resumable — re-running skips already-migrated values. Pass ``dry_run=true`` for a non-mutating scan (equivalent to ``--check``).' operationId: migrate_encryption_endpoint_credentials_migrate_encryption_post security: - APIKeyHeader: [] parameters: - name: dry_run in: query required: false schema: type: boolean description: If true, scan and report without writing any changes. default: false title: Dry Run description: If true, scan and report without writing any changes. responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /credentials/migrate-encryption/check: get: tags: - Credential Management summary: Check Encryption Endpoint description: 'Read-only residual scan for compliance attestation. Reports how many at-rest values are still in the legacy format. ``residual_legacy == 0`` attests no legacy ciphertext remains. Admin only; performs no writes.' operationId: check_encryption_endpoint_credentials_migrate_encryption_check_get responses: '200': description: Successful Response content: application/json: schema: {} security: - APIKeyHeader: [] components: schemas: CredentialItem: properties: credential_name: type: string title: Credential Name credential_info: additionalProperties: true type: object title: Credential Info credential_values: additionalProperties: true type: object title: Credential Values type: object required: - credential_name - credential_info - credential_values title: CredentialItem ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError CreateCredentialItem: properties: credential_name: type: string title: Credential Name credential_info: additionalProperties: true type: object title: Credential Info credential_values: anyOf: - additionalProperties: true type: object - type: 'null' title: Credential Values model_id: anyOf: - type: string - type: 'null' title: Model Id type: object required: - credential_name - credential_info title: CreateCredentialItem securitySchemes: APIKeyHeader: type: apiKey description: Bearer token in: header name: x-litellm-api-key