Authentication errors
API key invalid
- Check your API key is correct:
echo $QWED_API_KEY - Make sure the value is not a placeholder —
qwed initignores common dummy values likeyour-api-key,changeme,placeholder, andxxx. Replace them with a real key. - Regenerate key at cloud.qwedai.com
- Ensure no extra spaces or newlines
Rate limit exceeded
- Free tier: 100 requests/minute
- Pro tier: 1,000 requests/minute
- Enterprise: Unlimited
Verification failures
Math: floating-point precision
Logic: unsatisfiable constraints
Stats: Internal verification error
- Verify your query is a valid statistical question (e.g., “What is the mean of column X?”)
- Check that the column names in your query match the columns in your data
- If the issue persists, check the server-side logs for the exception type
Code: timeout
- Increase timeout:
client.verify_code(code, timeout=60) - Simplify code (reduce loops, recursion)
- Use bounded verification
CLI issues
qwed init fails with “attempt to write a readonly database”
qwed init. The local server tries to create a bootstrap SQLite database in a directory that is not writable. Common examples include a read-only mount, a container filesystem, or a system-managed path.
Solution: Upgrade to QWED v4.0.0 or later:
qwed init automatically resolves a writable runtime directory for the database. It uses the current working directory if writable, otherwise falls back to ~/qwed-demo/. No manual intervention is needed.
If you cannot upgrade, run qwed init from a writable directory:
qwed init fails with “Server identity check failed”
qwed init. Before bootstrapping an API key, the CLI asks the server on --server-url to prove it holds this project’s QWED_JWT_SECRET_KEY and QWED_API_KEY_LOOKUP_SECRET through GET /health/identity. The check fails closed in any of these cases:
- The proofs don’t match.
- The server returns
404(an older server without the endpoint) or another non-200status. - The response is malformed.
- The server is unreachable.
- The local secrets are missing.
- “…holds a different jwt and/or lookup secret(s)…” — a stale QWED server (started with different secrets) or an unrelated process is listening on the port. Stop that process, then re-run
qwed init; it starts a fresh server with the secrets from your.env. - “…the server did not prove its secrets…” (non-
200) — a404means the server predates this endpoint: upgrade it. A503means the intended server is running with no secrets configured: setQWED_JWT_SECRET_KEYandQWED_API_KEY_LOOKUP_SECRETin its environment, then restart. Any other status can indicate a foreign listener: stop whatever holds the port and re-runqwed init. - “…could not reach the identity endpoint…” — no server is listening (or it died after the health check), or
--server-urlpoints at the wrong host/port. Re-runqwed initso it starts a fresh server, or point--server-urlat the running one. - “…unreadable identity response…” — a live-but-broken server is answering, and a plain re-run of
qwed initreuses a healthy-looking running server, so the same check fails again. Stop or restart the responding process, then re-runqwed init. - Local secrets are missing — re-run
qwed init; it generates and persists fresh secrets before the handshake.
qwed init.
Gemini provider issues
Missing google-generativeai package
Gemini API key not found
GOOGLE_API_KEY or GEMINI_API_KEY:
Gemini timeout errors
All Gemini API calls have a 30-second timeout. If your requests time out consistently:- Check your network connection to Google’s API servers
- Break large inputs into smaller parts
- For image verification, ensure images are under 10 MB
Gemini JSON parse errors
SDK issues
Import error
Async not working
DSL syntax errors
Unknown operator
Missing parentheses
Performance issues
Slow verification
Possible causes:- Complex expressions with many variables
- Large code files
- Deep recursion in symbolic execution
High memory usage
Solution: Stream large results:Common error codes
Getting help
- Documentation: docs.qwedai.tech
- GitHub Issues: github.com/QWED-AI/qwed-verification/issues
- Email: support@qwedai.com
- Intercom: Chat widget on docs site