BYOK AI Providers
NeuralRepo’s AI features are powered by Bring Your Own Key (BYOK). You connect your own Anthropic API key and NeuralRepo uses it to power the AI agent’s Anthropic models, AI-generated specs, weekly digest summaries, and other intelligent features.
What BYOK Enables
Section titled “What BYOK Enables”| Feature | Description |
|---|---|
| AI Agent — Anthropic models | Use Sonnet, Haiku, or Opus in the Neural Canvas and mind map chat panel. |
| AI-Generated Specs | The /ideas/:id/develop endpoint uses your key to generate a full project specification from an idea. |
| Weekly Digest | Your Sunday digest includes an AI-written summary of the week’s ideas, connection suggestions, and stale idea flags. |
Without a BYOK key, the AI agent falls back to Workers AI models (Qwen 30B, Llama 70B, etc.), which require no key. Core functionality (capture, search, organize, graph) works without any AI key.
Agent Model Registry
Section titled “Agent Model Registry”The AI agent supports the following models. Anthropic models require a BYOK key; Workers AI models are included with Pro and require no key.
| Model | Provider | Requires BYOK | Context | Best for |
|---|---|---|---|---|
| Sonnet (default) | Anthropic | Yes | 200K | Best reasoning, complex tasks |
| Haiku | Anthropic | Yes | 200K | Faster responses, lower cost |
| Opus | Anthropic | Yes | 200K | Most capable, long analysis |
| Qwen 30B | Workers AI | No | 32K | Creative tasks, brainstorming |
| Llama 70B | Workers AI | No | 128K | General purpose |
| GPT-OSS 120B | Workers AI | No | 128K | General purpose |
| Mistral Small 24B | Workers AI | No | 32K | Fast, compact responses |
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”| Provider | Models | Key Format |
|---|---|---|
| Anthropic | Claude Haiku 4.5, Claude Sonnet 4, Claude Opus 4 | sk-ant-... |
| OpenAI | GPT-4o, GPT-4o-mini | sk-... |
| OpenRouter | Any model available on OpenRouter | sk-or-... |
-
Go to Settings > AI Providers in the NeuralRepo web dashboard.
-
Select your provider (Anthropic, OpenAI, or OpenRouter).
-
Paste your API key.
-
Click Save. The key is encrypted and stored securely.
-
Click Test Connection to verify the key works.
Use the BYOK API endpoints to manage keys programmatically:
# Set a provider keycurl -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 keycurl -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.
Provider Priority
Section titled “Provider Priority”When NeuralRepo needs to make an AI call, it selects a provider in this order:
- Your explicit preference — if you have set a preferred provider in settings, that is used first.
- Anthropic — if an Anthropic key is configured.
- OpenAI — if an OpenAI key is configured.
- OpenRouter — if an OpenRouter key is configured.
If no key is available for any provider, the AI feature is skipped gracefully (for example, the weekly digest is sent without an AI summary).
Security
Section titled “Security”Your API keys are protected with multiple layers:
- Encrypted at rest. Keys are encrypted using the server-side
ENCRYPTION_KEYbefore being written to the database. 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 full key. GET endpoints return only the last four characters for identification.
Managing Keys
Section titled “Managing Keys”# List configured providers (returns provider names and last 4 chars of key)curl https://neuralrepo.com/api/v1/user/byok/status \ -H "X-API-Key: nrp_your_key_here"
# Remove a provider keycurl -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"}