kingfisher/data/rules/openrouter.yml
2026-01-12 22:50:05 -08:00

38 lines
No EOL
1.1 KiB
YAML

rules:
- name: OpenRouter API Key
id: kingfisher.openrouter.1
pattern: |
(?xi)
\b
(
sk-or-v1-[0-9a-f]{64}
)
\b
pattern_requirements:
min_digits: 4
min_entropy: 3.5
confidence: medium
examples:
- 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
- 'Authorization: Bearer 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'
references:
- https://openrouter.ai/docs/api/reference/authentication
- https://openrouter.ai/docs/api/api-reference/credits/get-credits
validation:
type: Http
content:
request:
method: GET
url: https://openrouter.ai/api/v1/key
headers:
Authorization: "Bearer {{ TOKEN }}"
Accept: "application/json"
response_matcher:
- report_response: true
- type: StatusMatch
status: [200]
- type: WordMatch
words:
- '"data"'
- '"label"'
match_all_words: true