Why use BYOK?
Setting your OpenAI key
You can set your key at four levels, in priority order:1. Per-method (highest priority)
2. Per-client (constructor)
.eval, .security, .failure_analysis).
3. Environment variable
4. .valiqorrc file (lowest priority)
Resolution order
How it works
When you provide an OpenAI key, the SDK includes it in the JSON request body:- Request-scoped — not persisted by the backend
- Sent in the request body — not as a header
- Used only for LLM judge calls — your Valiqor API key (
vq_...) is still used for authentication
Supported methods
BYOK is supported in all LLM-based operations:Heuristic metrics (
contains, levenshtein, equals, regex_match) don’t use LLM judges and therefore don’t use your OpenAI key.Example: CI/CD with BYOK
Verifying BYOK is active
When you provide an OpenAI key, the backend uses it for all LLM judge calls in that request. You can verify by checking your OpenAI usage dashboard for corresponding API calls. If your key is invalid or has insufficient credits, the backend will return an error. The SDK raises anAPIError in that case.
Configuration →
Full config reference: env vars, .valiqorrc, and more.
Rate Limits →
Understand quotas and how BYOK affects them.