kingfisher/data/rules/openrouter.yml
Mick Grove 7237a931d5 v1.73.0
2026-01-01 22:24:57 -08:00

36 lines
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: 4.0
confidence: high
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/credits
headers:
Authorization: "Bearer {{ TOKEN }}"
Accept: application/json
response_matcher:
- report_response: true
- type: StatusMatch
status: [200]
- type: JsonValid
- type: WordMatch
words: ['"data"', '"total_credits"', '"total_usage"']