Skip to main content
By default, Valiqor uses its own OpenAI API key for LLM-based evaluations, security audits, and failure analysis. With BYOK (Bring Your Own Key), you can provide your own OpenAI API key so that LLM judge calls are billed to your OpenAI account instead.

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)

The key is passed to each sub-client (.eval, .security, .failure_analysis).

3. Environment variable

4. .valiqorrc file (lowest priority)

Resolution order

If you don’t provide a key at any level, Valiqor’s backend falls back to its own server-side OpenAI key.

How it works

When you provide an OpenAI key, the SDK includes it in the JSON request body:
The key is:
  • 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 an APIError in that case.

Configuration →

Full config reference: env vars, .valiqorrc, and more.

Rate Limits →

Understand quotas and how BYOK affects them.