BYOK AI Providers
NeuralRepo’s Anthropic-powered features run on Bring Your Own Key (BYOK). You connect your own API key and NeuralRepo uses it for the agent’s Claude models, AI-generated specs, and the weekly digest’s written summary.
What BYOK Enables
Section titled “What BYOK Enables”| Feature | Description |
|---|---|
| AI agent — Claude models | Use Sonnet, Haiku, or Opus in the Agent view and the mind map chat panel. The two Workers AI models need no key. |
| AI-Generated Specs | POST /ideas/:id/develop uses your key to generate a project specification and appends it to the idea’s body. |
| Weekly Digest | Your Sunday digest is an AI-written narrative of the week’s activity — new ideas, pending duplicates, and stale ideas — with a specific suggestion. Without a key you still get the digest, as a stats summary. |
Core functionality — capture, search, organize, graph, and the agent itself on a Workers AI model — works with no AI key at all.
Agent Model Registry
Section titled “Agent Model Registry”The agent offers five models. The three Anthropic models require an Anthropic BYOK key; the two Workers AI models run on Cloudflare’s own inference and need no key.
| Model | Provider | Requires BYOK | Context | Max steps | Notes |
|---|---|---|---|---|---|
| GPT-OSS 120B (default) | Workers AI | No | 128K | 12 | @cf/openai/gpt-oss-120b; runs in code mode by default |
| Qwen 30B | Workers AI | No | 32K | 6 | @cf/qwen/qwen3-30b-a3b-fp8; compact system prompt |
| Sonnet | Anthropic | Yes | 200K | 10 | claude-sonnet-4-20250514 |
| Haiku | Anthropic | Yes | 200K | 8 | claude-haiku-4-5-20251001 |
| Opus | Anthropic | Yes | 200K | 10 | claude-opus-4-20250514 |
All Anthropic requests route through Cloudflare AI Gateway — your key is never exposed beyond Cloudflare’s infrastructure.
Supported BYOK Providers
Section titled “Supported BYOK Providers”Three providers can be stored. Anthropic is the one the agent’s Claude models use; all three are eligible for the digest summary and the develop endpoint, which pick a provider by the priority order below.
| Provider | Key format | Default model used |
|---|---|---|
| Anthropic | sk-ant-… | claude-sonnet-4-20250514 |
| OpenAI | sk-… | gpt-4o |
| OpenRouter | sk-or-… | anthropic/claude-sonnet-4-20250514 |
-
Go to Settings ▸ AI in the NeuralRepo web dashboard. The panel is headed AI Providers.
-
Find the card for your provider (Anthropic, OpenAI, or OpenRouter).
-
Paste your API key. The Save button stays disabled until the key is at least 10 characters.
-
Click Save. The key is encrypted and stored, and the card switches to a Configured badge.
-
Click Test connection to verify the key works. A green Connected confirms it.
Use the BYOK API endpoints to manage keys programmatically:
# Set a provider key (Pro)curl -X PUT https://neuralrepo.com/api/v1/user/byok/anthropic \ -H "X-API-Key: nrp_your_key_here" \ -H "Content-Type: application/json" \ -d '{"api_key": "sk-ant-your-anthropic-key"}'# Test the key (Pro)curl -X POST https://neuralrepo.com/api/v1/user/byok/anthropic/test \ -H "X-API-Key: nrp_your_key_here"Replace anthropic with openai or openrouter for other providers. Any other value returns 400.
Provider Priority
Section titled “Provider Priority”When NeuralRepo needs an AI call for a digest or a spec, it selects a provider in this order:
- Your explicit preference, if you have set one.
- Anthropic, if a key is configured.
- OpenAI, if a key is configured.
- OpenRouter, if a key is configured.
The Preferred provider dropdown only appears once you have more than one provider configured — with a single key there is nothing to choose between, and the default Auto option is the Anthropic → OpenAI → OpenRouter order above.
If no key is available for any provider, the AI feature is skipped gracefully: the weekly digest is sent as a stats summary instead of a narrative.
Security
Section titled “Security”Your API keys are protected with multiple layers:
- Encrypted at rest. Keys are encrypted with AES-256-GCM using a key derived from the server-side
ENCRYPTION_KEYsecret via HKDF-SHA256, with a fresh 12-byte IV per encryption. The plaintext key is never stored. - AI Gateway routing. All AI requests are routed through Cloudflare’s AI Gateway, which provides logging, rate limiting, and caching without exposing your key to additional third parties.
- No key exposure. The API never returns your key, in full or in part.
GET /user/byok/statusreports only which providers are configured.
Managing Keys
Section titled “Managing Keys”# Which providers are configured, and which one is activecurl https://neuralrepo.com/api/v1/user/byok/status \ -H "X-API-Key: nrp_your_key_here"{ "active_provider": "anthropic", "has_anthropic_key": true, "has_openai_key": false, "has_openrouter_key": false}# Remove a provider key (not Pro-gated)curl -X DELETE https://neuralrepo.com/api/v1/user/byok/openai \ -H "X-API-Key: nrp_your_key_here"Testing Your Key
Section titled “Testing Your Key”Before relying on AI features, verify your key works:
curl -X POST https://neuralrepo.com/api/v1/user/byok/anthropic/test \ -H "X-API-Key: nrp_your_key_here"Success response:
{ "ok": true}Failure response:
{ "ok": false, "error": "Invalid API key"}