wpmind/src/utils/is-valid-anthropic-api-key/index.js
Nikita e67eca2ee0 added support for Anthropic and it is recommended
move code to work with AI from rest class to separate class
2024-12-27 14:31:22 +03:00

4 lines
125 B
JavaScript

export default function isValidAnthropicApiKey(apiKey) {
const regex = /^sk-ant-[a-zA-Z0-9]/;
return regex.test(apiKey);
}